Ok, I'm making progress solving the problem.
It turns out that you definitely do need to annotate the list in the backing
bean used to populate the <ice:dataTable> with @DataModel. If you don't, even
though IceFaces rendering components will see your line-item variable correctly
populated, the Seam <s:link> tag won't feed the value back into Seam.
Now my next complication...
Can you successfully nest <ice:dataTable>'s w/Seam?
Here's what I have so far:
Rendering xhtml:
| <ice:dataTable id="departments" width="100%" cellspacing="1"
| value="#{outer}" var="item"
| rowClasses="rowClass1,rowClass2">
| <ice:column>
| <s:link id="viewItem" value="#{item.name}"
action="#{mgrBean.selectItem(item)}"/>
|
| <ice:dataTable width="100%" cellspacing="1"
| value="#{inner}" var="bucket"
| rowClasses="rowClass1,rowClass2">
| <ice:column>
| <s:link id="viewBucket" value="#{bucket.name}"
action="#{mgrBean.selectBucket(bucket)}"/>
| </ice:column>
| </ice:dataTable>
| </ice:column>
| </ice:dataTable>
|
ManagerBean.java
| @Name("mgrBean")
| public class ManagerBean {
| ...
| @DataModel
| private List<Foo> list;
| ...
| @Create
| public void init() {
| // populate list
| }
|
| public String selectItem(Foo foo) {...}
| public String selectBucket(Bar bar) {...}
| }
|
Foo.java
| @Name("foo")
| public class Foo {
| @DataModel
| private List<Bar> buckets;
| ...
| }
|
So it might render something like this:
| ONE
| A
| B
| TWO
| C
| THREE
| D
| E
|
Here's what happens: The outer table is rendered and clicking on the s:link
elements for ONE, TWO, or THREE correctly passes the corresponding (non-null)
objects to the backing bean (calling selectItem()).
But clicking on A-E is still passing null to selectBucket() on the backing bean
(ManagerBean).
Has anyone nested these before? How about nesting non-IceFaces dataTables?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018276#4018276
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018276
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user