This content has been marked as final.
Show 5 replies
-
1. Re: DataModel in two SFSB issues (regression)
pmuir Oct 11, 2007 11:11 AM (in response to lcoetzee)You were using unintentional behaviour in Seam. I fixed this properly a while ago.
What you need to do is inject the values in the second bean:@Stateful @Name("sectionManagementBean") public class SectionManagementBean implements SectionManagement { @In("#{sections.wrappedData}") private List<Section> sections; @In("#{sections.rowData}") private int selectedSectionNr; . . }
-
2. Re: DataModel in two SFSB issues (regression)
lcoetzee Oct 11, 2007 11:29 AM (in response to lcoetzee)Great stuff. Thanks Pete.
(I will have to update my code in a few places where I have used this behavior, but not a big problem)
A quick test showed that it needs to be :@In("#{sections.wrappedData}") private List<Section> sections; @In("#{sections.rowData}") @Out(required = false, scope = ScopeType.CONVERSATION) private Section section;
and seems I dont need:section = sections.get(selectedSectionNr);
anymore
Thanks
L -
3. Re: DataModel in two SFSB issues (regression)
lcoetzee Oct 11, 2007 11:51 AM (in response to lcoetzee)One question regarding:
@In("#{sections.rowData}") @Out(required = false, scope = ScopeType.CONVERSATION) private Section section;
Is there a way that one can say .. required=false using the above annotation. At this point I get an exception when I try to use execute another method in the sectionManagementBean (without me actually choosing an element from the datamodel).
handling uncaught exception javax.servlet.ServletException: #{sectionManagementBean.manageSections}: javax.ejb.EJBTransactionRolledbackException: Error reading 'rowData' on type org.jboss.seam.jsf.ListDataModel
Thanks
L -
4. Re: DataModel in two SFSB issues (regression)
pmuir Oct 11, 2007 4:37 PM (in response to lcoetzee)@In(value="...", required=false) - value is the "defualt" attribute for an annotation
-
5. Re: DataModel in two SFSB issues (regression)
lcoetzee Oct 12, 2007 2:01 AM (in response to lcoetzee)Thanks Pete... my Eclipse code completetion, combined with the "default value" tripped me up a bit.
Thanks
L