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

2007-05-04 Thread Torsten Krah
Thx, i'll going to try that if i got time - i'll report success or
failures here :-)

Torsten

Am Donnerstag, den 03.05.2007, 21:20 + schrieb Gary VanMatre:
 Hm - its a method binding expression - not a value binding one, so it
 should be MB, shouldn't it? 
 
  
 The binding type should be MB but there is more to it.  The method
 binding requires defining the formal parameter list.  The custom
 bindings are configured by attribute name.
  
 You will need to register your own command to create the custom
 binding. This requires adding a chain to the clayCustomization
 catalog.  The name of the chain should correspond to the attribute
 name.
  
 
 WEB-INF/chain-config.xml
 catalog name=clayCustomization
chain name=suggestedItemsMethod
  command className=acme.PropertyListenerCommand /
/chain
 /catalog
 
 The shale-clay-trinidad project in the sandbox has an example[1][2].
  
 [1]
 http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml?view=markup
 [2]
 http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java?view=markup
  
 
 Torsten
 
  
 Gary
 
 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
  
 
 E-Mail-Nachricht-Anlage
   Weitergeleitete Nachricht 
  Von: Torsten Krah [EMAIL PROTECTED]
  An: user@shale.apache.org
  Betreff: Re: s:inputSuggestAjax an Shale/Clay -
  ValidatorInputRenderer Type problem, the defaultRenderer wrapped is
  of the needed type - how to expose?
  Datum: Thu, 3 May 2007 17:09:24 +
  
  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
  


smime.p7s
Description: S/MIME cryptographic signature


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

2007-05-04 Thread Hermod Opstvedt
Hi

I have tried to follow you example, but there must be something more to it.

I have set the suggestedItemsMethod and itemLabelMethod to MB

I have in the chain-config:

catalog name=clayCustomization
chain name=suggestedItemsMethod
command

className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma
nd /
/chain
chain name=itemLabelMethod
command

className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma
nd /
/chain
/catalog

But when I run it i get:

javax.faces.FacesException: Could not set property suggestedItemsMethod of
component personregpanel:_id72 to value : #{post.getCities} with type :
java.lang.String
at
javax.faces.component._ComponentAttributesMap.setComponentProperty(_Componen
tAttributesMap.java:419)
at
javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.ja
va:312)
at
org.apache.shale.clay.component.chain.PropertyValueCommand.execute(PropertyV
alueCommand.java:193)
at
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 3. mai 2007 23:20
Til: user@shale.apache.org
Emne: Re: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type
problem, the defaultRenderer wrapped is of the needed type - how to expose?

Hm - its a method binding expression - not a value binding one, so it
should be MB, shouldn't it? 

 
The binding type should be MB but there is more to it.  The method binding
requires defining the formal parameter list.  The custom bindings are
configured by attribute name.
 
You will need to register your own command to create the custom binding.
This requires adding a chain to the clayCustomization catalog.  The name
of the chain should correspond to the attribute name.
 

WEB-INF/chain-config.xml
catalog name=clayCustomization
   chain name=suggestedItemsMethod
 command className=acme.PropertyListenerCommand /
   /chain
/catalog

The shale-clay-trinidad project in the sandbox has an example[1][2].
 
[1]
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/weba
pp/WEB-INF/chain-config.xml?view=markup
[2]
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java
/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java
?view=markup
 

Torsten

 
Gary

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
 




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

2007-05-04 Thread Hermod Opstvedt
Hi

Disregard this. I had forgotten to configure Chain in my web.xml file.
However the situation remains unchanged. The configured method is not beeing
called and the Ajax post is hanging (loading according to firebug). The
PropertyListenerCommand is now beeing called and does what it is supposed to
(I think).

When I debug it, the following line:

propertyHelper.setValue(child, attributeBean.getName(), mb);

has:
child:
org.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjax
attributeBean.getName():suggestedItemsMethod
mb: #{post.getCities}


Hermod


-Opprinnelig melding-
Fra: Hermod Opstvedt [mailto:[EMAIL PROTECTED] 
Sendt: 4. mai 2007 18:59
Til: user@shale.apache.org
Emne: SV: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type
problem, the defaultRenderer wrapped is of the needed type - how to expose?

Hi

I have tried to follow you example, but there must be something more to it.

I have set the suggestedItemsMethod and itemLabelMethod to MB

I have in the chain-config:

catalog name=clayCustomization
chain name=suggestedItemsMethod
command

className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma
nd /
/chain
chain name=itemLabelMethod
command

className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma
nd /
/chain
/catalog

But when I run it i get:

javax.faces.FacesException: Could not set property suggestedItemsMethod of
component personregpanel:_id72 to value : #{post.getCities} with type :
java.lang.String
at
javax.faces.component._ComponentAttributesMap.setComponentProperty(_Componen
tAttributesMap.java:419)
at
javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.ja
va:312)
at
org.apache.shale.clay.component.chain.PropertyValueCommand.execute(PropertyV
alueCommand.java:193)
at
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 3. mai 2007 23:20
Til: user@shale.apache.org
Emne: Re: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type
problem, the defaultRenderer wrapped is of the needed type - how to expose?

Hm - its a method binding expression - not a value binding one, so it
should be MB, shouldn't it? 

 
The binding type should be MB but there is more to it.  The method binding
requires defining the formal parameter list.  The custom bindings are
configured by attribute name.
 
You will need to register your own command to create the custom binding.
This requires adding a chain to the clayCustomization catalog.  The name
of the chain should correspond to the attribute name.
 

WEB-INF/chain-config.xml
catalog name=clayCustomization
   chain name=suggestedItemsMethod
 command className=acme.PropertyListenerCommand /
   /chain
/catalog

The shale-clay-trinidad project in the sandbox has an example[1][2].
 
[1]
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/weba
pp/WEB-INF/chain-config.xml?view=markup
[2]
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java
/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java
?view=markup
 

Torsten

 
Gary

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
 





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

2007-05-04 Thread Torsten Krah
Hm nice, did you implement AjaxRenderer on the ShaleInputValidator
class?
Otherwise it wont work, mentioned in the other posts on this thread.

Torsten

Am Freitag, den 04.05.2007, 19:52 +0200 schrieb Hermod Opstvedt:
 follo


smime.p7s
Description: S/MIME cryptographic signature


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

2007-05-04 Thread Gary VanMatre
From: Hermod Opstvedt [EMAIL PROTECTED] 

 Hi 
 
 Disregard this. I had forgotten to configure Chain in my web.xml file. 
 However the situation remains unchanged. The configured method is not beeing 
 called and the Ajax post is hanging (loading according to firebug). The 
 PropertyListenerCommand is now beeing called and does what it is supposed to 
 (I think). 
 
 When I debug it, the following line: 
 
 propertyHelper.setValue(child, attributeBean.getName(), mb); 
 
 has: 
 child: 
 org.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjax 
 attributeBean.getName():suggestedItemsMethod 
 mb: #{post.getCities} 
 

Hermod, make sure that shale-validator library is not included in the web app.  
Torsten reported on the myfaces list [1] that the shale validator library was 
wrapping the renderer for this component.  This component uses an interface to 
handle the PPR.  Since the renderer was decorated, the interface was not 
exposed.


[1] http://mail-archives.apache.org/mod_mbox/myfaces-users/200705.mbox/[EMAIL 
PROTECTED]

 
 Hermod 


Gary
 
 
 -Opprinnelig melding- 
 Fra: Hermod Opstvedt [mailto:[EMAIL PROTECTED] 
 Sendt: 4. mai 2007 18:59 
 Til: user@shale.apache.org 
 Emne: SV: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type 
 problem, the defaultRenderer wrapped is of the needed type - how to expose? 
 
 Hi 
 
 I have tried to follow you example, but there must be something more to it. 
 
 I have set the suggestedItemsMethod and itemLabelMethod to MB 
 
 I have in the chain-config: 
 
 
 
  
 className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma 
 nd / 
 
 
  
 className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma 
 nd / 
 
 
 
 But when I run it i get: 
 
 javax.faces.FacesException: Could not set property suggestedItemsMethod of 
 component personregpanel:_id72 to value : #{post.getCities} with type : 
 java.lang.String 
 at 
 javax.faces.component._ComponentAttributesMap.setComponentProperty(_Componen 
 tAttributesMap.java:419) 
 at 
 javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.ja 
 va:312) 
 at 
 org.apache.shale.clay.component.chain.PropertyValueCommand.execute(PropertyV 
 alueCommand.java:193) 
 at 
 org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) 
 
 Hermod 
 
 
 -Opprinnelig melding- 
 Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
 Sendt: 3. mai 2007 23:20 
 Til: user@shale.apache.org 
 Emne: Re: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type 
 problem, the defaultRenderer wrapped is of the needed type - how to expose? 
 
 Hm - its a method binding expression - not a value binding one, so it 
 should be MB, shouldn't it? 
  
 
 The binding type should be MB but there is more to it. The method binding 
 requires defining the formal parameter list. The custom bindings are 
 configured by attribute name. 
 
 You will need to register your own command to create the custom binding. 
 This requires adding a chain to the clayCustomization catalog. The name 
 of the chain should correspond to the attribute name. 
 
 
 WEB-INF/chain-config.xml 
 
 
 
 
 
 
 The shale-clay-trinidad project in the sandbox has an example[1][2]. 
 
 [1] 
 http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/weba 
 pp/WEB-INF/chain-config.xml?view=markup 
 [2] 
 http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java 
 /org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java 
 ?view=markup 
 
 
 Torsten 
  
 
 Gary 
 
 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: 
  
  
  
  Should be enough, shouldn't it? 
  
  Torsten 
  
 
 
 

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

2007-05-03 Thread 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
  


smime.p7s
Description: S/MIME cryptographic signature


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

2007-05-03 Thread Torsten Krah
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



smime.p7s
Description: S/MIME cryptographic signature


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

2007-05-03 Thread Gary VanMatre
Hm - its a method binding expression - not a value binding one, so it
should be MB, shouldn't it? 


The binding type should be MB but there is more to it.  The method binding 
requires defining the formal parameter list.  The custom bindings are 
configured by attribute name.

You will need to register your own command to create the custom binding. This 
requires adding a chain to the clayCustomization catalog.  The name of the 
chain should correspond to the attribute name.


WEB-INF/chain-config.xml
catalog name=clayCustomization
   chain name=suggestedItemsMethod
 command className=acme.PropertyListenerCommand /
   /chain
/catalog


The shale-clay-trinidad project in the sandbox has an example[1][2].

[1] 
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml?view=markup
[2] 
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java?view=markup


Torsten


Gary

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
 ---BeginMessage---
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



smime.p7s
Description: S/MIME cryptographic signature
---End Message---