I would like to find a better way to do that ... if it is possible ...
Because I would have the same probleme with all my beans (Hibernate
entities).

If I want to render an entity bean E in my view (with 4 or 5 properties,
nested beans or not), and the user updates 2 properties and submits the
form, I get E with the 2 updated properties but the others are set to null.
So I can not merge my udpated entity (in my Hibernate Dao) ... 

Is there a solution to avoid that ? Perhaps by using interceptors like
Preparable or ModelDriven ?


Igor Vlasov wrote:
> 
> I think you must put the ID's in hidden fields and then they will fill up
> with id's from your collection on jsp page
> 
> In save method  wou will analyse the recieved data.
> 
> 
> kaouki wrote:
>> 
>> Hi,
>> I get this bean in my action in order to modify it in my jsp:
>> Catalogue {
>> Long id;
>> String title;
>> String description;
>> Collection<Produit> produits
>> }
>> In this jsp, I have two fieds: title and description, and a table of
>> Produit with checkboxes.
>> These ones enable the user to remove the products from the catalogue.
>> 
>> In my save action, I get the catalogue (property of the action) and a
>> Long[] (the id of the checked products).
>> The problem is that the Products Collection of the Catalogue and its id
>> are null.
>> 
>> So, if I want update some attributes of my bean, I have to put the bean
>> in Session ? or all the unchanged attributes in hidden fields ?
>> 
>> I'm grateful for any input on the matter. Cheers.
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Problem-while-retrieving-data-from-JSP-tf4691128.html#a13426242
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to