pnorman4,
Here's the scoop... for Seam to pass these components correctly in s:link
Gavin said they need to be derived from DataModel (JSF class). Using the
@DataModel annotation works on the outer table's data but not the inner
tables', so you need to try to create them w/new() as DataModel instances.
Remember that Seam juiced EL to allow parameter passing to methods, such as in
s:link, which JSF doesn't currently support, and it appears from the code that
non-DataModel objects are not passed (null is passed instead).
So far I haven't fixed this particular problem, but I did find a work-around.
In my <s:link> elements I can include a <f:param> element that passes an id I
can use to find the object I wanted to pass in the first place. If your
experience is like mine your can render/access everything you need in the xhtml
but you just can't pass values to your backing objects in s:link, right?
Won't win awards for sexiness but it works fine. In my project the code
generated by seam-gen produced data tables that used this <s:link>/<f:param>
partnership.
ps. Here's another really cleaver/ugly hack to get around the parameter-passing
limitations: use a "bastard" Map implementation. Standard EL lets you access
#{myNamedObj.map[foo]} where foo is your object you want passed. Supposedly
the map does a simple retrieval, but your bastard Map can override the get()
method and do any blessed thing it wants. The magic is that your actual object
got passed in! Of course you're trampling all over the semantics of what the
Map class is supposed to do. I didn't say it was a good idea...but it works
just fine.
Greg
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019428#4019428
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019428
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user