[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-1911) s:link, s:button : Support propagation of selected DataModel row also for Trinidad tr:table
Wolfgang Schwendt (JIRA)
jira-events at lists.jboss.org
Sun Sep 16 23:51:10 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1911?page=all ]
Wolfgang Schwendt closed JBSEAM-1911.
Please ignore this Trinidad integration issue for now, even though a good integration with the leading JSF component suites and thus also the Trinidad components remains of course desirable.
Although my submitted patch leads to the inclusion of the "dataModelSelection" request parameter to URLs generated by
the <s:button> or <s:link> control when these controls are embedded into a Trinidad <tr:table>, it reveals other complicated problems in combination with the org.jboss.seam.trinidad.SeamCollectionModel, org.jboss.seam.trinidad.TrinidadDataModels and EntityQueries of the Seam CRUD framework.
After analyzing the code of org.jboss.seam.trinidad.SeamCollectionModel, UISeamCommandBase, org.jboss.seam.ui.component.html.HtmlSelection etc., I reached the conclusion that from an app design standpoint, it's probably not the best solution anyway to use an s:button or s:link (and thus a non-faces rather than a faces request!) for submission of the dataModelSelection.
What's more, in many (or even most?) cases when an <s:link> or <s:button> is embedded into a DataTable, the addition of the "dataModelSelection" request parameter is actually not needed. Seam renders the dataModelSelection request parameter by default; there is unfortunately no way to specify that the addition of this request parameter should be omitted in order to produce cleaner request URLs. In fact, it would make sense and be highly desirable not to add the dataModelSelection request parameter by default, and if the framework user wants a data model propagation for a specific instance of an s:link or s:button control, he would explicitly have to specify that. For example, we could introduce an attribute to a the <s:link> element such as <s:link name="..." value="..." dataModelSelectionPropagation="true"/> to specify that the generated request URL should contain a request parameter for the data model selection propagation, otherwise no request parameter for the data model selection would be rendered.
I'll therefore close this case for now, given that it could be easily reopened.
> s:link, s:button : Support propagation of selected DataModel row also for Trinidad tr:table
> Key: JBSEAM-1911
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1911
> Project: JBoss Seam
> Issue Type: Feature Request
> Affects Versions: 2.0.0.BETA1
> Environment: CVS based Seam as of 2007/Sep/07
> Reporter: Wolfgang Schwendt
> Assigned To: Pete Muir
> Priority: Minor
> Attachments: UISeamCommandBase.java, UISeamCommandBase.patch.txt
> The <s:button> and <s:link> controls propagate the selected row of a DataModel via a request parameter named "dataModelSelection". In order to determine which row was selected, method getSelection() of org.jboss.seam.ui.component.UISeamCommandBase tries to find an enclosing UIData component. If the enclosing DataTable is a Trinidad <tr:table>, however, it doesn't get found because the UIComponent class (org.apache.myfaces.trinidad.component.core.data.CoreTable ) does not extend javax.faces.component.UIData. Consequently, when an <s:button> or <s:link> is placed within a <tr:table>, the DataModel selection is not propagated.
> It would be nice if the <s:button> and <s:link> controls could also support the Trinidad <tr:table>, as far as propagation of the DataModel selection is concerned.
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues