Or you could make your models a lit more intelligent, making it
independent of the components. Both are good.
Eelco
On 11/26/05, Andrew Berman <[EMAIL PROTECTED]> wrote:
> Whoops, my method should be getInput not getValue....Sorry.
>
> Should be:
>
> public String getInput() {
> String val = super.getInput();
> if (val != null && val.trim().equals(""))
> return null;
>
> return val;
> }
>
>
>
> On 11/26/05, Andrew Berman <[EMAIL PROTECTED]> wrote:
> > There are a bunch of ways to do it, but I think the easiest way is to
> override getInput() and return null if you do not want the model updated
> with this component's value.
> >
> > For example,
> >
> > public String getValue() {
> > String val = super.getValue();
> > if (val != null && val.trim().equals(""))
> > return null;
> >
> > return val;
> > }
> >
> > --Andrew
> >
> >
> >
> > On 11/26/05, Nick Heudecker <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I have an "edit user" page that allows the admin to update various
> > > details for a user, like email address, name, etc. The admin can also
> > > change the password for a user, but I want to make that optional, like
> > > the password is only updated if the admin actually types a new
> > > password, otherwise the User object backing the Form isn't updated
> > > with a blank password.
> > >
> > > Is there a suggested way to go about this? Do I end up overriding
> > > getModelValue() or setModelValue()?
> > >
> > > Thanks for your time.
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > > for problems? Stop! Download the new AJAX search engine that makes
> > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
>
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user