struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From damuchinni <damuchi...@gmail.com>
Subject Re: how to check values of bean is modified in a form
Date Tue, 25 Aug 2009 06:10:42 GMT

I appricate for ur suggestion, thanks a lot.

but 

This type of approach will use only if a form have one or two parameters ,
but if ofrm have more than 20 parameters and like that there 20 to 30 forms
then, it will become redendunt to write such check mehtods for every form
parameters.

so Please can any one provide me better approach.

Thanks 
Dam

Chris Pratt wrote:
> 
> Normally, it's just easiest to update all the values and if they haven't
> changed, no harm, no foul.  But if you need to, you can put a check in the
> parameter mutators of the action.  Something like:
> 
> private Bean bean;
> 
> public void setName (String name) {
>   if(!name.equals(bean.getName())) {
>     bean.setModified(true);
>   }
> }
> 
> (*Chris*)
> 
> On Mon, Aug 24, 2009 at 7:43 PM, damuchinni <damuchinni@gmail.com> wrote:
> 
>>
>> Hi ,
>>
>> is there any predefined method for checking whether bean value is
>> modified
>> with previous value.
>>
>> Please help me.
>>
>> need to know in which version it is available
>>
>> Thanks
>>
>> Dam
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-check-values-of-bean-is-modified-in-a-form-tp25126457p25126457.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-check-values-of-bean-is-modified-in-a-form-tp25126457p25128901.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message