dion 2004/09/05 20:39:40 Modified: jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos homepageBuilder.jelly Log: *** keyword substitution change *** Revision Changes Path 1.4 +90 -90 jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos/homepageBuilder.jelly Index: homepageBuilder.jelly =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos/homepageBuilder.jelly,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- homepageBuilder.jelly 6 Sep 2004 03:39:30 -0000 1.3 +++ homepageBuilder.jelly 6 Sep 2004 03:39:40 -0000 1.4 @@ -1,4 +1,4 @@ -<?xml version="1.0"?>
+<?xml version="1.0"?> <!-- Copyright 2002-2004 The Apache Software Foundation @@ -14,92 +14,92 @@ See the License for the specific language governing permissions and limitations under the License. --> -<j:jelly - xmlns:j="jelly:core" - xmlns="jelly:swing" > - - <!-- create the generate page action --> - - <action var="createPageAction" name="Build and preview your page!"> - <j:set var="name" value="${nameField.text}"/> - <j:set var="background" value="${colorField.text}"/> - <j:set var="url" value="${pictureField.text}"/> - <j:set var="hobbies" value="${hobbyModel.toArray()}"/> - <j:set var="template" value="${templateField.getSelectedItem().toString()}"/> - - name = ${name} - background = ${background} - url = ${url} - hobbies = ${hobbies} - template = ${template} - - <j:file name="demopage.html" outputMode="html"> - <j:include uri="${template}"/> - </j:file> - - <frame var="showPageFrame" size="500,600" location="200,200" title="Your Homepage"> - <scrollPane> - <editorPane page="${context.getResource('/demopage.html').toString()}" editable="false"/> - </scrollPane> - </frame> - ${showPageFrame.show()} - </action> - - - <!-- create the Frame --> - - <frame var="frame" title="Homepage Builder" location="100,100" size="800,400"> - <panel> - -<!-- uncomment this when we've implemented emptyBorder - - <emptyBorder top="20" left="20" bottom="20" right="20" /> ---> - <borderLayout> - <borderAlign align="west"> - <vbox> - <label text="Name:"/> - <textField var="nameField" text="James Bond"/> - - <label text="Favourite Color:"/> - <textField var="colorField" text="#007007"/> - - <label text="Picture URL::"/> - <textField var="pictureField" text="http://www.ianfleming.org/007news/images3/c2002_pierce1.jpg"/> - - <label text="Choose template::"/> - <comboBox var="templateField"/> - ${templateField.addItem('template1.jelly')} - ${templateField.addItem('template2.jelly')} - - <label text="Add a Hobby:"/> - <textField var="hobbyField"/> - - <button> - <action name="Add >>>"> - ${hobbyModel.addElement(hobbyField.text)} - </action> - </button> - </vbox> - </borderAlign> - - <borderAlign align="east"> - <scrollPane> - <j:useBean class="javax.swing.DefaultListModel" var="hobbyModel"/> - <list model="${hobbyModel}"/> - ${hobbyModel.addElement('Killing bad guys')} - ${hobbyModel.addElement('Wrecking cars')} - ${hobbyModel.addElement('Eating jelly')} - </scrollPane> - </borderAlign> - - <borderAlign align="south"> - <button action="${createPageAction}"/> - </borderAlign> - </borderLayout> - </panel> - </frame> - - ${frame.show()} - -</j:jelly> +<j:jelly + xmlns:j="jelly:core" + xmlns="jelly:swing" > + + <!-- create the generate page action --> + + <action var="createPageAction" name="Build and preview your page!"> + <j:set var="name" value="${nameField.text}"/> + <j:set var="background" value="${colorField.text}"/> + <j:set var="url" value="${pictureField.text}"/> + <j:set var="hobbies" value="${hobbyModel.toArray()}"/> + <j:set var="template" value="${templateField.getSelectedItem().toString()}"/> + + name = ${name} + background = ${background} + url = ${url} + hobbies = ${hobbies} + template = ${template} + + <j:file name="demopage.html" outputMode="html"> + <j:include uri="${template}"/> + </j:file> + + <frame var="showPageFrame" size="500,600" location="200,200" title="Your Homepage"> + <scrollPane> + <editorPane page="${context.getResource('/demopage.html').toString()}" editable="false"/> + </scrollPane> + </frame> + ${showPageFrame.show()} + </action> + + + <!-- create the Frame --> + + <frame var="frame" title="Homepage Builder" location="100,100" size="800,400"> + <panel> + +<!-- uncomment this when we've implemented emptyBorder + + <emptyBorder top="20" left="20" bottom="20" right="20" /> +--> + <borderLayout> + <borderAlign align="west"> + <vbox> + <label text="Name:"/> + <textField var="nameField" text="James Bond"/> + + <label text="Favourite Color:"/> + <textField var="colorField" text="#007007"/> + + <label text="Picture URL::"/> + <textField var="pictureField" text="http://www.ianfleming.org/007news/images3/c2002_pierce1.jpg"/> + + <label text="Choose template::"/> + <comboBox var="templateField"/> + ${templateField.addItem('template1.jelly')} + ${templateField.addItem('template2.jelly')} + + <label text="Add a Hobby:"/> + <textField var="hobbyField"/> + + <button> + <action name="Add >>>"> + ${hobbyModel.addElement(hobbyField.text)} + </action> + </button> + </vbox> + </borderAlign> + + <borderAlign align="east"> + <scrollPane> + <j:useBean class="javax.swing.DefaultListModel" var="hobbyModel"/> + <list model="${hobbyModel}"/> + ${hobbyModel.addElement('Killing bad guys')} + ${hobbyModel.addElement('Wrecking cars')} + ${hobbyModel.addElement('Eating jelly')} + </scrollPane> + </borderAlign> + + <borderAlign align="south"> + <button action="${createPageAction}"/> + </borderAlign> + </borderLayout> + </panel> + </frame> + + ${frame.show()} + +</j:jelly> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]