-
1. Re: empty page parameter "from" doesn't work
dan.j.allen Jun 10, 2008 3:43 AM (in response to newion)There is a very specific use case for this. The
entityFrom
parameters are used to track navigation between related entities. For instance, if you clicked on a company, then clicked on an employee in the employee list on the company page, then this would parameter would be used to get you back to the company. It is not universal. -
2. Re: empty page parameter "from" doesn't work
dan.j.allen Jun 10, 2008 3:44 AM (in response to newion)[Edited version]
There is a very specific use case for this. The entityFrom parameters are used to track navigation between related entities. For instance, if you clicked on a company, then clicked on an employee in the employee list on the company page, then this parameter would be used to get you back to the company. It is not universal.
-
3. Re: empty page parameter "from" doesn't work
quaidbrown May 23, 2009 10:56 PM (in response to newion)So you're saying that the
entity
portion ofentityFrom
has to correspond to an entity name? I'm really confused about this feature.In Seam in Action, it calls them
Valueless page parameters
used to pass values around. I don't understand when the value is assigned to the valueless page parameter. When would it every not be empty? -
4. Re: empty page parameter "from" doesn't work
dan.j.allen May 24, 2009 8:55 PM (in response to newion)I'm saying that it begins as a query string parameter. So somewhere in the application you must see a URL like the following:
/EmployeeEdit.seam?employeeFrom=Company&...
In the EmployeeEdit.page.xml file (for instance) this request parameter is mapped into the page-scope using an anonymous page parameter (not valueless):
<param name="employeeFrom"/>
What that does is allow you to reference the value as a top-level context variable, #{employeeFrom}, and ensure that it survives through a postback. So when you save the employee, it will notice that employeeFrom got saved and redirect you to the company page rather than back to the list of employees.
So understand that this flow of redirecting the user based on this variable is something specific to seam-gen, while anonymous page parameters are the feature of Seam being utilized. In short, think of it as an alternative to hidden form fields.