Lukáš Fryč created RF-12247:
-------------------------------
Summary: CDK: short-cuts for repetitious expressions
Key: RF-12247
URL:
https://issues.jboss.org/browse/RF-12247
Project: RichFaces
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: cdk
Affects Versions: 4.2.0.Final
Reporter: Paul Dijou
h3. 1) Test if an attribute is present :
{code:xml}
<c:when test="#{component.attributes['brand']!= null and not
component.attributes['brand'].equals('')}">
{code}
Can become :
{code:xml}
<c:when test="#{component.hasAttribute('brand')}">
{code}
{code:java}
public boolean hasAttribute(String attributeName) {
// TODO : test if the attribute is present
}
{code}
h3. 2) Test if a facet is present
Same as before but about JSF facets
{code:xml}
<c:when test="#{component.getFacet('brand') != null and
component.getFacet('brand').rendered}">
{code}
Become
{code:xml}
<c:when test="#{component.hasFacet('brand')}">
{code}
{code:java}
public boolean hasFacet(String facetName) {
// TODO : test if the facet is present and rendered
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira