Author: alevkovsky
Date: 2008-09-22 12:32:28 -0400 (Mon, 22 Sep 2008)
New Revision: 10536
Modified:
trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java
trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp
Log:
Adding basic attributes for Editor
Modified: trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java
===================================================================
---
trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java 2008-09-22
16:32:22 UTC (rev 10535)
+++
trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java 2008-09-22
16:32:28 UTC (rev 10536)
@@ -4,6 +4,10 @@
import java.util.Map;
public class EditorBean {
+
+ private String value = "Some value....";
+
+
private Map<String, Object> dataMap;
public EditorBean () {
dataMap = new HashMap<String, Object>();
@@ -16,5 +20,15 @@
public void setDataMap(Map<String, Object> dataMap) {
this.dataMap = dataMap;
}
+ public String getValue() {
+ return value;
+ }
+ public void setValue(String value) {
+ this.value = value;
+ }
+ public String action1(){
+ value += value;
+ return null;
+ }
}
Modified: trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml 2008-09-22
16:32:22 UTC (rev 10535)
+++ trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml 2008-09-22
16:32:28 UTC (rev 10536)
@@ -7,7 +7,15 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
<context-param>
+ <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
+ <param-value>NONE</param-value>
+ </context-param>
+ <context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
@@ -39,7 +47,7 @@
</servlet>
<servlet-mapping>
<servlet-name>TinyMCELoaderServlet</servlet-name>
- <url-pattern>/a4j/g/3_3_0-SNAPSHOTorg/richfaces/renderkit/html/scripts/tiny_mce/*</url-pattern>
+ <url-pattern>/a4j/g/3_3_0-SNAPSHOTscripts/tiny_mce/*</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
Modified: trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp 2008-09-22
16:32:22 UTC (rev 10535)
+++ trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp 2008-09-22
16:32:28 UTC (rev 10536)
@@ -8,12 +8,19 @@
</head>
<body>
<f:view >
- <h:form>
- <ed:editor id="editor_id" >
+ <h:form>
+ <h:panelGroup>
+ <ed:editor id="editorId" value="#{editorBean.value}"
width="100" height="100">
<f:param name="mode" value="textareas"/>
- <f:param name="theme" value="advanced"/>
+ <f:param name="theme" value="advanced"/>
</ed:editor>
- <h:commandButton value="Submit"/>
+
+ </h:panelGroup>
+
+ <br/>
+ <h:commandButton value="h:commandButton"
action="#{editorBean.action1}"/>
+ <a4j:commandButton value="a4j:commandButton"
action="#{editorBean.action1}"
+ reRender="editorId"/>
</h:form>
</f:view>
</body>