Issue Details (XML | Word | Printable)

Key: SHALE-113
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Ed Burns
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

[shale] Create "Dialog Aware" button panel component

Created: 01/Mar/06 02:03 AM   Updated: 23/Jan/07 04:40 PM
Return to search
Component/s: Dialog
Affects Version/s: None
Fix Version/s: 1.0.4

Environment:
Operating System: other
Platform: Other

Bugzilla Id: 38809


 Description  « Hide
There really should be a dialog aware button panel component that automatically
generates next and previous buttons, greying things out as appropriate.

The JSF CharacterCombat demo has some ideas on this.

https://javaserverfaces-sources.dev.java.net/source/browse/javaserverfaces-sources/jsf-demo/characterCombat/

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Craig McClanahan added a comment - 09/Mar/06 09:39 AM
Changing to RFE ... interesting idea. In general Shale is trying to shy away
from being "another library of JSF components", but components that tie directly
to framework features are still fair game.

sean schofield added a comment - 04/Sep/06 09:23 PM
My proposal would be to supply the mechanism for applications to provide their own dialog aware buttons. In other words, provide a hook for EL expressions so you can have something like:

<h:commandButton action"next" value="Next" rendered="#{someBean.isNextAvailable}"/>

This way we don't have to be involved with the look and feel of buttons, etc. We just provide an easy way for developers to design their own. If the ability to determine whether the buttons should be rendered became available, it would be easy to provide your own reusable button panel and layout using Tiles, Facelets, Clay or whatever.

Craig McClanahan added a comment - 12/Dec/06 06:58 AM
The new event handling support addresses the requirement to provide an application with enough information to support this feature. If you make the "data" object you provide implement DialogContextListener, it will be automatically registered as a listener for interesting events, including state transitions within the dialog. In turn, this makes it very easy for the dialog to provide boolean functions to which you can bind, say, the "rendered" or "disabled" properties of the navigation buttons in the view, since only the application can tell you for sure whether a particular control should be rendered (or disabled) or not.

For use cases where a common pattern is implemented (such as "wizard dialogs"), it is straightforward for the application developer to provide a common base class for "data" beans that implements the common behavior for first/previous/next/last type controls, or the like.