Hi Stephen,

do this:


       <tr:form id="departmentForm" >
           <tr:selectOneChoice id="departments" label="Department"
                               value="#{scoreEntryHome.department}"
                               autoSubmit="true">

               <s:selectItems value="#{scoreEntryHome.allowedDepartments}"
                              var="department" label="#{department.name}"/>
           </tr:selectOneChoice>

           <tr:commandButton id="SaveButton" text="Update"
                             action="#{scoreEntryHome.save}"/>
       </tr:form>

       <tr:form>
           <tr:table var="scoreEntry" value="#{scoreEntryHome.scoreEntries}"
                     partialTriggers="::departmentForm:departments">

               <tr:column headerText="Name">
                   <tr:selectBooleanCheckbox value="#{scoreEntry.name}"/>
               </tr:column>

with :: you can get out of your naming-container up one level and then
back in again with : and name.

regards,

Martin

On 9/28/07, Richard Yee <[EMAIL PROTECTED]> wrote:
> You might try not using multiple forms and also not having the form
> id="departments" and the selectOneChoice also set to "departments"
>
> -Richard
>
> Stephen Friedrich wrote:
> > It seems that autoSubmit from a tr:selectOneChoice always uses PPR.
> > I can't get other components to update, though. This is what I tried:
> >
> >       <tr:form id="departments" >
> >           <tr:selectOneChoice id="departments" label="Department"
> >                               value="#{scoreEntryHome.department}"
> >                               autoSubmit="true">
> >
> >               <s:selectItems value="#{scoreEntryHome.allowedDepartments}"
> >                              var="department" label="#{department.name}"/>
> >           </tr:selectOneChoice>
> >
> >           <tr:commandButton id="SaveButton" text="Update"
> >                             action="#{scoreEntryHome.save}"/>
> >       </tr:form>
> >
> >       <tr:form>
> >           <tr:table var="scoreEntry" value="#{scoreEntryHome.scoreEntries}"
> >                     partialTriggers="departments">
> >
> >               <tr:column headerText="Name">
> >                   <tr:selectBooleanCheckbox value="#{scoreEntry.name}"/>
> >               </tr:column>
> >
> > On the server scoreEntryHome.setDepartment() gets correctly called with the
> > newly selected department, but the table won't update.
> >
> > I added the "Update" button just for testing, and of course it works fine.
> >
> > What am I doing wrong this time? ;-)
> >
> > Alternatively: Is there a way to disable PPR for autoSubmit?
> > Oh, and additionally: It should be documented in the tag description that
> > autoSubmit does PPR.
> >
> > (Trinidad 1.0.2, MyFaces 1.1.5, Facelets from VCS, Seam 1.2.1 on Tomcat 
> > 5.5.17)
> >
> >
> >
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to