◆ doBeforeComposeChildren()
void org.turro.elephant.web.ContextComposer.doBeforeComposeChildren |
( |
Component |
comp | ) |
throws Exception |
Definition at line 271 of file ContextComposer.java.
272 comp.setAttribute(
"edit", editingContext);
273 super.doBeforeComposeChildren(comp);
◆ doFinally()
void org.turro.elephant.web.ContextComposer.doFinally |
( |
| ) |
throws Exception |
Definition at line 246 of file ContextComposer.java.
247 saveDetail.setDisabled(
true);
248 saveDetail.setAutodisable(
"+self");
249 savePage.setDisabled(
true);
250 savePage.setAutodisable(
"+self");
251 saveElement.setDisabled(
true);
252 saveElement.setAutodisable(
"+self");
253 saveContent.setDisabled(
true);
254 saveContent.setAutodisable(
"+self");
255 createChild.setDisabled(
true);
256 removeContext.setDisabled(
true);
257 wikiEditor.
addResolver(w -> StyledElement.contextuals(w, ElephantContext.getRootWebPath(),
void addResolver(IWikiResolver resolver)
◆ onAddAttribute()
void org.turro.elephant.web.ContextComposer.onAddAttribute |
( |
Event |
event | ) |
|
Definition at line 163 of file ContextComposer.java.
164 InputDialog.getInput(getPage(),
167 new InputField(
"Name",
"",
null, 0)
168 }, (Context context) -> {
169 InputField[] fields = (InputField[]) context.get(
"fields");
170 if(fields.length > 0) {
171 for(InputField f : fields) {
172 if(
"Name".equals(f.getLabel())) {
173 createAttribute((String) f.getValue());
◆ onBaseChange()
void org.turro.elephant.web.ContextComposer.onBaseChange |
( |
Event |
event | ) |
|
◆ onChange()
void org.turro.elephant.web.ContextComposer.onChange |
( |
Event |
event | ) |
|
Definition at line 236 of file ContextComposer.java.
237 saveDetail.setDisabled(
false);
238 savePage.setDisabled(
false);
239 saveElement.setDisabled(
false);
boolean isEditable(String base, String lang)
void resetDefaultLocales()
void setReadonly(boolean value)
◆ onCreateChild()
void org.turro.elephant.web.ContextComposer.onCreateChild |
( |
Event |
event | ) |
|
Definition at line 121 of file ContextComposer.java.
122 InputDialog.getInput(getPage(),
125 new InputField(
"Name",
"",
null, 0) {
127 protected HtmlBasedComponent createEditor() {
128 Textbox tb =
new Textbox();
129 tb.setConstraint(
"/[a-z][a-z0-9\\-]+/: {Start with a lowercase letter, then lowercase letters, numbers or hypens}");
133 }, (Context context) -> {
134 InputField[] fields = (InputField[]) context.get(
"fields");
135 if(fields.length > 0) {
136 for(InputField f : fields) {
137 if(
"Name".equals(f.getLabel())) {
138 createAndSelect((String) f.getValue());
◆ onDiffVersion()
void org.turro.elephant.web.ContextComposer.onDiffVersion |
( |
Event |
event | ) |
|
Definition at line 213 of file ContextComposer.java.
217 String oldText = FileUtil.getContentWithLineBreaks(oldFile);
220 String newText = FileUtil.getContentWithLineBreaks(newFile);
221 Windows.showHtml(
"Diff", Diffs.diff(oldText, newText).efficiency().html());
222 }
catch (IOException ex) {
223 Logger.getLogger(ContextComposer.class.getName()).log(Level.SEVERE,
null, ex);
WebResources getResources()
File getEditable(String base, String lang, String version)
◆ onRemoveContext()
void org.turro.elephant.web.ContextComposer.onRemoveContext |
( |
Event |
event | ) |
|
Definition at line 147 of file ContextComposer.java.
148 Messages.confirmDeletion().add(editingContext.
getContext().
getId()).show(() -> {
149 ElContext parent = editingContext.
getContext().getParent();
151 Clients.showNotification(
"Cannot remove root");
154 ElContextMap.reset();
void onSelectContext(Event event)
void selectPath(String path)
◆ onRemoveVersion()
void org.turro.elephant.web.ContextComposer.onRemoveVersion |
( |
Event |
event | ) |
|
Definition at line 204 of file ContextComposer.java.
205 Messages.confirmDeletion().add(bversion.
getObjectValue()).show(() -> {
void removeVersion(String base, String lang, String version)
◆ onSaveContent()
void org.turro.elephant.web.ContextComposer.onSaveContent |
( |
Event |
event | ) |
|
Definition at line 228 of file ContextComposer.java.
231 autoremove.isChecked());
void saveContent(IContact contact, String base, String lang, String wiki, String html, boolean autoremove)
◆ onSaveDetail()
void org.turro.elephant.web.ContextComposer.onSaveDetail |
( |
Event |
event | ) |
|
Definition at line 114 of file ContextComposer.java.
116 ElContextMap.reset();
117 SitemapGenerator.generateSitemap();
◆ onSelectContext()
void org.turro.elephant.web.ContextComposer.onSelectContext |
( |
Event |
event | ) |
|
Definition at line 95 of file ContextComposer.java.
96 ContextItem contextItem = (ContextItem) contextTree.getSelectedItem();
97 editingContext.
setContext(contextItem.getElContext());
98 contextId.invalidate();
99 formDetail.invalidate();
100 formPage.invalidate();
101 formElement.invalidate();
102 formRepository.invalidate();
103 formSocial.invalidate();
104 saveDetail.setDisabled(
true);
105 savePage.setDisabled(
true);
106 saveElement.setDisabled(
true);
107 createChild.setDisabled(contextItem ==
null);
108 removeContext.setDisabled(contextItem ==
null);
109 addAttribute.setDisabled(contextItem ==
null);
void setContext(ElContext context)
◆ onVersionChange()
void org.turro.elephant.web.ContextComposer.onVersionChange |
( |
Event |
event | ) |
|
Definition at line 187 of file ContextComposer.java.
192 removeVersion.setDisabled(
false);
193 diffVersion.setDisabled(
false);
194 wikiEditor.
setValue(FileUtil.getContentWithLineBreaks(file));
195 }
catch (IOException ex) {
196 Logger.getLogger(ContextComposer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
void setValue(String value)
The documentation for this class was generated from the following file: