cancel
Showing results for 
Search instead for 
Did you mean: 

Please help.... users richlist

soeursourire
Champ in-the-making
Champ in-the-making
I hope you will agree for helping me, I am completly lost…

I do not understand how the richList is working in users.jsp:

<a:richList id="users-list" binding="#{UsersBean.usersRichList}" viewMode="details" pageSize="10"

styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"  value="#{UsersBean.users}" var="r" initialSortColumn="userName" initialSortDescending="true">
                           
<%– Primary column with full name –%>

<a:column primary="true" width="200" style="padding:2px;text-align:left">

         <f:facet name="header">

         <a:sortLink label="#{msg.name}" value="fullName" mode="case-insensitive" styleClass="header"/>
          </f:facet>
          <f:facet name="small-icon">
          <h:graphicImage url="/images/icons/person.gif" />
         </f:facet>
          <hSmiley SurprisedutputText value="#{r.fullName}" />
</a:column>

-        What is the binding for ?

-        UsersBean.users returns a List<Node> so how is it possible to do r.fullName although r is a Node ??? Where is the method getFullName, in User.java??

Thanks in advance!
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
The binding allows direct access to the UIRichList component in the UsersBean - if you read a book on JSF you will understand that this is a standard JSF component-binding attribute.

r.fullName: There is more than one type of "Node" class. The Node objects built for the Users List are of "MapNode" class, which is accessed by the JSF value-binding through the java.util.Map interface - which means we can put any calcluated values into the NodeMap which can then be accessed using standard JSF bindings on the page. Again, this is a standard JSF trick to use a Map object like this.

Kevin

soeursourire
Champ in-the-making
Champ in-the-making
Thanks a lot for your answer. I think I get it…
However I do not understand why I can get my property action while doing this:
<hSmiley SurprisedutputText value="#{p.ps_action}"/>

"createUser" is displayed

But I cannot get it while doing this:
<a:actionLink value="Nomination" action="#{p.ps_action}" >

neither while doing this with a method returnAction(MapNode p):
<a:actionLink value="Nomination" action=" {EF_BrowseBean.returnAction}" >                               
     <fSmiley Tonguearam value="#{p}"/>
</a:actionLink>

What can I do? What do I do wrong?
Thanks again

soeursourire
Champ in-the-making
Champ in-the-making
Is it possible to use a tree2 from Tomahawk in Alfresco? I need to add this configuration in the web.xml

<!–Addition here for tomahawk and other my faces components–>
<!– extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  –>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <!– servlet-name must match the name of your javax.faces.webapp.FacesServlet entry –>
    <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>

<!– extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  –>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<!– extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  –>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
</filter-mapping>

Is it possible and compatible? Because I keep having this error:
java.lang.ClassCastException: org.apache.myfaces.config.MyfacesConfig

Thanks