You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Hermod Opstvedt <he...@opstvedt.com> on 2007/05/01 22:59:38 UTC

s:inputSuggestAjax an Shale/Clay

Hi

Has anybody made the inputSuggestAjax component work in a Shale/Clay
environment. It's posting to the server, but it's not calling my method on
the configured bean. It just disapears

Hermod


SV: s:inputSuggestAjax an Shale/Clay

Posted by Hermod Opstvedt <he...@opstvedt.com>.
Hi

I am investigating this, and so far I have been able to rule out Shale as
the culprit. I took the tomahawk sandbox sample application and wired in
Shale and it still worked. I am taking this one step at a time in hope of
pinpointing where things og wrong.

Hermod


-----Opprinnelig melding-----
Fra: Torsten Krah [mailto:tkrah@fachschaft.imn.htwk-leipzig.de] 
Sendt: 3. mai 2007 17:51
Til: hermod@opstvedt.com
Kopi: user@shale.apache.org
Emne: Re: s:inputSuggestAjax an Shale/Clay

Get it now rendered, although a form in a form it does not really like.

But i am facing the same problem you've got, nothing happens - my bean
methods are not called.

Am Dienstag, den 01.05.2007, 22:59 +0200 schrieb Hermod Opstvedt:
> Hi
> 
> Has anybody made the inputSuggestAjax component work in a Shale/Clay
> environment. It's posting to the server, but it's not calling my method on
> the configured bean. It just disapears
> 
> Hermod
> 


Re: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type problem, the defaultRenderer wrapped is of the needed type - how to expose?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Hm - its a method binding expression - not a value binding one, so it
should be MB, shouldn't it? 

Torsten

Am Donnerstag, den 03.05.2007, 19:01 +0200 schrieb Torsten Krah:
> Did some code do get this wrapped functionality in.
> 
> Ajay encode call is made now - however, on the InputAjax class - the
> method binding was not set.
> 
> What else have i have to do, to get a method binding expression on a
> attribute working?
> 
> My clay sandbox xml got:
> 
> <set name="suggestedItemsMethod" bindingType="VB">
> 
> Should be enough, shouldn't it?
> 
> Torsten
> 
> Am Donnerstag, den 03.05.2007, 18:33 +0200 schrieb Torsten Krah:
> > Some more insights:
> > 
> > This gets called:
> > 
> > public void encodeAjax(FacesContext context)
> >             throws IOException
> >     {
> >         if (context == null) throw new NullPointerException("context");
> >         if (!isRendered()) return;
> >         Renderer renderer = getRenderer(context);
> >         if (renderer != null && renderer instanceof AjaxRenderer)
> >         {
> >             ((AjaxRenderer) renderer).encodeAjax(context, this);
> >         }
> >     }
> > 
> > renderer however is not an instance of AjaxRenderer, instead is a
> > ValidatorInputRenderer, which only extends Renderer, not AjaxRenderer.
> > 
> > So the code stops there.
> > 
> > What may we have to do here, to get it working in clay - don't know much
> > about the ValidatorInputRenderer yet ;)
> > 
> > Maybe its sufficient, to add the AjaxRenderer Interface?
> > 
> > Torsten
> > 
> > Am Donnerstag, den 03.05.2007, 17:50 +0200 schrieb Torsten Krah:
> > > Get it now rendered, although a form in a form it does not really like.
> > > 
> > > But i am facing the same problem you've got, nothing happens - my bean
> > > methods are not called.
> > > 
> > > Am Dienstag, den 01.05.2007, 22:59 +0200 schrieb Hermod Opstvedt:
> > > > Hi
> > > > 
> > > > Has anybody made the inputSuggestAjax component work in a Shale/Clay
> > > > environment. It's posting to the server, but it's not calling my method on
> > > > the configured bean. It just disapears
> > > > 
> > > > Hermod
> > > > 

Re: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type problem, the defaultRenderer wrapped is of the needed type - how to expose?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Did some code do get this wrapped functionality in.

Ajay encode call is made now - however, on the InputAjax class - the
method binding was not set.

What else have i have to do, to get a method binding expression on a
attribute working?

My clay sandbox xml got:

<set name="suggestedItemsMethod" bindingType="VB">

Should be enough, shouldn't it?

Torsten

Am Donnerstag, den 03.05.2007, 18:33 +0200 schrieb Torsten Krah:
> Some more insights:
> 
> This gets called:
> 
> public void encodeAjax(FacesContext context)
>             throws IOException
>     {
>         if (context == null) throw new NullPointerException("context");
>         if (!isRendered()) return;
>         Renderer renderer = getRenderer(context);
>         if (renderer != null && renderer instanceof AjaxRenderer)
>         {
>             ((AjaxRenderer) renderer).encodeAjax(context, this);
>         }
>     }
> 
> renderer however is not an instance of AjaxRenderer, instead is a
> ValidatorInputRenderer, which only extends Renderer, not AjaxRenderer.
> 
> So the code stops there.
> 
> What may we have to do here, to get it working in clay - don't know much
> about the ValidatorInputRenderer yet ;)
> 
> Maybe its sufficient, to add the AjaxRenderer Interface?
> 
> Torsten
> 
> Am Donnerstag, den 03.05.2007, 17:50 +0200 schrieb Torsten Krah:
> > Get it now rendered, although a form in a form it does not really like.
> > 
> > But i am facing the same problem you've got, nothing happens - my bean
> > methods are not called.
> > 
> > Am Dienstag, den 01.05.2007, 22:59 +0200 schrieb Hermod Opstvedt:
> > > Hi
> > > 
> > > Has anybody made the inputSuggestAjax component work in a Shale/Clay
> > > environment. It's posting to the server, but it's not calling my method on
> > > the configured bean. It just disapears
> > > 
> > > Hermod
> > > 

Re: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type problem, the defaultRenderer wrapped is of the needed type - how to expose?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Some more insights:

This gets called:

public void encodeAjax(FacesContext context)
            throws IOException
    {
        if (context == null) throw new NullPointerException("context");
        if (!isRendered()) return;
        Renderer renderer = getRenderer(context);
        if (renderer != null && renderer instanceof AjaxRenderer)
        {
            ((AjaxRenderer) renderer).encodeAjax(context, this);
        }
    }

renderer however is not an instance of AjaxRenderer, instead is a
ValidatorInputRenderer, which only extends Renderer, not AjaxRenderer.

So the code stops there.

What may we have to do here, to get it working in clay - don't know much
about the ValidatorInputRenderer yet ;)

Maybe its sufficient, to add the AjaxRenderer Interface?

Torsten

Am Donnerstag, den 03.05.2007, 17:50 +0200 schrieb Torsten Krah:
> Get it now rendered, although a form in a form it does not really like.
> 
> But i am facing the same problem you've got, nothing happens - my bean
> methods are not called.
> 
> Am Dienstag, den 01.05.2007, 22:59 +0200 schrieb Hermod Opstvedt:
> > Hi
> > 
> > Has anybody made the inputSuggestAjax component work in a Shale/Clay
> > environment. It's posting to the server, but it's not calling my method on
> > the configured bean. It just disapears
> > 
> > Hermod
> > 

Re: s:inputSuggestAjax an Shale/Clay

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Get it now rendered, although a form in a form it does not really like.

But i am facing the same problem you've got, nothing happens - my bean
methods are not called.

Am Dienstag, den 01.05.2007, 22:59 +0200 schrieb Hermod Opstvedt:
> Hi
> 
> Has anybody made the inputSuggestAjax component work in a Shale/Clay
> environment. It's posting to the server, but it's not calling my method on
> the configured bean. It just disapears
> 
> Hermod
>