• Post Reply Bookmark Topic Watch Topic
  • New Topic

EL Question  RSS feed

 
Bruce Riches
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone solve this?
I have an expression that looks like this: #{backingBean.someproperty[linkBean.arg1]} which causes an EL parsing error.
I've tried some variations such as: #{backingBean.someproperty[#{linkBean.arg1}]} and
#{backingBean[linkBean.arg1].someproperty}. These cause parsing errors also.
I've verified that both backingBean.someproperty and linkBean.arg1 have valid values.
These expressions in part implement a link as in <h:commandLink... on a master list which grabs the current datatable row and renders the row details on the next page - or at least it's supposed to!
What am i missing here?
Help appreciated.

>
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything obviously wrong with your first attempt, though maybe it's just too early in the morning for me. Could you show the commandLink that's using this expression?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bruce Riches wrote:
I have an expression that looks like this: #{backingBean.someproperty[linkBean.arg1]} which causes an EL parsing error.
This one is just valid.

Please post the error message. Please also tell a bit more about JSF implementation/version used as well as appserver implementation/version used.
 
Bruce Riches
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all your suggestions. I've finally resolved this issue and gotten 'JSF wiser' in the process. My link now looks like this:
<h:commandLink title="Show member detail"
value="#{memberInstance.fullName}"
action="#{memberBackingBean.getCurrentMemberRow}"
immediate="true" />
So, the backing bean method is called and gets the current row number by using the 'getRowData()' of the HtmlDataTable class.
The 'Member' instance is created, and set into an ArrayList.
That's pretty much it.
I sometimes think that JSF is overly complex and the learning curve is fairly steep, but it does get the job done.
Has anyone evaluated Wicket?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!