[
https://issues.jboss.org/browse/JBIDE-13237?page=com.atlassian.jira.plugi...
]
Paul Dijou commented on JBIDE-13237:
------------------------------------
I've talked with JSF spec lead about the "suggested-value" property of the
faces-config.xml file. Here is a summary.
It is a feature which is related to the FeatureDescriptor concept
(
http://docs.oracle.com/javase/6/docs/api/java/beans/FeatureDescriptor.html) which is a
way to give component library authors a way to tell IDEs what to fill in. So it's
quite what we are looking for.
When I asked him about a more standard way to suggest values for IDEs, he tells me about a
JSR which was supposed to normalize the way to specify JSF component metadatas. Here it is
:
http://jcp.org/en/jsr/detail?id=276 . But as you can see, this JSR is just dead since at
least 2 years. So I wouldn't hope much about it.
I guess going with "suggested-value" is the easier way to do it right now and
hopefully some other IDEs will follow.
Use "suggested-value" from faces-config.xml for JSF
attribute suggestion
------------------------------------------------------------------------
Key: JBIDE-13237
URL:
https://issues.jboss.org/browse/JBIDE-13237
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: JSF
Reporter: Paul Dijou
Assignee: Viacheslav Kabanovich
Labels: new_and_noteworthy
Fix For: 4.1.x
After reading [this wiki
entry|https://community.jboss.org/wiki/NewKBPlug-inAndCodeAssistInJBossTo...], it
looks like one property of the faces-config.xml isn't used so far, it's the
*"suggested-value"* (see
http://horstmann.com/corejsf/faces-config.html#suggested-value ). Its description is quite
small and I couldn't find any real documentation about it. But we can read: "This
value is advisory only and is intended for tools", and JBoss Tools is... a tool,
right? :-)
So it would be great that JBoss Tools check the presence of such a
"suggested-value" inside faces-config.xml and population an
"enumeration" proposal type for the corresponding attribute.
Since "suggested-value" is a string, it cannot support natively a list of
suggestions, so, right now, RichFaces is using "," as a separator. Which mean
having:
{code}
<property-name>severity</property-name>
<property-class>java.lang.String</property-class>
<suggested-value>success,info,warning,important,inverse</suggested-value>
{code}
Should be equivalent to:
{code}
<attribute name="severity">
<proposal type="enumeration">
<param value="success" />
<param value="info" />
<param value="warning" />
<param value="important" />
<param value="inverse" />
</proposal>
</attribute>
{code}
What do you think?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira