incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: Partial Triggering in <tr:table>
Date Sat, 20 Jan 2007 20:17:33 GMT
On 1/19/07, Gary VanMatre <gvanmatre@comcast.net> wrote:
> >From: "Anshuman Abhishek Roy" <anshuman.roy@in.ness.com>
> >
> >
> > Hi,
> >
> > I am unable to do a PPR in my component.
> >
> > I have a table with various columns of input text in it. The requirement is to
> > display the total on the last column. Although in my backing bean everything
> > works fine and total is updated but I am not able to update in the page itself.
> >
> > I have used autosubmit="true" in my and also I have used partial
> > triggers. But total is not getting updated.
> >
> > for reference I am putting the code below:
> ><tr:table id="XYZComponentTable" var="abc"
> >value="#{XYZComponentBackingBean.getList}"
> >binding="#{XYZComponentBackingBean.table}" rows="10">
> >
> >
> >     <tr:column align="right">
> >           <f:facet name="header">
> >                <tr:outputText value="* Date" />
> >         </f:facet>
> >       <tr:inputDate value="#{abc.Date}" />
> >          <f:facet name="footer" >
> >                  <tr:outputText value="Total"
> >styleClass="refAreaTextBold"></tr:outputText>
> >         </f:facet>
> > </tr:column>
> ><tr:column>
> >         <f:facet name="header">
> >            <tr:outputText value="* Amount($)" />
> >       </f:facet>
> >      <tr:inputText id="amount"
> >                           value="#{abc.Amount}"
> >                           simple="true"
> >                          columns="12"
> >                          immediate="true"
> >                          autoSubmit="true"
> >                         valueChangeListener="#{abc.computeAmount}"
> >                         required="true"/>
> >     <f:facet name="footer" >
> >      <tr:outputText value="#{XYZComponentBackingBean.netTotal}" readOnly="true"
> >partialTriggers="amount"/>
> >    </f:facet>
> ></tr:column>
> ></tr:table>
> >
> >
> > Am I missing something??
> >
> If you don't already, I would try adding the table under a tr:form and tr:panelPartialRoot.
>
> <tr:form id="form">
>       <tr:panelPartialRoot id="ppr">
>           <tr:table ...
>       </tr:panelPartialRoot>
> </tr:form>

Or, just use trh:body instead of <body>, or tr:document instead
of <html>, <body>, and <head>.

If PPR isn't working, you might try:
- Putting "binding" on that total field, and setting an explicit ID
- From your valueChangeListener, call RequestContext.addPartialTarget()
  with the total field.

There might be some problems with partialTriggers identifying
the total field, maybe because the total field isn't stamped
but the individual rows are stamped.

-- Adam

Mime
View raw message