I don't know exactly what you need it for, perhaps something like this could 
work:

instead of <input value="ognl:yourObject.value" .../>, you use <input 
value="ognl:value" .../>

public String getValue()
{
        return getYourObject().getValue();
}

// Called on form submit
public void setValue(String value)
{
        if (!value.equals(getYourObject().getValue))
        {
                // The submitted value is different from the current value
                // Doesn't necessarily mean this user changed it, might have 
been some other user
        }
        getYourObject().setValue(value);
}

On Monday 29 May 2006 16:25, Stephane Decleire wrote:
> Yes i could ...
> but it looks like an elephant gun just to keep the trac of an old value 
> that Tapestry has to know ... but where ? :-\
> 
> Peter Svensson wrote:
> 
> > Maybe you could store the old value in a state object ?  It's 
> > described in
> > chapter four of Enjoying Web Development with tapestry, and as it 
> > turns out
> > the first four chapters are freely downloadable from;
> >
> > http://agileskills2.org/EWDT/
> >
> > Then you can save the latest or last value in that object, which will
> > survive between pages (or user sessions) as you wish. You could even 
> > have a
> > queue which you could use for undo.
> >
> > Cheers,
> > PS
> >
> > On 5/29/06, Stephane Decleire <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Perhaps i took a wrong approach ...
> >> In fact, i need to apply specific code if a particular field of my form
> >> has been updated and not in the other case. So i need to compare the old
> >> to the new value of this field but i can't find a way to get the old
> >> value after the form has benn submitted ...
> >>
> >> Stephane Decleire wrote:
> >>
> >> > Hi all,
> >> >
> >> > I need to get the old value of a form field in the listener of this
> >> > form but i can't get this value before it's been updated with the data
> >> > submitted by the client ...
> >> > Any idea is welcome !
> >> >
> >>
> >> -- 
> >> Stéphane Decleire
> >>
> >> 05 56 57 99 20
> >> 06 63 78 69 06
> >>
> >>
> >>
> >
> 
> -- 
> Stéphane Decleire
> 
> 05 56 57 99 20
> 06 63 78 69 06
> 
> 

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

Reply via email to