Model update with Link

2007-10-11 Thread Mattijs Hoitink

hi,

i'm just starting to use wicket and i have a question regarding updating 
a model when a link is pressed. I will explain my situation.


I have a normal form, with a model attached to it and a button to submit 
it. There is also a link in the form who's only purpose is to enable or 
disable a field.
The problem is, when i  press the link to disable the field, all my data 
from the other fields is lost. It seems like wicket is loading a new 
form when i presse the link, because all the old data from the model is 
presented.


My question is: is it normal wicket loads the page again when a link is 
pressed? and if so, is there a way to update my model first?


--
Mattijs Hoitink
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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



Re: Model update with Link

2007-10-11 Thread Mattijs Hoitink
I already tried using a SubmitLink. The problem with that is user have 
to complete the whole form (or at least the required fields) before they 
can disable the field with the link. This is because validate() is 
called when the form is submitted, and users receive a message they have 
to fill in the required fields.I want users to be able to disable the 
field even though they did not fill in all the (required) fields.


Secondly, when the form is submitted, the model is send to the database. 
I only want to send the model to the database when the user is 
completely finished with the form, and not when they want to disabled 
the second field of the form. But this can be solved by calling 
findSubmittingButton() in the onSubmit().



martinf wrote:

Maybe SubmitLink is your solution,

usage as an anonymous class could look like this:

add(new SubmitLink(lkjsdf, form) {
public void onSubmit() {
   //Do what you need to do here.
}
});

that way the browser will submit the form and send al the date in the input
fields.


Martin


Mattijs Hoitink wrote:
  

hi,

i'm just starting to use wicket and i have a question regarding updating
a model when a link is pressed. I will explain my situation.

I have a normal form, with a model attached to it and a button to submit
it. There is also a link in the form who's only purpose is to enable or
disable a field.
The problem is, when i  press the link to disable the field, all my data
from the other fields is lost. It seems like wicket is loading a new
form when i presse the link, because all the old data from the model is
presented.

My question is: is it normal wicket loads the page again when a link is
pressed? and if so, is there a way to update my model first?

--
Mattijs Hoitink
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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






  


--
Mattijs Hoitink
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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



yui examples

2007-09-24 Thread Mattijs Hoitink

hi all,

i just checked out  wicket-contrib-yui and wicket-contrib-yui-examples 
to do some testing.
When i ran maven on it, the projects wouldn't build because of some 
wrong dependencies in the pom.xml.
In a lot of places references are made to wicket 1.3.0-SNAPSHOT. But 
this doesn't exist in the maven repository.


Can anyone tell me if the yui examples are updated frequently or still 
running on an old version of wicket-contrib-yui. When i checked it out, 
the yui examples project wouldn't build either.


greets,

PS: is this the right mailing list to ask these questions?

--
Mattijs Hoitink
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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