I realized the solution with the actionListener.
This are short snapshots of the solution:
I need the parameter as input parameter for a spring subflow with the
following definition:
<subflow-state flow="describeTable-flow" id="describeTable">
<attribute-mapper>
<input-mapper>
<mapping
source="flowScope.tableSearchCriteria.selectedTable"
target="tableNameId" from="string" to="string"/>
</input-mapper>
</attribute-mapper>
<transition on="finish" to="displayTableList" />
</subflow-state>
The action Listener saves the parameter in the selectedTable Property:
public void selectTable(ActionEvent event) {
Object param =
((UIParameter)event.getComponent().getChildren().get(0)).getValue();
selectedTable = (String) param;
}
And the jsp page has the following structure:
<tc:column label="#{global.actions}">
<tc:form id="describeTableForm">
<tc:button
label="#{global.cmdDescribe}" action="describe"
actionListener="#{tableSearchCriteria.selectTable}">
<f:param name="tableNameId"
value="#{row}"/>
</tc:button>
</tc:form>
</tc:column>
Thanks for your help
regards
Leo
Volker Weber schrieb:
Hi Leonhard,
you need the value of the parameter in your action?
Implement your actionListener like this:
public void test(ActionEvent event) {
String value =
(String)ComponentUtil.findParameter(event.getComponent(),
"tableNameId");
...
}
Regards,
Volker
2007/8/1, Leonhard Holzer <[EMAIL PROTECTED]>:
Hello list,
I use spring webflow together with tobago 1.0.11 on java 1.4.
I have a sheet:
<tc:sheet
value="#{tableSearchCriteria.tableList}"
columns="100px;70px;70px;70px;*" var="row">
<tc:column label="#{global.tableName}">
<tc:out value="#{row}" />
</tc:column>
...
<tc:column label="#{global.actions}">
<tc:form id="describeTableForm">
<tc:button
label="#{global.cmdDescribe}" action="describe"
actionListener="#{tableSearchCriteria.test}">
<tc:attribute name="testTable"
value="test123"/>
<f:param name="tableNameId"
value="Test23"/>
</tc:button>
</tc:form>
</tc:column>
...
</tc:sheet>
but the parameter tableNameId is not transfered to the server.If I read
all request parameters in the actionListener:
FacesContext context = FacesContext.getCurrentInstance();
Map map = context.getExternalContext().getRequestMap();
Iterator iter = map.keySet().iterator();
while (iter.hasNext()) {
String key = (String) iter.next();
System.out.println("key: "+key+" -> "+map.get(key));
}
The parameter tableNameId is not part of the parameters. does anyone
have any suggestions?
regards
Leo
--
----------------------------------
Leonhard Holzer
ABusCom GmbH
Kapuzinerplatz 9
I 39031 Bruneck
Tel.: +39 0474 538 000
Fax.: +39 0474 538 000
mobil: +39 335 83 28 041
web: www.abuscom.com
----------------------------------