Author: adubovsky
Date: 2008-11-26 10:38:10 -0500 (Wed, 26 Nov 2008)
New Revision: 11399
Modified:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/Editor.java
trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/Editor/EditorProperty.xhtml
Log:
changes in editor config
Modified:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/Editor.java
===================================================================
---
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/Editor.java 2008-11-26
15:32:01 UTC (rev 11398)
+++
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/editor/Editor.java 2008-11-26
15:38:10 UTC (rev 11399)
@@ -32,8 +32,8 @@
private String tabindex;
private String dialogType;
private String language;
+ private boolean configuration;
// private String skin;
- private String configuration;
public Editor() {
value = "Collaboration-oriented websites require a human-friendly markup language
for easy entry of formatted text in forum posts, wiki pages, blogs, comments, etc. Seam
provides the <s:formattedText/> control for display of formatted text that
conforms to the Seam Text language. Seam Text is implemented using an ANTLR-based parser.
You don't need to know anything about ANTLR to use it, however.";
@@ -51,10 +51,21 @@
dialogType = "window";
language = "en";
// skin = "default";
- configuration = "";
+ configuration = false;
}
-
+
/*
+ * attach config file to editor
+ */
+ public void useConfigFile(ValueChangeEvent e) {
+ if (!configuration) {
+ htmlEditor.setConfiguration("editorconfig");
+ } else {
+ htmlEditor.setConfiguration(null);
+ }
+ }
+
+ /*
* Custom valueChangeListener
*/
public void valueChangeListener(ValueChangeEvent e) {
@@ -242,11 +253,11 @@
this.language = language;
}
- public String getConfiguration() {
- return (configuration == null)?"":configuration;
+ public boolean getConfiguration() {
+ return configuration;
}
- public void setConfiguration(String configuration) {
+ public void setConfiguration(boolean configuration) {
this.configuration = configuration;
}
Modified: trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml 2008-11-26
15:32:01 UTC (rev 11398)
+++ trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml 2008-11-26
15:38:10 UTC (rev 11399)
@@ -19,8 +19,7 @@
valueChangeListener="#{editor.valueChangeListener}"
viewMode="#{editor.viewMode}" readonly="#{editor.readonly}"
tabindex="#{editor.tabindex}" dialogType="#{editor.dialogType}"
- language="#{editor.language}" styleClass="EditorStyleClass"
- configuration="#{editor.configuration}">
+ language="#{editor.language}" styleClass="EditorStyleClass" >
<f:param name="theme_advanced_resizing" value="true" />
<f:param name="theme_advanced_statusbar_location" value="top"
/>
Modified: trunk/test-applications/seamApp/web/src/main/webapp/Editor/EditorProperty.xhtml
===================================================================
---
trunk/test-applications/seamApp/web/src/main/webapp/Editor/EditorProperty.xhtml 2008-11-26
15:32:01 UTC (rev 11398)
+++
trunk/test-applications/seamApp/web/src/main/webapp/Editor/EditorProperty.xhtml 2008-11-26
15:38:10 UTC (rev 11399)
@@ -68,10 +68,8 @@
</h:selectOneRadio>
<h:outputText value="use configuration file: "></h:outputText>
- <h:selectOneRadio value="#{editor.configuration}"
onchange="submit();">
- <f:selectItem itemValue="" itemLabel="do not use" />
- <f:selectItem itemValue="editorconfig" itemLabel="use
editorconfig.properties" />
- </h:selectOneRadio>
+ <h:selectBooleanCheckbox value="#{editor.configuration}"
+ onchange="submit();" valueChangeListener="#{editor.useConfigFile}"
/>
</h:panelGrid>
<h:commandButton value="add test"
action="#{editor.addHtmlEditor}"></h:commandButton>
</f:subview>
\ No newline at end of file
Show replies by date