-
1. Re: DataModelSelection and components.xml
smokingapipe Feb 8, 2007 10:10 PM (in response to smokingapipe)So instead of using DataModel and DataModelSelection, I saw that this is being used with the idea of using a RequestParameter and a param in the link. I tried that and it works nicely. Is this going to be the future model here, as a replacement for the DataModel / DataModelSelection thing? In some ways using the entity ID as a param is a little more clear to me, but that may be because it's familiar from the "old days" (Servlets, JSP, PHP, etc) of the web.
-
2. Re: DataModelSelection and components.xml
gavin.king Feb 8, 2007 10:47 PM (in response to smokingapipe)This is what I would use most of the time.
-
3. Re: DataModelSelection and components.xml
gavin.king Feb 8, 2007 10:48 PM (in response to smokingapipe)Well, actually I would use a page parameter instead of @RequestParameter.
-
4. Re: DataModelSelection and components.xml
vk101 Feb 14, 2007 12:03 AM (in response to smokingapipe)I'm stuck on this same issue, but am getting the following error:
value="#{factoryName}": Cannot get value for expression '#{entityQueryName.resultList}'
<framework:entity-query name="entityQueryName" ejbql="..." /> <factory name="factoryName" value="#{entityQueryName.resultList}"/>
Why is this happening, and how do I solve it? -
5. Re: DataModelSelection and components.xml
vk101 Feb 14, 2007 12:31 AM (in response to smokingapipe)I guess it was because I needed to add a entity-manager="em" attribute to the framework:entity-query because that's what my core:managed-persistence-context is, but that gave the following exception on deployment:
Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.IllegalArgumentException: No converter for type: javax.persistence.EntityManager
-
6. Re: DataModelSelection and components.xml
gavin.king Feb 14, 2007 12:56 AM (in response to smokingapipe)entity-manager="#{em}"
I'm pretty certain that is discussed in the documentation. -
7. Re: DataModelSelection and components.xml
vk101 Feb 14, 2007 1:05 PM (in response to smokingapipe)That works, thanks.
The value attribute of my dataTable is "#{entityQueryName.resultList}". How do I get the rowIndex? I tried using #{entityQueryName.resultList.rowIndex} like I used to do before, but it gives a NumberFormatException wrapped in something else.
If I'm using #{entityQueryName.resultList} as the value of my dataTable, then is the factory "factoryName" in my earlier post still necessary? Does this do away with factories in the case of dataTables, or should my dataTable's value be "factoryName", which points to "entityQueryName.resultList"...or are these interchangeable? -
8. Re: DataModelSelection and components.xml
vk101 Feb 14, 2007 8:08 PM (in response to smokingapipe)Any word on how to get the rowIndex from an EntityQuery or it's resultList?
-
9. Re: DataModelSelection and components.xml
gavin.king Feb 14, 2007 9:31 PM (in response to smokingapipe)entityQuery.dataModel.rowIndex
But of course you have to actually be *using* the dataModel and not just the resultList. -
10. Re: DataModelSelection and components.xml
vk101 Feb 17, 2007 10:22 PM (in response to smokingapipe)How can I get the row index when I'm using entityquery.resultList?