Author: adubovsky
Date: 2008-11-24 10:21:12 -0500 (Mon, 24 Nov 2008)
New Revision: 11325
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:
Editor changes
Modified: trunk/test-applications/jsp/src/main/java/editor/Editor.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/editor/Editor.java 2008-11-24 15:19:20 UTC
(rev 11324)
+++ trunk/test-applications/jsp/src/main/java/editor/Editor.java 2008-11-24 15:21:12 UTC
(rev 11325)
@@ -1,5 +1,37 @@
package editor;
public class Editor {
+ private String value;
+ private String width;
+ private String height;
+ 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.";
+ width = "400";
+ height = "200";
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getWidth() {
+ return width;
+ }
+
+ public void setWidth(String width) {
+ this.width = width;
+ }
+
+ public String getHeight() {
+ return height;
+ }
+
+ public void setHeight(String height) {
+ this.height = height;
+ }
}
Modified: trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp 2008-11-24 15:19:20 UTC
(rev 11324)
+++ trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp 2008-11-24 15:21:12 UTC
(rev 11325)
@@ -4,10 +4,21 @@
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="editorSubviewID">
- <div>The <b>editor</b> component will provide possibility to use
- tinyMCE editor widget as JSF component.</div>
- <rich:editor id="editorID" value=""></rich:editor>
- <textarea id="textareaID" disabled="disabled" style="width:
400; height: 100"></textarea>
- <br />
- <a4j:commandButton value="a4j Submit" reRender="editorID,
textareaID"></a4j:commandButton>
+ <h:panelGrid id="EditorPanelID" columns="2"
border="1">
+
+ <rich:editor id="editorID" value="#{editor.value}"
+ width="300" height="100"></rich:editor>
+
+ <h:panelGrid columns="1" >
+ <f:facet name="header">
+ <h:outputText value="Results" />
+ </f:facet>
+ <h:outputText value="#{editor.value}" escape="false" />
+ <div style="color: red; font-style: italic">HTML code:</div>
+ <h:outputText value="#{editor.value}"
+ style="font-style: italic; color: gray" />
+ </h:panelGrid>
+ </h:panelGrid>
+ <a4j:commandButton value="Show Result" reRender="EditorPanelID"
/>
+ <a4j:commandButton value="reRender editor" reRender="editorID"
/>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp 2008-11-24
15:19:20 UTC (rev 11324)
+++ trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp 2008-11-24
15:21:12 UTC (rev 11325)
@@ -4,5 +4,11 @@
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="editorPropertySubviewID">
+ <h:panelGrid columns="2">
+ <h:outputText value="height"></h:outputText>
+ <h:inputText value="#{editor.height}" onchange="submit();"
></h:inputText>
+ <h:outputText value="width"></h:outputText>
+ <h:inputText value="#{editor.width}" onchange="submit();"
></h:inputText>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file