This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

assigning parameters at runtime  RSS feed

 
JP Estrada
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys. I'm trying to add a UIParameter to a commandLink at runtime. The commandLink works fine without adding the parameter. But when i add the parameter as one of the children of the commandLink, the commandLink doesn't work anymore. I click on it and nothing happens. Here's my code:

HtmlCommandLink link = (HtmlCommandLink)app.createComponent(HtmlCommandLink.COMPONENT_TYPE);
link.setId("link1");
HtmlOutputText out = (HtmlOutputText)app.createComponent(HtmlOutputText.COMPONENT_TYPE);
out.setValue("TEST");


UIParameter param = new UIParameter();
param.setName("currentPage");
param.setValue("some_value");

link.getChildren().add(out);
link.setActionExpression(method);
link.getChildren().add(param);


What is the correct way of adding parameters at runtime?
[ May 19, 2008: Message edited by: JP Estrada ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!