[
http://jira.jboss.com/jira/browse/JBSEAM-1911?page=comments#action_12376022 ]
Wolfgang Schwendt commented on JBSEAM-1911:
-------------------------------------------
The patch reveals another problem which was not noticed before: In order to determine
which row is selected org.jboss.seam.ui.component.UISelection.getValue() looks up the
DataModel via Contexts.lookupInStatefulContexts(getDataModel()), where getDataModel()
yields the name of the DataModel. (The dataModel property of UISelection is set by
UISeamCommandBase.getSelection() ).
The problem occurs when the ValueExpression for the value property of the DataTable
control is an EL path expression with 2 or more parts, e.g. something like
#{baseObject.dataModel}. Then UISeamCommandBase.getSelection() simply takes
"baseObject.dataModel" as the name of the DataModel. Consequently the
DataModel is not found by the Context lookup in UISelection.getValue(), because to
successfully lookup the DataModel, UISelection.getValue() would actually have to evaluate
the ValueExpression for the value property of the DataTable control. And because the
DataModel is not found by UISelection.getValue(), the URL generated by an <s:link>
or <s:button> shows a request parameter "dataModelSelection" with an empty
value (dataModelSelection=)
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