Author: abelevich
Date: 2008-11-19 11:47:07 -0500 (Wed, 19 Nov 2008)
New Revision: 11245
Modified:
trunk/sandbox/samples/editorSeam-sample/src/main/java/org/richfaces/EditorBean.java
trunk/sandbox/samples/editorSeam-sample/src/main/resources/editorParameters.properties
trunk/sandbox/samples/editorSeam-sample/src/main/webapp/pages/editor.jsp
trunk/sandbox/samples/editorSeam-sample/src/main/webapp/pages/editor.xhtml
Log:
seam dev. demo
Modified:
trunk/sandbox/samples/editorSeam-sample/src/main/java/org/richfaces/EditorBean.java
===================================================================
---
trunk/sandbox/samples/editorSeam-sample/src/main/java/org/richfaces/EditorBean.java 2008-11-19
16:45:36 UTC (rev 11244)
+++
trunk/sandbox/samples/editorSeam-sample/src/main/java/org/richfaces/EditorBean.java 2008-11-19
16:47:07 UTC (rev 11245)
@@ -7,9 +7,22 @@
public class EditorBean {
- private String value = "It's easy to make *emphasis*, |monospace|,\n ~deleted
text~, super^scripts^ or _underlines_.";
+ private String value = "It's easy to make *emphasis*, |monospace|,~deleted
text~, super^scripts^ or _underlines_.\n\n" +
+ "+This is a big heading\n" +
+ "You /must/ have some text following a heading!\n\n" +
+ "++This is a smaller heading\n" +
+ "This is the first paragraph. We can split it across multiple" +
+ "lines, but we must end it with a blank line.\n\n" +
+ "This is the second paragraph.\n\n" +
+ "An ordered list:\n\n" +
+ "#first item\n" + "#second item\n" +
+ "#and even the /third/ item\n\n" + "An unordered list:\n\n" +
+ "=an item\n" + "=another item\n\n" +
+ "[Slashdot - News for nerds, stuff that matters
link=>http://slashdot.org]"
+ ;
private UIEditor editor;
private boolean rendered = true;
+ private boolean useSeamText = true;
private Map<String, Object> dataMap;
@@ -26,16 +39,6 @@
this.value = value;
}
- public String action1(){
- value += "1";
- return null;
- }
-
- public String action2(){
- editor.setValue(editor.getValue() + "1");
- return null;
- }
-
public String changeRendered(){
if(rendered) {
rendered = false;
@@ -67,6 +70,14 @@
public void setRendered(boolean rendered) {
this.rendered = rendered;
}
+
+ public boolean isUseSeamText() {
+ return useSeamText;
+ }
+
+ public void setUseSeamText(boolean useSeamText) {
+ this.useSeamText = useSeamText;
+ }
}
Modified:
trunk/sandbox/samples/editorSeam-sample/src/main/resources/editorParameters.properties
===================================================================
---
trunk/sandbox/samples/editorSeam-sample/src/main/resources/editorParameters.properties 2008-11-19
16:45:36 UTC (rev 11244)
+++
trunk/sandbox/samples/editorSeam-sample/src/main/resources/editorParameters.properties 2008-11-19
16:47:07 UTC (rev 11245)
@@ -1,3 +1,5 @@
+skin ='o2k7'
+plugins
="safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template"
theme_advanced_buttons1="save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect"
theme_advanced_buttons2="cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor"
theme_advanced_buttons3="tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen"
@@ -5,4 +7,4 @@
theme_advanced_toolbar_location="top"
theme_advanced_toolbar_align="left"
theme_advanced_statusbar_location="bottom"
-theme_advanced_resizing=true
\ No newline at end of file
+theme_advanced_resizing=true
Modified: trunk/sandbox/samples/editorSeam-sample/src/main/webapp/pages/editor.jsp
===================================================================
--- trunk/sandbox/samples/editorSeam-sample/src/main/webapp/pages/editor.jsp 2008-11-19
16:45:36 UTC (rev 11244)
+++ trunk/sandbox/samples/editorSeam-sample/src/main/webapp/pages/editor.jsp 2008-11-19
16:47:07 UTC (rev 11245)
@@ -12,8 +12,8 @@
<ed:editor id="editorId"
value="#{editorBean.value}"
- width="300"
- height="175"
+ width="320"
+ height="270"
rendered="#{editorBean.rendered}"
binding="#{editorBean.editor}"
theme="advanced"
@@ -23,18 +23,17 @@
configuration="editorParameters"
/>
- <h:outputText value="Editor value: #{editorBean.value}" />
- <br/>
- <h:commandButton value="h:commandButton"
action="#{editorBean.action1}"/>
- <a4j:commandButton value="a4j:commandButton"
action="#{editorBean.action1}"
- reRender="editorId"/>
+ <h:commandButton value="h:commandButton"/>
+ <a4j:commandButton value="a4j:commandButton" reRender="editorId,
seamtext"/>
<br/>
- <h:commandButton value="h:commandButton2"
action="#{editorBean.action2}"/>
- <a4j:commandButton value="a4j:commandButton2"
action="#{editorBean.action2}"
- reRender="editorId"/>
-
<br/>
- <h:commandButton value="change rendered"
action="#{editorBean.changeRendered}"/>
+ <h:commandButton value="change rendered"
action="#{editorBean.changeRendered}"/>
+ <h:panelGrid columns="1" id="seamtext">
+ <f:facet name="header">
+ <h:outputText value="Generated Seam Text"/>
+ </f:facet>
+ <h:inputTextarea readonly="true" cols="80"
rows="20" value="#{editorBean.value}"/>
+ </h:panelGrid>
</h:form>
</f:view>
</body>
Modified: trunk/sandbox/samples/editorSeam-sample/src/main/webapp/pages/editor.xhtml
===================================================================
(Binary files differ)