[jboss-user] [JBoss Tools] New message: "Code Assist and Validation of Static Methods (3.1 CR2)"
Cody Lerum
do-not-reply at jboss.com
Fri Feb 26 16:49:44 EST 2010
User development,
A new message was posted in the thread "Code Assist and Validation of Static Methods (3.1 CR2)":
http://community.jboss.org/message/528918#528918
Author : Cody Lerum
Profile : http://community.jboss.org/people/clerum
Message:
--------------------------------------------------------------
I just upgraded to 3.1 CR2 for my seam ear project and for the first time enabled JSF and validated the syntax of my project.
I got everything cleaned up except for static methods in EL
for example I have
a seam POJO
@Name("searchTools")
public class SearchTools
{
public static String getClassName(Object object)
{
if(object.getClass().getSimpleName().contains("$$"))
{
return object.getClass().getSuperclass().getSimpleName();
}
else
{
return object.getClass().getSimpleName();
}
}
}
which is called by
<h:outputText value="Organization" rendered="#{searchTools.getClassName(result) == 'Organization'}" />
This code works fine but it throws a warning "getClassName" cannot be resolved" and autocomplete doesn't work.
This same problem happens when using seams
<h:outputText value="#{_invoiceLineItem.dateServiceEnd.time}">
<s:convertDateTime type="date" pattern="MM/dd/yyyy" timeZone="#{timeZone.getTimeZone('GMT')}"/>
</h:outputText>
The code works fine but since getTimeZone is a static method on java.util.Timezone (timeZone is a builtin seam component)
Any ideas? AFAIK this wasn't working in CR1 either.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528918#528918
More information about the jboss-user
mailing list