Author: adubovsky
Date: 2008-11-26 10:19:06 -0500 (Wed, 26 Nov 2008)
New Revision: 11396
Modified:
trunk/test-applications/jsp/src/main/java/editor/Editor.java
trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp
Log:
changes in editor config
Modified: trunk/test-applications/jsp/src/main/java/editor/Editor.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/editor/Editor.java 2008-11-26 14:31:03 UTC
(rev 11395)
+++ trunk/test-applications/jsp/src/main/java/editor/Editor.java 2008-11-26 15:19:06 UTC
(rev 11396)
@@ -26,7 +26,7 @@
private String tabindex;
private String dialogType;
private String language;
- private String configuration;
+ private boolean configuration;
// private String skin;
public Editor() {
@@ -45,10 +45,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) {
@@ -236,11 +247,11 @@
this.language = language;
}
- public String getConfiguration() {
+ public boolean getConfiguration() {
return configuration;
}
- public void setConfiguration(String configuration) {
+ public void setConfiguration(boolean configuration) {
this.configuration = configuration;
}
Modified: trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp 2008-11-26 14:31:03 UTC
(rev 11395)
+++ trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp 2008-11-26 15:19:06 UTC
(rev 11396)
@@ -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/jsp/src/main/webapp/Editor/EditorProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp 2008-11-26
14:31:03 UTC (rev 11395)
+++ trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp 2008-11-26
15:19:06 UTC (rev 11396)
@@ -77,10 +77,8 @@
--%>
<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