expression « Facelets « JSF Q&A





1. Why does this expression not work? JSF    stackoverflow.com

I have a simple problem on .xhtml page. This expression is not working :-

<a href="Photos.jsf?albumId=#{item.albumId}&blogId=#{PhotoAlbumsCommonBean.blogId}">
 photos
</a>
I get this error :-
Error Parsing /Common/PhotoAlbums.xhtml: Error Traced[line: 20] The reference to entity "blogId" must ...

2. JSF creates new instance of the same class for each el expression in facelets    stackoverflow.com

I have a login page in a web application project:

<h:form>
    <h:messages />
    <h:inputText label="Username" value="#{login.username}" required="true" />
    <h:inputSecret label="Password" value="#{login.pass}" required="true" />
 ...

3. EL conditional Method Expression    stackoverflow.com

I want an conditional method expression in EL (JSF, Faclets, Primefaces) for the rowselectlistener of an table:

<p:dataTable id="#{cc.attrs.datatableId}" var="overview" rowSelectListener="#{cc.attrs.detailsMode == 'single' ? cc.attrs.bean.onRowSelect : cc.attrs.bean.onRowUrlSelect}">
...
</dataTable>
But there comes the ...

4. Change color/syntax highlighting for JSF/Facelets EL expressions in Eclipse    stackoverflow.com

I have installed both plugins: WTP and JBoss Tools (3.3) for Eclipse Indigo, but could not found a way to configure special syntax highlighting for EL expression in JSF (.xhmtl Facelets ...

5. Concatenating strings within EL expression defined in an attribute of a facelets tag    stackoverflow.com

I need to write an EL expression for an attribute which goes something like this:

#{cc.attrs.appreciatedByCurrentUser ? (cc.attrs.count +'<br/>'+ (cc.attrs.count-1)) : ((cc.attrs.count+1) +'<br/>'+ cc.attrs.count)}
Now the problem is that this gives an error ...

6. javax.el.ELException: Failed to parse the expression [{pz:instanceof(object,'com.project.domain.MyClass')}]    stackoverflow.com

Currenty I have a web project with JSF 1.2 and Facelets running in tomcat 6.0.18.0. I decided to upgrade the servlet container, thus i deployed in tomcat 7 and all seemed ...

7. Custom data types in Facelets JSF 2 Expression Language    stackoverflow.com

How to display a custom property using facelet expression language? For example:

<h:outputText value="#{contact.customTypeProperty}" />
where customTypeProperty is of type CustomClass, and I want to display the String returned by its toString()? ...