1

i have a problem with jsf 2.0 and method expressions:

<ui:repeat var="attachment" value="#{bean.attachments}">
    <h:outputText value="#{bean.aFunction(attachment)}" />
</ui:repeat>

but it already tells me when typing that "Method must have signature "String method(), String method(String), String method(String, String), String method(String, String, String),..."

here is my function:

public String aFunction(Attachment a){
    return Functions.getFormattedAttachmentString(a);
}

what is wrong here?

Niko
  • 1,054
  • 5
  • 25
  • 52
  • 2
    possible duplicate of [Validation error on valid facelet when calling action method with parameter](http://stackoverflow.com/questions/8083469/validation-error-on-valid-facelet-when-calling-action-method-with-parameter) – skuntsel Jul 24 '13 at 12:54
  • hi, its not a duplicate; the thing is that these expressions work fine if i use them for an action (like in your link); but as value it screams; eclipse makes a bit red "X" to the left, so this shoudl be an error right? – Niko Jul 24 '13 at 13:05
  • Have you actually tried to deploy it? If so, did it throw an error? – Menno Jul 24 '13 at 13:06
  • There is no error when i start the app and access the problematic site. but eclipse still unterlines it red and tells me there is one huge problem. can I tell Eclipse anyhow that this is OK?* – Niko Jul 24 '13 at 15:49

0 Answers0