[seam-commits] Seam SVN: r11908 - modules/remoting/trunk/examples/model/src/main/webapp.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Jan 4 07:33:46 EST 2010


Author: shane.bryzak at jboss.com
Date: 2010-01-04 07:33:46 -0500 (Mon, 04 Jan 2010)
New Revision: 11908

Added:
   modules/remoting/trunk/examples/model/src/main/webapp/style.css
Modified:
   modules/remoting/trunk/examples/model/src/main/webapp/model.html
Log:
updated example UI


Modified: modules/remoting/trunk/examples/model/src/main/webapp/model.html
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/model.html	2010-01-04 06:13:21 UTC (rev 11907)
+++ modules/remoting/trunk/examples/model/src/main/webapp/model.html	2010-01-04 12:33:46 UTC (rev 11908)
@@ -4,6 +4,7 @@
 <head>
 	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 	<title>Seam Remoting - Model Example</title>
+	<link href="style.css" rel="stylesheet" type="text/css"/>
 	<link href="tree.css" rel="stylesheet" type="text/css"/>
 </head>
 
@@ -20,6 +21,14 @@
     Seam.debug = true;
     
     var model = null;
+    
+    function fetch() {
+      alert("fetch");
+    }
+    
+    function apply() {
+      alert("apply");
+    }
   
     function loadPerson() {
       var personId = document.getElementById("personId").value;
@@ -70,8 +79,71 @@
     def.add(new xw.controls.TreeNode("zzz", true));
 
     // ]]>
-  </script> 
+  </script>   
   
+  <div class="section">
+    <div class="sectionHeader">Fetch model action</div>
+    <div class="sectionForm">
+      <div class="formRow">
+        <label for="fetchActionBean">Bean</label>
+        <input type="text" id="fetchActionBean" value="org.jboss.seam.remoting.example.model.PersonAction"/>
+      </div>
+      <div class="formRow">
+        <label for="fetchActionQualifiers">Qualifiers</label>
+        <input type="text" id="fetchActionQualifiers"/>
+      </div>
+      <div class="formRow">
+        <label for="fetchActionMethod">Method</label>
+        <input type="text" id="fetchActionMethod" value="editPerson"/>
+      </div>
+      <div class="formRow">
+        <label for="fetchActionParams">Params</label>
+        <input type="text" id="fetchActionParams" value="1"/>
+      </div>                 
+    </div>
+    
+    <div class="sectionCommand">
+      <button onclick="javascript:fetch()">Fetch</button>
+    </div>        
+    
+    <br class="clear"/>
+  </div>
+  
+  <div class="section">
+    <div class="sectionHeader">Apply model action</div>
+    <div class="sectionForm">
+      <div class="formRow">
+        <label for="applyActionBean">Bean</label>
+        <input type="text" id="applyActionBean" value="org.jboss.seam.remoting.example.model.PersonAction"/>
+      </div>
+      <div class="formRow">
+        <label for="applyActionQualifiers">Qualifiers</label>
+        <input type="text" id="applyActionQualifiers"/>
+      </div>
+      <div class="formRow">
+        <label for="applyActionMethod">Method</label>
+        <input type="text" id="applyActionMethod" value="savePerson"/>
+      </div>
+      <div class="formRow">
+        <label for="applyActionParams">Params</label>
+        <input type="text" id="applyActionParams"/>
+      </div>          
+    </div>
+    
+    <div class="sectionCommand">
+      <button onclick="javascript:fetch()">Apply</button>
+    </div> 
+    
+    <br class="clear"/>
+  </div>
+  
+  <div class="section">
+    <div class="sectionHeader">Model values</div>
+    
+    <br class="clear"/>    
+  </div>
+  
+  
   <label for="personId">Person ID</label><input type="text" id="personId" value="1"/>
   
   <button onclick="javascript:loadPerson()">Load person</button> 
@@ -79,7 +151,7 @@
   <button onclick="javascript:modifyPerson()">Modify person</button>
   <button onclick="javascript:applyUpdates()">Apply updates</button>
 
-  <div id="tree" style="position:absolute;left:10;width:300px;height:400px;border:1px solid #999999;overflow:auto"></div>
+  <div id="tree" style="position:absolute;left:10px;width:300px;height:400px;border:1px solid #999999;overflow:auto"></div>
 
   <script type="text/javascript">
     //<![CDATA[

Added: modules/remoting/trunk/examples/model/src/main/webapp/style.css
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/style.css	                        (rev 0)
+++ modules/remoting/trunk/examples/model/src/main/webapp/style.css	2010-01-04 12:33:46 UTC (rev 11908)
@@ -0,0 +1,50 @@
+body { 
+  background-color: #ffffff;
+  font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
+  font-size: 12px;
+  color: #663009;
+}
+
+.sectionHeader {
+  font-size: 12px;
+  font-weight: bold; 
+}
+
+div.section {
+  background-color: #eeeeee;
+  margin: 6px; 
+  padding: 4px;
+}
+
+div.sectionForm {
+  float: left;
+  width: 390px;
+  padding: 4px;
+  border-right: 1px solid #cccccc; 
+}
+
+div.sectionCommand {
+  float: left;
+  width: 120px;
+  padding: 4px; 
+}
+
+div.formRow {
+  padding: 2px 4px 2px 2px;  
+  clear: both;
+}
+
+div.formRow label {
+  float: left;
+  width: 70px; 
+  padding: 2px 2px 2px 2px;
+}
+
+div.formRow input[type='text'] {
+  width: 300px;
+}
+
+.clear {
+	clear: both;
+	font-size: 0px;
+}
\ No newline at end of file



More information about the seam-commits mailing list