Hi Igor:

Yes the button/Link works but it still does not solve my issue. I have a
table where two of the columns have panels. One of the panels has a
textField and a radio choice and the other panel has the submit button. When
I hit submit I need the values in the textfield and in the choice. While the
textfield has a propertymodel this model is never updated when I type in the
field and I never get an updated value for it. I have tried 

ReuseIfModelsEqualStrategy strategy = new ReuseIfModelsEqualStrategy();
table.setItemReuseStrategy(strategy);
 and making sure my model has equals and hashcode implemented properly and I
have made sure that the table is not redrawn using the button/link combo so
I am not sure why the panel with the textfield never "sets" a value when I
type into the textfield?

Below is the code for the ListView that I use to populate the textfield and
choice in my panel. It contains the "amountfield" but when I edit the amount
"setAmount" is never called when I type values in the textfield.

        class OptionsListView extends ListView {
                private String amount="0.00";
                
                public OptionsListView(java.lang.String id,
                java.util.List list) {
                        super(id,list);
                }
                
                protected void populateItem(ListItem item)
                {
                        TextField amountField = new TextField("amount", new
PropertyModel(this,"amount"));
                        Radio radio = new 
Radio(workflowFrame_radioPanel_radioOption,
item.getModel());
                        item.add(radio);
                        
                        if (item.getIndex() == 0) {
                                choice.setModel(item.getModel());
                                item.add(amountField);
                        } else {
                                amountField.setVisible(false);
                                item.add(amountField);
                        }
                        
                        Label label = (Label)(item.getModel().getObject(this));
                        item.add(label);
                System.out.println("amountField " + amountField.getValue());
                }

                public String getAmount() {
                        System.out.println(amount);
                        return amount;
                }
                
                public void setAmount(String amount) {
                        this.amount = amount;
                        System.out.println("Setting amount " + amount);
                }
        };



igor.vaynberg wrote:
> 
> simply do this
> 
> <input type="button" wicket:id="button" value="foo"/>
> 
> add(new Link("button") { onclick() {...}});
> 
> Link is smart to figure out that it isnt attached to anchor tag and will
> generate an onclick attr.
> 
> -igor
> 
> 
> On 8/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> It's been awhile since I posted to this thread but I have been out sick
>> for about two weeks. I had a thread going titled "Updates within Panels
>> in
>> datatable" on the old list but I am posting to the new one so I don't
>> think the older messages will show.
>> Is there a way that I can have a button which has a java handler for an
>> onclick event but does not submit the page (redraw the table) I believe
>> that this would solve my problem. I cannot use the 1.3 beta since the
>> company I am working for doesn't want to use that yet.
>>
>> Thanks
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Updates-within-Panels-in-datatable-tf4274165.html#a12170198
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to