well this is easy dude.
Onblur or onchange over the textbox that serves as an input, you catch that
event and parse the input so you can get the desired number.
after that you choose in which panel/parent node you want to create those
textboxes and accordingly in your listener you can do :
for(int i=0; i < number; i++)
parent.add(new TextBox());

if you want to have names for your textboxes then inside your loop you can
do myTextBox.setName("myName"+i);

On Tue, Mar 23, 2010 at 5:04 PM, Jochen Schnaidt <j.schna...@t-online.de>wrote:

> Hi,
> I have a question about coding dynamic parts with GWT. I already
> searched for an answer, but didn’t find something which could help me.
> May be I have the wrong keywords? I don’t know…
>
> So, the problem: My concept is that my application reads a integer
> from a TextBox after the user wrote it in there e.g. 3 and then
> creates 3 new TextBoxes.
>
> I read the 3 no problems and have it in a variable but now I want to
> add the TextBoxes. In a scripting language I can build new objects and
> give a “dummyname” + digit as name to it and use it normal but in Java
> I can’t modify my variable’s name. So I need another method.
>
> I tried to make something like an array of TextBox but it didn’t work
> out.
>
> So please help me with this. I don’t get it on my own. Thanks a lot.
>
> Greetings Jochen
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to