Hi.

I have a SFSB Seam component ShowItems which has:


  | @DataModel
  | private List<Item> items;
  |     
  | @DataModelSelection
  | @Out(required = false)
  | private Item selectedItem;
  | 

I display the items with a h:dataTable and when the user clicks on an item he's 
redirected to a itemDetails page where I have stuff like: 
#{selectedItem.name} #{selectedItem.description}
These show blank! as if selectedItem is null. But looking in the debugger I see 
that in fact it's not.

I added this method on the SFSB:

public String nothing() {
  |    return null;
  | }

and put a h:commandLink on the itemDetails page, with action=showItems.nothing. 
The page shows blank but after clicking on this link (which does nothing other 
than return to the same page) the selectedItem component is now visible to the 
page, like it has only now been outjected.


I found a workaround. If I add a getSelectedWebsite() method on the SFSB, then 
modify the page like this:

#{showItems.selectedItem.name} #{selectedItem.description} 

Both name and description appear! It seems the component is outjected only 
after it is read by the first call to getSelectedItem(). But it doesn't seem 
right to do.

Does anyone have any idea what's wrong here? Thank you.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3937353#3937353

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3937353


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to