Re: add a component (submitLink) multiple times?

2012-06-13 Thread Martin Grigorov
Hi,

Use a repeater like ListView or RepeatingView around them.

On Wed, Jun 13, 2012 at 8:23 PM, oliver.stef  wrote:
> How can I add a component (submitLink) multiple times?
>
> like this:
>
> List categories = Arrays.asList("English", "Japanese", );
>
> for (String str : language)
> {
>     form.add(new SubmitLink("Name",str)
>    {
>    @Override
>    public void onSubmit() { ...}
>   }
> }
>
> and HTML:
> #
>
>
> Any ideas?
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649939.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: add a component (submitLink) multiple times?

2012-06-13 Thread Michal Margiel
Hello,

No, your code is not correct.  You should use some kind of repeaters, like
ListView:

https://cwiki.apache.org/WICKET/listview-and-other-repeaters.html

2012/6/13 oliver.stef 

> How can I add a component (submitLink) multiple times?
>
> like this:
>
> List categories = Arrays.asList("English", "Japanese", );
>
> for (String str : language)
> {
> form.add(new SubmitLink("Name",str)
>{
>@Override
>public void onSubmit() { ...}
>   }
> }
>
> and HTML:
> #
>
>
> Any ideas?
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649939.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pozdrawiam/Best regards
Michał Margiel

http://www.confitura.pl (dawniej Javarsovia)
http://www.linkedin.com/in/MichalMargiel
http://www.margiel.eu


Re: add a component (submitLink) multiple times?

2012-06-13 Thread Thomas Götz
I don't know exactly what you are trying to do, but you could have a look at 
RepeatingView.

   -Tom


On 13.06.2012 at 19:23 oliver.stef wrote:

> How can I add a component (submitLink) multiple times? 
> 
> like this: 
> 
> List categories = Arrays.asList("English", "Japanese", );   
> 
> for (String str : language) 
> { 
> form.add(new SubmitLink("Name",str) 
>{ 
>@Override 
>public void onSubmit() { ...} 
>   } 
> } 
> 
> and HTML: 
> # 
> 
> 
> Any ideas? 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: add a component (submitLink) multiple times?

2012-06-13 Thread oliver.stef
How can I add a component (submitLink) multiple times? 

like this: 

List categories = Arrays.asList("English", "Japanese", );   

for (String str : language) 
{ 
 form.add(new SubmitLink("Name",str) 
{ 
@Override 
public void onSubmit() { ...} 
   } 
} 

and HTML: 
#   
  

Any ideas? 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649939.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: add a component (submitLink) multiple times?

2012-06-13 Thread oliver.stef
How can I add a component (submitLink) multiple times? 

like this: 

List categories = Arrays.asList("English", "Japanese", );   

for (String str : language) 
{ 
 form.add(new SubmitLink("Name",str) 
{ 
@Override 
public void onSubmit() { ...} 
   } 
} 

and HTML: 
#   
  

Any ideas? 

Thanks! 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649938.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org