-
1. Re: How to build action parameter expression for s:button wi
matt.drees Aug 10, 2007 12:00 AM (in response to lpmon)You usually have to use a datamodel to back your dataTable. Look at the Booking example for how to set it up right.
-
2. Re: How to build action parameter expression for s:button wi
lpmon Aug 10, 2007 9:52 AM (in response to lpmon)Thanks but my issue has nothing to do with the data model. I am entity beans successfully. It is this one specific scenario that is Seam + el related that I am trying to figure out.
-
3. Re: How to build action parameter expression for s:button wi
asavitsky Aug 10, 2007 11:54 AM (in response to lpmon)You should be able to make it working without using the data model, or at least I was able to. Try placing the trackList (it's an EntityQuery, right?) inside a long-running conversation, as it might be that, by the time the playMediaId() is called, the trackList is already expired, so track.id would evaluate to null.
Then again, it's all pure guesswork, it would help to see more configuration than that... -
4. Re: How to build action parameter expression for s:button wi
pmuir Aug 10, 2007 12:02 PM (in response to lpmon)As Matt says try using #{trackList.dataModel} - getting EL extension working right in a datatable can be tricky.
-
5. Re: How to build action parameter expression for s:button wi
lpmon Aug 10, 2007 2:28 PM (in response to lpmon)Thanks for the help. I will look at a possible solution with @DataModel and @DataModelSelection.
FYI: Example 1.11 in Seam reference 1.2.1.GA is relevant to @DataModel
My apologies. I am new to Seam and misunderstood what you meant by data model. I thought you guys were referring to my database. To help other newbies it will be more clear if one uses @DataModel in a post to indicate it is the Seam annotation. -
6. Re: How to build action parameter expression for s:button wi
pmuir Aug 10, 2007 2:35 PM (in response to lpmon)When we say data model we are referring to the JSF DataModel. @DataModel is only one way of getting it, another is the #{entityQuery.dataModel}.
-
7. Re: How to build action parameter expression for s:button wi
lpmon Aug 13, 2007 1:24 PM (in response to lpmon)Thanks all. I got this working.
Remember: The value= attribute on the dataTable should be the name used for the @Factory annotation. In the example below 'theList'
In session bean:
@Factory("theList")
public void loadList() { some code to load it }
In the page:
<h:dataTable id="testList"
var="listItem"
value="#{theList}" -
8. Re: How to build action parameter expression for s:button wi
lpmon Aug 13, 2007 1:55 PM (in response to lpmon)Heads Up:
s:button - always plays first item from list (must be a bug)
h:commandButton - plays selected/clicked item (works properly)
where s is Seam taglib