Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.2.BETA1
-
Fix Version/s: 3.3
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces
-
Assignee Priority:P1
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
Description
By providing ace:message and ace:messages it would be possible to both offer new features (such as improved styling for messages) and corrected behavior (such as always rendering an HTML root node with the clientID).
-
- Document3.txt
- 27 kB
- yip.ng
-
- screenshot-01.png
- 20 kB
-
- screenshot-02.png
- 309 kB
-
- screenshot-03.png
- 160 kB
-
- screenshot-04.png
- 239 kB
-
- screenshot-05.png
- 114 kB
-
- screenshot-06.png
- 222 kB
-
- screenshot-07.png
- 249 kB
-
- screenshot-08.png
- 117 kB
-
- screenshot-09.png
- 239 kB
-
- screenshot-10.png
- 315 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
ace:message first iteration done as per decisions from meeting. Essential logic based on Mojarra MessageRenderer, but with cleaner code than some clumsy code in Mojarra, e.g. using message ordinal and array indexing instead of multiple if statements. See screenshot-02 for the jQuery styling.
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message#33255
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\Message.java#33255
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageMeta.java#33255
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageRenderer.java#33255
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\themes\sam\theme.css#33255
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\themes\rime\theme.css#33255
Showcase broken (when navigating from landing demo of a component to another demo) after svn update. See attached Document3.txt for the exceptions. Had to spend time tracking down the last working revision (33243) before I could do any testing.
ace:messages first iteration done as per decisions from meeting. Essential logic based on Mojarra MessagesRenderer, but with cleaner code than some clumsy code in Mojarra, e.g. using message ordinal and array indexing instead of multiple if statements.
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages#33280
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\Messages.java#33280
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesMeta.java#33280
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesRenderer.java#33280
After reviewing the available icon options provided by ThemeRoller, I think we should just use the following:
- Info: ui-icon-notice w/ ui-state-highlight css
- Warn: ui-icon-info w/ ui-state-highlight css
- Error: ui-icon-alert w/ ui-state-error css
- Fatal: ui-icon-alert w/ ui-state-error css
In addition, the message(s) should render a border with rounded rectangles, with the icon inside the border, with appropriate padding, and in the case of ace:message, without resorting to block layout.
Theme Roller example uses <div> and <p> as containers, and padding is provided by them, not the theme ui-state. See screenshot-04. <ace:message> should use <span> (as in Mojarra) because users expect to be able to just put a message adjacent to an input field.
Using <span> creates complications. See screenshot-03. Therefore, must resort to more complicated positioning and spacing techniques. <ace:messages> are in a <table> or <ul>, so they can use the same approach as in the Theme Roller example. But even then, the icon appears a bit off position when in a <li> under <ul>. See screenshot-06.
And in IE7 the icon is a bit off position no matter what, even after applying a known CSS hack (zoom to set hasLayout). Same in Theme Roller example. See screenshot-05 and -08.
Another side effect: when <ace:message>'s are stacked vertically, e.g. in a table as in showcase, the border and padding overlap. See screenshot-07. In this layout scenario the user has to allow more space in the wrapping container in the app.?
Or do we want to abandon <span> and use <div> as well for <ace:message>, and let the user figure out their positioning needs?
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageMeta.java#33320
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageRenderer.java#33320
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesMeta.java#33320
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesRenderer.java#33320
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\themes\sam\theme.css#33320
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\themes\rime\theme.css#33320
Decisions form meeting:
- get rid of layout attribute in <ace:messages>, just output <div>
- add style and styleClass attributes
- add ARIA attributes
layout attribute removed. Messages rendered in <div>'s only.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageRenderer.java#33334
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesMeta.java#33334
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesRenderer.java#33334
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\themes\sam\theme.css#33334
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\themes\rime\theme.css#33334
style and styleClass attributes added.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageMeta.java#33343
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageRenderer.java#33343
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesMeta.java#33343
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesRenderer.java#33343
ARIA attributes added: role, aria-atomic, aria-live, aria-relevant.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageRenderer.java#33348
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesRenderer.java#33348
Let's add a new showcase demo for ace:message(s) that shows each component in a separate demo panel.
From Cruz:
When using ace:message without the 'for' attribute specified and
triggering a message (via a required input) no messages will be
displayed at all. If doing the same with ace:messages, the message will
display. I think a good way to 'fix' this behaviour would be to make the
for attribute of the ace:message component required.
- "for" attribute marked required in message meta class.
- Added checking for empty id. (findComponent() would throw exception. null or non-existent id had already been checked before.)
- Log warning and skip rendering, as in Mojarra. (Decision from meeting. Had been rendering empty span.)
Note that null is valid value in <ace:messages> to output global messages, therefore only empty and non-existent ids are error cases.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageMeta.java#33520
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageRenderer.java#33520
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesMeta.java#33520
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesRenderer.java#33520
Demo done. See screenhot-09.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\java\org\icefaces\samples\showcase\view\navigation\AceMenu.java#33543
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\webapp\resources\examples\ace\message#33543
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\java\org\icefaces\samples\showcase\example\ace\message#33543
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\webapp\resources\examples\ace\message\message.xhtml#33543
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\java\org\icefaces\samples\showcase\example\ace\message\MessageBean.java#33543
A: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\java\org\icefaces\samples\showcase\ace\documentationResources\MessageResources.java#33543
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\resources\org\icefaces\samples\showcase\view\resources\messages.properties#33543
For ace:messages only, let's add support for a new "@all" for keyword that will be treated the same as the null case (required to support EL expressions that can't return null).
Future consideration for adding additional keyword support such as "@parent", "@form", and also a space-delimited list of ids, etc. (currently out of scope).
Done.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\webapp\resources\examples\ace\message\message.xhtml#33558
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageRenderer.java#33558
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesMeta.java#33558
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesRenderer.java#33558
wiki done.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\samples\showcase\showcase\src\main\java\org\icefaces\samples\showcase\ace\documentationResources\MessageResources.java#33938
Done: screenshot-10.png.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageMeta.java#33986
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\message\MessageRenderer.java#33986
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesMeta.java#33986
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\messages\MessagesRenderer.java#33986
Decisions from meeting: