-
1. Re: DataModelSelection not updated
hispeedsurfer Apr 11, 2007 3:57 AM (in response to hispeedsurfer)Helllo,
no idea why the selected datamodel not updated? Only the sequence from whole table are existent in reduced table.
Thanks
Andi -
2. Re: DataModelSelection not updated
pmuir Apr 11, 2007 8:08 AM (in response to hispeedsurfer)Try using page parameters or the seam el enhancement instead
-
3. Re: DataModelSelection not updated
hispeedsurfer Apr 12, 2007 8:57 AM (in response to hispeedsurfer)Hi Pete,
I don't know what you mean. Neither page parameters nor el enhancement should be used for my problem.
First time I load a table with all entries. When I select a row, the correspondending entity is displayed on the bottom of the page.
Then I use search to reduce the table with this one<a:region id="searchRegion" renderRegionOnly="false"> <h:inputText id="searchString" value="#{specialreleaselist.searchString}" style="width: 165px;"> <a:support event="onkeyup" actionListener="#{specialreleaselist.find}" reRender="searchResults, lowerform" requestDelay="1" /> </h:inputText> </a:region><!-- End searchRegion -->
A few entries are display now, but when I select on of these (i.e. the first one) the displayed entity is this one from whole table of the first load.
Why DataModelSelection not updated on search result table? There should be a possibility to refresh the DataModelSelection!
Have no idea to solve this with el or page parameters
Thanks -
4. Re: DataModelSelection not updated
pmuir Apr 12, 2007 9:19 AM (in response to hispeedsurfer)Actually, imo, page parameters (or the el enhancement) are the best way to do an entity selection from a table - the @DataModel/@DataModelSelection stuff I don't use anymore.
Take a look at the booking example for how to do it with EL enhancement, or at a seam-gen'd app or the reference manual for how to use page parameters. -
5. Re: DataModelSelection not updated
hispeedsurfer Apr 13, 2007 10:25 AM (in response to hispeedsurfer)Hi Pete,
thank you for your suggestion. I use now el enhancement and it works.
Bye
Andi -
6. Re: DataModelSelection not updated
delphi'sghost Apr 14, 2007 1:02 AM (in response to hispeedsurfer)What is this El Enhancement that you speak of?
When you say page parameters, I assume you mean passing the Id of the object to be edited from the search page to the edit page as a parameter of the URL..i.e. editperson.xhtml?PersonId=123 ?
I've been thinking about the issue of moving objects from page to page recently, and I realized that Seam gives you multiple ways of doing it.
I'm trying to find a way where we can be consistent that won't trip us up down the line. Since the different methods are all easy give or take a few lines of code, page parameters offers the advantage of bookmarkable URLs.
What might be nice to see is some kind of VERY simple crud app that is in pure seam (as opposed to the framework stuff) that includes the different methods of passing objects, or at least indicates some kind of best practices. However, I know how busy you guys are. -
7. Re: DataModelSelection not updated
hispeedsurfer Apr 14, 2007 1:39 AM (in response to hispeedsurfer)You can find on Seam docs what el enhancement is.
Look at
http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/elenhancements.html
page parameters are also descriped there
http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/events.html#d0e3803 -
8. Re: DataModelSelection not updated
delphi'sghost Apr 14, 2007 8:06 PM (in response to hispeedsurfer)Ah, OK, thats the EL enhancement, I had seen it, just didn't realize that was what it was called.
My only problem with the el enhancements is using it in pages.xml since in order to refer to it as an outcome, you need to include the whole expression, including the variable name i.e.HotelBooking.selectHotel(hot)
which means if you change the iterator variable name in the jsf page you break your navigation. I think I'll stick with the parameters, especially since it gives you bookmarkable links.