Hi Howard,

i added https://issues.apache.org/jira/browse/TAPESTRY-2460 with a 
maven project for this problem

g,
kris





Kristian Marinkovic <[EMAIL PROTECTED]> 
12.06.2008 12:29
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
"Tapestry users" <users@tapestry.apache.org>
Kopie

Thema
Re: T5: BeanEditor component containing BeanEditor component






Hi Howard,

unfortunately it does not work.... at least as i am doing it :)

could you take a look at the sample page below and verify
whether i've done a mistake or there is a bug. As mentionend
before the display of the beaneditor components works as
expected but when is submit the page i get a stackoverflow 
with this stacktrace 

two propertyconduits call temselves in an infinite loop:

g,
kris

RequestExceptionHandler:45 - Processing of request failed with uncaught 
exception: java.lang.StackOverflowError
java.lang.StackOverflowError
        at java.lang.String.equalsIgnoreCase(String.java:950)
        at 
org.apache.tapestry5.ioc.util.CaseInsensitiveMap$CIMEntry.matches(
CaseInsensitiveMap.java:84)
        at org.apache.tapestry5.ioc.util.CaseInsensitiveMap.tunePosition(
CaseInsensitiveMap.java:454)
        at org.apache.tapestry5.ioc.util.CaseInsensitiveMap.select(
CaseInsensitiveMap.java:427)
        at org.apache.tapestry5.ioc.util.CaseInsensitiveMap.select(
CaseInsensitiveMap.java:390)
        at org.apache.tapestry5.ioc.util.CaseInsensitiveMap.get(
CaseInsensitiveMap.java:367)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.getBinding(
InternalComponentResourcesImpl.java:284)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:230)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:252)
        at 
org.apache.tapestry5.corelib.components.BeanEditor._$read_parameter_object(BeanEditor.java)
        at org.apache.tapestry5.corelib.components.BeanEditor.getObject(
BeanEditor.java:130)
        at 
$PropertyConduit_11a7c41c4f2.get($PropertyConduit_11a7c41c4f2.java)
        at org.apache.tapestry5.internal.bindings.PropBinding.get(
PropBinding.java:53)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:237)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:252)
        at 
org.apache.tapestry5.corelib.components.PropertyEditor._$read_parameter_object(PropertyEditor.java)
        at 
org.apache.tapestry5.corelib.components.PropertyEditor.access$2(
PropertyEditor.java:72)
        at 
org.apache.tapestry5.corelib.components.PropertyEditor$1.getPropertyValue(
PropertyEditor.java:152)
        at 
$PropertyConduit_11a7c41c4eb.get($PropertyConduit_11a7c41c4eb.java)
        at org.apache.tapestry5.internal.bindings.PropBinding.get(
PropBinding.java:53)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:237)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:252)
        at 
org.apache.tapestry5.corelib.components.BeanEditor._$read_parameter_object(BeanEditor.java)
        at org.apache.tapestry5.corelib.components.BeanEditor.getObject(
BeanEditor.java:130)
        at 
$PropertyConduit_11a7c41c4f2.get($PropertyConduit_11a7c41c4f2.java)
        at org.apache.tapestry5.internal.bindings.PropBinding.get(
PropBinding.java:53)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:237)
        at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(
InternalComponentResourcesImpl.java:252)
        at 
org.apache.tapestry5.corelib.components.PropertyEditor._$read_parameter_object(PropertyEditor.java)
        at 
org.apache.tapestry5.corelib.components.PropertyEditor.access$2(
PropertyEditor.java:72)
        at 
org.apache.tapestry5.corelib.components.PropertyEditor$1.getPropertyValue(
PropertyEditor.java:152)
        at 
$PropertyConduit_11a7c41c4eb.get($PropertyConduit_11a7c41c4eb.java)
        at org.apache.tapestry5.internal.bindings.PropBinding.get(
PropBinding.java:53)

page:
public class EditorTest
{
   @Persist @Property
   private EditorEntityA a;
 
   @Component private Form form;
 
   @Component private Submit link;
 
   @Component(parameters={"object=a","data=block:dataBlock"})
   private BeanEditor editor;
 
   @Component(parameters={"object=context.propertyValue","model=model"})
   private BeanEditor editor2;
 
   @Environmental @Property
   private PropertyEditContext context;
 
   @Inject
   private BeanModelSource modelSource;
 
   @Inject
   private ComponentResources resources;

   public BeanModel getModel() {
      return modelSource.create(context.getPropertyType(), false, 
resources);
   } 

   void setupRender() {
      if(a == null)
         a = new EditorEntityA(Long.valueOf(5),"xxx","yyy",new 
EditorEntityB("Austria","german"));
   }


template:
<html xmlns="http://www.w3.org/1999/xhtml";
    xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
 
    <head>
        <title>BeanEditor calls BeanEditor</title>
    </head>
    <body>
        <h3>EditorTest</h3>
        <form t:id="form">
            <div t:id="editor" />
            <p><a t:id="link">submit</a></p>
        </form>
        <t:block t:id="dataBlock">
            <div t:id="editor2" />
        </t:block>
    </body>
</html>




"Howard Lewis Ship" <[EMAIL PROTECTED]> 
11.06.2008 19:54
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
"Tapestry users" <users@tapestry.apache.org>
Kopie

Thema
Re: T5: BeanEditor component containing BeanEditor component







I'm surprised that doesn't work.

On Wed, Jun 11, 2008 at 7:04 AM, Kristian Marinkovic
<[EMAIL PROTECTED]> wrote:
> Is it possible to define a Block for a BeanEditor component that
> itself contains a BeanEditor component?
>
> when we  tried to implement this the page renders as expected.
> in our  case we render the properties of a Company object and
> one of these properties is a User object that itself is rendered
> using a BeanEditor.
>
> But when we submit the page we get an infinite loop of PropertyConduit
> calls.
>
>
>
> any help is appreciated!
>
> g,
> kris
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to