In CompositePanel expose a getter for your texbox and then invoke
getValue() on it?
Best regards,
Alfredo
On Sat, Apr 14, 2012 at 10:17 AM, tong123123 tong123...@gmail.com wrote:
as shown in the attached image, if I want to access the value of the
textbox with value value2 (the textbox in
Store your widgets in fields and add getter/setter methods so you can
access their data.
Also in your ClickHandler instead of:
((HATestPanel)((Button)
event.getSource()).getParent()).add(compositePanel);
you can simply do
add(compositePanel) or HATextPanel.this.add(compositePanel) if you
I think you mean add a getter and setter in CompositePanel, but the problem
is how to access it in HATestPanel?
as I don't know the variable name of each CompositePanel.
just like I click the button three times, then what is the variaible name
of these 3 compositePanel? although in each click
Store them in a separate list or iterate through all child widgets of your
HATestPanel using FlowPanel.getWidgetCount() and FlowPanel.getWidget(int
index). For each widget check if its a CompositePanel, cast it and call its
getter to get the value.
Am Samstag, 14. April 2012 17:06:08 UTC+2
On Saturday, April 14, 2012 5:13:39 PM UTC+2, Jens wrote:
Store them in a separate list or iterate through all child widgets of your
HATestPanel using FlowPanel.getWidgetCount() and FlowPanel.getWidget(int
index). For each widget check if its a CompositePanel, cast it and call its
getter
Sorry, I cannot catch your idea, in my clickhandler, the variable name is
compositePanel for each click, and then add to the flowpanel, but if I
press the add button three time and then outside the add button, how to
refer the name of these three compositePanel?
Thomas Broyeræ–¼
thanks, now my implementation is
public class HATestPanel extends FlowPanel{
Button btnAdd = new Button(Add);
Button btnListWidget = new Button(submit);
public void onLoad(){
this.add(btnAdd);
this.add(btnListWidget);
btnAdd.addClickHandler(new ClickHandler(){
But there is still some problem, if I want to add a delete button after
each row, is it very difficult?Or the easier method is add a checkbox
before the listbox in class CompositePanel and then add a delete button
(one and only one for the HATestPanel, not per row) to the HATestPanel?