myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <werner.p...@gmail.com>
Subject Re: Update <h:form> contens with commandlink
Date Mon, 12 Mar 2007 12:09:09 GMT
Brummeline Braaten schrieb:
> Werner Punz <werner.punz <at> gmail.com> writes:
> 
>> first load the 7 items into a list
>> at the clicking of the command link load the entire list in the action...
>>
>>
> 
> So I need to lists? Now I have all the items in the same list. Here is my code:
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
> <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
> <html>
>  <f:view>
>   <head>
>    <meta http-equiv="content-type"content="text/html; charset=iso-8859-1">
>   </head>
>   <body>
>    <h:form id="metoder">
>    <f:verbatim>
>     <div id="category_list_heading">
>     Siste metodevarsler:
>     </div>
>    </f:verbatim>
>    <h:dataTable var="commissiontitles" value="#{tabnavigering.commissionList}" 
> rows="7">
>     <h:column>
>      <h:outputText style="category_list" styleClass="category" 
>  value="#{commissiontitles.oppdragsDato}"/>
>       <h:commandLink style="category_list" styleClass="category">
>        <h:outputText value="#{commissiontitles.metodeNavn}" />
>       </h:commandLink>
>      </h:column>
>     </h:dataTable>
>     <h:commandLink>
>      <h:outputText value="All >>"/>
>     </h:commandLink>
>    </h:form>
>   </body>
>  </f:view>
> </html>
> 
> When I click on <h:outputText value="All >>"/> I would like to see all of

> the commissionList entries.
> 
> 
> 
commandlink value="All" action="tabnavigering.doloadentirelist" ...

then you can trigger a list reload from your backend action, you however
have to savestate something so the state is kept. (either reload the
list every time you do something in your form, or keep the state somewhere)


Mime
View raw message