accessing selected row data in an EL expression
664652Oct 10 2008 — edited Oct 14 2008Hi everyone,
I'm new to the JDeveloper/JHeadstart platforms. I have been fiddling with some prototypes of bits and pieces of a new application I want to build on this platform. I've come across a problem that I think should probably have a really simple solution, but I haven't had any luck figure out what that solution is, so maybe I'm wrong! ;)
Here's what I'm trying to do. I have one main view which has view links to two detail views. I have a group in my JHeadstart application definition that reflects the main group, and two detail groups under this group to correspond to the detail views. Each of those detail groups are also attributed to a detail group region. The detail groups are set to be on the "Same Page" as the main group, with "Same Page Display Position" as "Below Parent Group". I wish to show or hide one or the other of the detail group regions based on the "Type" column from the currently selected row in the main view's table.
For example, if the currently selected row in the main view table has Type "A" in that row, then I want the table in the detail group region for detail view A to be displayed. I need to write an EL expression in the "Rendered Expression" for the detail group region to compare the type on the currently selected row in the main view table to the corresponding type for that region.
I've tried at least 10-12 different expressions to try to accomplish this, but after all my various attempts, I really believe I ought to be able to accomplish this with one of the following expressions:
#{bindings.MainViewTable.currentRow.Type eq 'A'} or
#{bindings.MainViewIterator.currentRow.Type eq 'A'}
I say that I think these should work because when I run the application using this expression, I get the exception:
javax.faces.el.PropertyNotFoundException: Error getting property 'Type' from bean of type testapp.model.views.MainViewRowImpl
When I first saw this, I thought "Bingo - I'm on to something". I didn't have the MainViewRowImpl java file being generated, so I generated with accessors, and now I can go look at the MainViewRowImpl java file and see the public getType() accessor. However, after I remade and re-ran the project, I still get the same error.
Am I missing something easy here? It seems to me like I shouldn't be having this much difficulty looking up a piece of data from the currently selected row of a table in an EL expression, but then, I don't know much of anything about EL yet!