I have prepared a fix and will commit it, if someone (Dave?) provides
me with an issue-number ;)

regards,

Martin

On 2/1/08, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> the clue is that restoreState/saveState was implemented wrongly in
> submitOnEvent - another reason to get the component-generator up and
> running. This is the erronous code - it uses the getter to access the
> component-attributes (and will therefore store the return-value of the
> method as local value...)
>
> public Object saveState(FacesContext context)
>     {
>         return new Object[]
>             {
>                 super.saveState(context),
>                 getFor(),
>                 getEvent(),
>                 getCallback()
>             };
>     }
>
>     public void restoreState(FacesContext context, Object state)
>     {
>         Object[] states = (Object[]) state;
>         super.restoreState(context, states[0]);
>         forComponent = (String) states[1];
>         event = (String) states[2];
>         callback = (String) states[3];
>     }
>
> On 2/1/08, Gerald Müllan <[EMAIL PROTECTED]> wrote:
> > Hi Dave,
> >
> > don`t know why the method is not called, maybe Mario knows it.
> >
> > It`s not that nice, but you may also write:
> >
> > callback="mySpecialUserCallback"
> >
> > ..
> >
> > function mySpecialUserCallback(event, srcComponentId, clickComponentId)
> > {
> >       return #{bean.submitOnChange};
> > }
> >
> > This should work without any problems;
> >
> > cheers,
> >
> > Gerald
> >
> > On Feb 1, 2008 11:53 AM, Dave <[EMAIL PROTECTED]> wrote:
> > > the bean method return a string that is a javascript function name.
> > >
> > >
> > >
> > > Mario Ivankovits <[EMAIL PROTECTED]> wrote:
> > > Hi!
> > > > callback="#{bean.callbackFunction}"
> > > The callback should point to a javascript function name instead of a
> > > bean method. callback is meant to be executed on the client.
> > >
> > > This javascript method then should allow you to return true/false, on
> > > false the click should not happen.
> > >
> > > Ciao,
> > > Mario
> > >
> > >
> > >
> > >
> > >
> > >  ________________________________
> > > Looking for last minute shopping deals? Find them fast with Yahoo!
> Search.
> >
> >
> >
> > --
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


-- 

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