You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by tamseo <ta...@key-planning.co.jp> on 2007/06/22 05:21:13 UTC

Re: T5 Loop

Hi Anjana Gopinath

I'm having the same problem. Did you find the solution for it
Any one know how to fix it. It's very urgent for my project

Thanks

Tam


Anjana Gopinath-2 wrote:
> 
> Howard,
> 
> Thanks a lot for responding. I tried setting the volatile="true" for  
> the Loop component, but i still have the same issue. When i try  
> printing the first element of the ArrayList on the onSuccess method,  
> it still shows the old value.
> 
> Start.html
> ------------------------------------------------------------------------ 
> ----------------------
> 
> 
> 
> 
> 
> 
> --------------------------------------------------------------------
> 
> 
> Start.java
> ------------------
> public class Start
> {
> 	
> 	@Persist
> 	private ArrayList<String> values;
> 	
> 	
> 	private String value;
> 	
> 	public String getValue() {
> 		return value;
> 	}
> 
> 	public void setValue(String value) {
> 		this.value = value;
> 	}
> 
> 	@SetupRender
> 	public void fillValues()
> 	{
> 		System.out.println("fillvalues------------");
> 		 values = new ArrayList<String>();
> 		 values.add("test");
> 		 values.add("test1");
> 		this.setValues(values);
> 		
> 	}
> 
> 	public ArrayList<String> getValues() {
> 		return values;
> 	}
> 
> 	public void setValues(ArrayList<String> values) {
> 		this.values = values;
> 	}
> 	
> 	String onSuccess()
> 	{
> 		System.out.println(this.getValues().get(0));
> 		return null;
> 	}
> 	
> }
> 
> 
> 
> Anjana Gopinath
> True North Technology
> 
> 
> 
> 
> On Apr 5, 2007, at 10:18 AM, Howard Lewis Ship wrote:
> 
>> This should work, but it looks like you simplified your example.
>>
>> The Loop component records into the form (as hidden fields) the values
>> from its source parameter. When the form is submitted, it uses these
>> values, and ignores it source parameter.
>>
>> In the short term, you should be able to get the Loop and Form combo
>> to work by turning on the volatile parameter of the Loop.  In the long
>> run, you should provide a PrimaryKeyEncoder to the Loop, to guide it
>> in how to serialize the dynamic data into the Form.
>>
>> On 4/5/07, Anjana Gopinath <an...@truenorth1.com> wrote:
>>> Hi,
>>>
>>> I am trying to iterate over a list and display the values in a
>>> textfield. User can edit these values and i need to save these back
>>> to the list. I am able to display all the values, but the values are
>>> not getting updated when user saves them.
>>>
>>>   
>>>         
>>>                 
>>>
>>>         
>>>         
>>> 
>>>
>>> Is this possible ? i searched in the mailing lists, but couldnt find
>>> any information.
>>> Thanks
>>>
>>> Anjana Gopinath
>>> True North Technology
>>>
>>>
>>>
>>>
>>>
>>
>>
>> -- 
>> Howard M. Lewis Ship
>> TWD Consulting, Inc.
>> Independent J2EE / Open-Source Java Consultant
>> Creator and PMC Chair, Apache Tapestry
>> Creator, Apache HiveMind
>>
>> Professional Tapestry training, mentoring, support
>> and project work.  http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5-Loop-tf3531856.html#a11245636
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org