You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jana Parvanova <ja...@sirma.bg> on 2006/03/28 13:53:05 UTC

Re: Update values within nested h:DataTable

Just a blind shot - have u <h:messages/> tag for the page? It is possible 
conversion/validation error occurred and u did not see it...

----- Original Message ----- 
From: "Dirk Hoegemann" <di...@web.de>
To: <us...@myfaces.apache.org>
Sent: Tuesday, March 28, 2006 3:11 PM
Subject: Update values within nested h:DataTable


> Hello,
>
> could somebody please explain me, how I can accomplish an update of the 
> values from within a nested DataTable?
> The Table is populated with a Collection of ArraysLists containing the 
> objects to be updatable,
>
> The DataTable should look like as follows:
>
> <h:form>
> <h:dataTable value="#{student.skills}" var="index">
> <h:column>
> <h:dataTable value="#{index}" var="skillIndex"
> rendered="#{not empty index}" headerClass="datatableHeader">
> <h:column>
> <h:outputText value="#{skillIndex.skill.name}"/>
> </h:column>
> <h:column>
> <h:selectOneMenu id="lvl" required="true"
> value="#{skillIndex.level}" ><!-- To be updated! -->
> <f:selectItems value="#{res.skilllevels}" /> </h:selectOneMenu>
> </h:column>
> </h:dataTable>
> </h:column>
> </h:dataTable>
> <h:commandButton type="submit" value="Save"
> action="#{student.updateSkills}" />
> </h:form>
>
> -> That doesnt work - the old values are displayed again after invoking 
> the "Save" button.
>
> Thanks
> Dirk
>
> P.S: Do  I have to use the binding attribute? If yes - can someone point 
> me to a good starting tutorial for that? I cant find any (for me) useful 
> docs for that....
>
>
> 


Re: Update values within nested h:DataTable

Posted by Dirk Hoegemann <di...@web.de>.
Thanks for your reply. I have the messages tag inside...

But it is resolved now (by using the tomahawk component).

----- Original Message ----- 
From: "Jana Parvanova" <ja...@sirma.bg>
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Sent: Tuesday, March 28, 2006 12:53 PM
Subject: Re: Update values within nested h:DataTable


> Just a blind shot - have u <h:messages/> tag for the page? It is possible 
> conversion/validation error occurred and u did not see it...
>
> ----- Original Message ----- 
> From: "Dirk Hoegemann" <di...@web.de>
> To: <us...@myfaces.apache.org>
> Sent: Tuesday, March 28, 2006 3:11 PM
> Subject: Update values within nested h:DataTable
>
>
>> Hello,
>>
>> could somebody please explain me, how I can accomplish an update of the 
>> values from within a nested DataTable?
>> The Table is populated with a Collection of ArraysLists containing the 
>> objects to be updatable,
>>
>> The DataTable should look like as follows:
>>
>> <h:form>
>> <h:dataTable value="#{student.skills}" var="index">
>> <h:column>
>> <h:dataTable value="#{index}" var="skillIndex"
>> rendered="#{not empty index}" headerClass="datatableHeader">
>> <h:column>
>> <h:outputText value="#{skillIndex.skill.name}"/>
>> </h:column>
>> <h:column>
>> <h:selectOneMenu id="lvl" required="true"
>> value="#{skillIndex.level}" ><!-- To be updated! -->
>> <f:selectItems value="#{res.skilllevels}" /> </h:selectOneMenu>
>> </h:column>
>> </h:dataTable>
>> </h:column>
>> </h:dataTable>
>> <h:commandButton type="submit" value="Save"
>> action="#{student.updateSkills}" />
>> </h:form>
>>
>> -> That doesnt work - the old values are displayed again after invoking 
>> the "Save" button.
>>
>> Thanks
>> Dirk
>>
>> P.S: Do  I have to use the binding attribute? If yes - can someone point 
>> me to a good starting tutorial for that? I cant find any (for me) useful 
>> docs for that....
>>
>>
>>
> 


Re: Update values within nested h:DataTable

Posted by Gerald Müllan <bi...@gmail.com>.
Is it really a need to use a nested dataTable for this?

Setting preserveDataModel="true" (in the outer table) may also help..

Using a component binding in this case should not be really a must,
but i may helps understanding what is going on in the model!

regards,

Gerald

On 3/28/06, Jana Parvanova <ja...@sirma.bg> wrote:
> Just a blind shot - have u <h:messages/> tag for the page? It is possible
> conversion/validation error occurred and u did not see it...
>
> ----- Original Message -----
> From: "Dirk Hoegemann" <di...@web.de>
> To: <us...@myfaces.apache.org>
> Sent: Tuesday, March 28, 2006 3:11 PM
> Subject: Update values within nested h:DataTable
>
>
> > Hello,
> >
> > could somebody please explain me, how I can accomplish an update of the
> > values from within a nested DataTable?
> > The Table is populated with a Collection of ArraysLists containing the
> > objects to be updatable,
> >
> > The DataTable should look like as follows:
> >
> > <h:form>
> > <h:dataTable value="#{student.skills}" var="index">
> > <h:column>
> > <h:dataTable value="#{index}" var="skillIndex"
> > rendered="#{not empty index}" headerClass="datatableHeader">
> > <h:column>
> > <h:outputText value="#{skillIndex.skill.name}"/>
> > </h:column>
> > <h:column>
> > <h:selectOneMenu id="lvl" required="true"
> > value="#{skillIndex.level}" ><!-- To be updated! -->
> > <f:selectItems value="#{res.skilllevels}" /> </h:selectOneMenu>
> > </h:column>
> > </h:dataTable>
> > </h:column>
> > </h:dataTable>
> > <h:commandButton type="submit" value="Save"
> > action="#{student.updateSkills}" />
> > </h:form>
> >
> > -> That doesnt work - the old values are displayed again after invoking
> > the "Save" button.
> >
> > Thanks
> > Dirk
> >
> > P.S: Do  I have to use the binding attribute? If yes - can someone point
> > me to a good starting tutorial for that? I cant find any (for me) useful
> > docs for that....
> >
> >
> >
>
>


--
Gerald Müllan
Schelleingasse 2/11
1040 Vienna, Austria
0043 699 11772506
Bierbrauen@gmail.com