Re: Component with a persist attribute inside a loop

2009-03-27 Thread Otho
You really don't need to @Persist anything here. Joachim was right with the context parameter. If you change your component class and template along the following lines it works fine: Component class: public class Test { @Parameter @Property private String usage; @Property pr

Re: Component with a persist attribute inside a loop

2009-03-26 Thread ahingsaka samsenesena
Thanks for the answer, and sorry for the duplicated mails (our mail server has problems), This solution works well, but I really can't see why the behaviour is different : the actionlink is the same in the 2 situations explained below. Or does it simply mean that we should not use persisting attr

Re: Component with a persist attribute inside a loop

2009-03-26 Thread ahingsaka samsenesena
I have tried with these modifications but now, when i click on the links, the value displayed is always "pix". Le jeudi 26 mars 2009 à 15:12 +0100, Otho a écrit : > a) You don't need to copy the value from the parameter to the property. > b) There is no need to persist it. > > @Parameter > @Prope

Re: Component with a persist attribute inside a loop

2009-03-26 Thread ahingsaka samsenesena
I have tried with your modifications but now, when i click on the links, the value displayed is always "pix". Le jeudi 26 mars 2009 à 15:12 +0100, Otho a écrit : > a) You don't need to copy the value from the parameter to the property. > b) There is no need to persist it. > > @Parameter > @Prope

Component with a persist attribute inside a loop

2009-03-26 Thread ahingsaka samsenesena
Hi, I'm trying to use my own component inside a loop and I have a problem when there is a "persist" annotation on attributes. I want to loop with my component named "test" in a page like this : The component contains a string attribute "usageValue" that will be displayed in the

Re: Component with a persist attribute inside a loop

2009-03-26 Thread Joachim Van der Auwera
You should pass the "usage" string as context parameter on the action link. The problem is that the url for each of the events in the loop are the same. Kind regards, Joachim ahingsaka samsenesena wrote: Hi, I'm trying to use my own component inside a loop and I have a problem when there is a

Re: Component with a persist attribute inside a loop

2009-03-26 Thread Otho
a) You don't need to copy the value from the parameter to the property. b) There is no need to persist it. @Parameter @Property private String usage; ${usage} 2009/3/26 ahingsaka samsenesena > Hi, > > I'm trying to use my own component inside a loop and I have a problem > when there i

Component with a persist attribute inside a loop

2009-03-26 Thread ahingsaka samsenesena
Hi, I'm trying to use my own component inside a loop and I have a problem when there is a "persist" annotation on attributes. I want to loop with my component named "test" in a page like this : The component contains a string attribute "usageValue" that will be displayed in the