Itay,

Link can be used with an anchor or a button (in fact, it can be used with
"any element that supports the onclick javascript event handler").

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 



itayh wrote:
> 
> Hi Timo,
> 
> Changing it to link solve the problem, but created a new one. It changes
> the look and feel of my page (since I am using buttons for save and cancel
> in my site).
> 
> Thank in advance,
>   Itay
> 
> 
> Timo Rantalaiho wrote:
>> 
>> On Tue, 28 Oct 2008, itayh wrote:
>>> I have a page that contain a hidden form. When the user press on "Add
>>> Item"
>>> or "Edit Item" then I set the visability of the form to true and the
>>> user
>>> can add details and the OK button save the data and set the visability
>>> of
>>> the form to false.
>>> The problem is if the user press on cancel. I need to set
>>> setDefaultFormProcessing(false) for the cancel button (since I don't
>>> want to
>>> do validation checks) but It cause the next problem:
>>> After the cancel press next time I press the "Add Item" or "Edit Item"
>>> the
>>> data that I see is the old data (The one I press cancel on)
>>> Changing setDefaultFormProcessing(true) for the cancel fix that problem.
>> 
>> Maybe you could change the cancel button
>> 
>>> addItemForm.add(new Button("cancel", new Model("Cancel")) {
>>>     public void onSubmit() {
>>>     onCanceItem();
>>>     }
>>> }.setDefaultFormProcessing(false));
>> 
>> to be a Link in Wicket? That way it would definitely not
>> submit any form data to the server, so nothing should be
>> stored in between requests.
>> 
>> Best wishes,
>> Timo
>> 
>> -- 
>> Timo Rantalaiho           
>> Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/problem-with-PropertyModel-and-setDefaultFormProcessing%28false%29-for-button-tp20209348p20405449.html
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