myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Brökelmann <mbroekelm...@googlemail.com>
Subject Re: Listener Method is called too many times
Date Thu, 27 Oct 2005 20:30:34 GMT
where do you use your onclick event? I´ve tested your sample and it
works. The action listener is only called once for the clicked command
button

2005/10/27, PATRICIA GUEDES <guedes.castro@gmail.com>:
> Hi again..
>
> I don't know if helps, but I am using
> org.apache.myfaces.component.html.util.ExtensionsFilter in my web.xml.
> Another thing that I forgot to tell is that my listener method is
> called twice for line of my dataTable. I read somewhere that is my
> onclick event in and out.
>
> Please someone help me. I am testing JSF as a pilot to choose between
> JSF and Struts in a new Project, but I am worried about all these
> problems. I am stuck for two days in basic things.
>
> Thanks.
> Guedes
>
>
> On 10/27/05, PATRICIA GUEDES <guedes.castro@gmail.com> wrote:
> > Anyone please ....
> >
> > Thanks
> > Guedes
> >
> > On 10/27/05, PATRICIA GUEDES <guedes.castro@gmail.com> wrote:
> > > Hi, everyone!!
> > >
> > > Anyone knows why my listener method (remessaBean.delEmbque) is called
> > > so many times?
> > > It seems the listener is called one time for each line of my table. Is
> > > there anything I can do to stop this and call just one time?
> > >
> > > <x:dataTable value="#{remessaBean.valuesEmbque}" var="values" width="760"
> > >                 cellpadding="0" cellspacing="1"
> > > rowClasses="inputFields" headerClass="fields">
> > >        <x:column>
> > >            <f:facet name="header">
> > >                <h:outputText value="Excluir" styleClass="forms"/>
> > >            </f:facet>
> > >            <h:commandButton actionListener="#{remessaBean.delEmbque}"
> > > style="cursor:hand;vertical-align:middle;"
> > > image="/eServices/eservices/images/trash.gif" />
> > >        </x:column>
> > >    </x:dataTable>
> > >
> > >
> > > public void delEmbque(ActionEvent e) {
> > >
> > >           FacesContext context = FacesContext.getCurrentInstance();
> > >           Map map =
> > context.getExternalContext().getRequestParameterMap();
> > >           int index = Integer.parseInt((String) map.get("rowIndex"));
> > >
> > >           ArrayList currentValues = (ArrayList)
> > > valuesEmbqueModel.getWrappedData();
> > >           currentValues.remove(index);
> > >
> > >           valuesEmbqueModel.setWrappedData(currentValues);
> > >
> > >  }
> > >
> > > Thanks.
> > > Guedes
> > >
> >
>


--
Mathias

Mime
View raw message