I don't know if you can use a map .  How would the second text field "know" 
where to put the value?

HTH,

Mark


-----Original Message-----
From: haipeng du [mailto:[EMAIL PROTECTED]
Sent: Mon 8/15/2005 5:08 PM
To: tapestry-user@jakarta.apache.org
Subject: value bining for "Foreach" component
 
I have the following html configuration:
                        
<span jwcid="@Foreach" source="ognl:properties" value="ognl:currentProperty">
     <tr width="100%">
       <td align="right" width="25%">
           <input type="text" style="width:100%" jwcid="@TextField"
value="ognl:currentProperty.name" />
        <td width="70%">
            <span jwcid="@Foreach" source="ognl:currentPropertyValues"
value="ognl:currentPropertyValue">
                <input type="text" style="width:100%" jwcid="@TextField"
value="ognl:currentPropertyValue" /><br>
             </span>
         </td>                                                                  
                                
     </tr>                                              
 </span>
ognl:propertyies is a list, currentProperty is a Map.
currentPropertyValues is a list which is in currentProperty.
Everything is good for display. But the values of
currentPropertyValues can not be bound back. What is wrong with my
code?

Part of java code in page file:
        public abstract List getProperties();
        public abstract void setProperties(List l);
        
        public abstract String getCurrentPropertyValue();
        public abstract void setCurrentPropertyValue(String s); 
        
        public abstract Map getCurrentProperty();
        public abstract void setCurrentProperty(Map m);
        
        
        public List getCurrentPropertyValues(){
                System.out.println(">>>>" + 
this.getCurrentProperty().get("jenaValues"));
                return (List) this.getCurrentProperty().get("jenaValues");
        }
                       
        public void setCurrentPropertyValues(List currentValues){
                System.out.println("set properties " + currentValues); // this 
one
is not called at all
                 this.getCurrentProperty().put("jenaValues", currentValues);
        }
-- 
Haipeng Du
Software Engineer
Comphealth, 
Salt Lake City

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to