|
Sunday, September 03, 2006 |
I've added example #80 to my examples page illustrating a simple popup List of Values dialog for selecting a department for an employee using JSF and ADF Business Components. Examples like this are described in more detail in section 19.3.1 "How to Create Popup Dialogs" in the ADF Developer's Guide for Forms/4GL Developers.
8:43:34 AM
|
|
A customer wrote in to ask:
In a JSF page, using an <af:table> component, the current row selection works independently of the table paging display. That is, if the user scrolls to see the "Next 5", for example, the current row remains unchanged. How can I cause the first row shown in the new current page of the table to be set to be the current row automatically?
The simplest way to achieve this involves three steps:
- Edit the view object providing data for the <af:table>, visit the Tuning panel, and set its "Fill last page of rows when paging through rowset?" property to false/unchecked.
- Set the RangeChangeListener property of the table using the (...) button in the Property Inspector. This allows you to create a new JSF backing bean for the page and name its range change listener method. For example, you can call the method "onRangeChanged". The RangeChangeListener property will get set to the EL-expression #{TestPage.onRangeChanged} that identifies this listener method in the backing bean.
- Code the backing bean onRangeChanged() method, which will fire whenever the user interacts with the table's navigation "Previous N" / "Next N" links, to set the iterator binding's range to start at the new starting index position, and then to set the first row (zero-based!) in the new range to be the current row. The backing bean method would look like this:
I've added Example #79 to my examples page with a working version of this tip you can download and try.
7:04:27 AM
|
|
If you select an application module in the Application Navigator, and use the Structure Window to select the name of one of its view object instances, view link instances, or application module instances, then you can see that instance's name property in the Property Inspector. If you update the value of that instance's name property using the Property Inspector, you can easily rename the data model instance without having to open the modal Application Module editor.
Not the easiest thing to discover yourself, but since it comes in handy for me from time to time, I figured I'd share the tip.
5:50:47 AM
|
|
© Copyright 2008 Steve Muench.
|
|