You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Olivier Jacquet <oj...@jax.be> on 2007/03/04 16:37:28 UTC

T5: recordError on BeanEditForm

How can I record additional errors on BeanEditForm. I cannot get access 
to the form with:

@Component
private Form _form;


Does anyone have an example?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: recordError on BeanEditForm

Posted by Olivier Jacquet <oj...@jax.be>.
.html:
	<form t:type="beaneditform" object="loginData"></form>

becomes:
<form action="/hilo/login.beaneditform.form" id="form" method="post" 
name="form">


I've tried manually setting an id to form or something else but that 
doesn't seem to work either. I keep getting an Exception:

Component org.example.hilo.pages.Login does not contain an embedded 
component with id 'form'.


The documentation also doesn't specify a parameter "id" for the 
beaneditform component.



Massimo Lusetti wrote:
> On 3/4/07, Olivier Jacquet <oj...@jax.be> wrote:
> 
>> How can I record additional errors on BeanEditForm. I cannot get access
>> to the form with:
>>
>> @Component
>> private Form _form;
> 
> Does the BeanEditForm's form has form id of "form" or something else?
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [WARNING] T5: recordError on BeanEditForm

Posted by Howard Lewis Ship <hl...@gmail.com>.
I've been thinking that the BeanEditForm should implement a few of the
methods of Form (maybe, split out into an interface) and delegate them
to it's emebedded Form instance.

On 3/4/07, Massimo Lusetti <ml...@gmail.com> wrote:
> On 3/4/07, SergeEby <sd...@hotmail.com> wrote:
>
> >
> > Hi,
> >
> > You can access the form from the BeanEditForm component:
> > http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/BeanEditForm.html
>
> That's better.
>
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [WARNING] T5: recordError on BeanEditForm

Posted by Massimo Lusetti <ml...@gmail.com>.
On 3/4/07, SergeEby <sd...@hotmail.com> wrote:

>
> Hi,
>
> You can access the form from the BeanEditForm component:
> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/BeanEditForm.html

That's better.

-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: recordError on BeanEditForm

Posted by Olivier Jacquet <oj...@jax.be>.
Solved it. If I put t:id="foo" it works. With t:id="form" it throws the 
exception.

I'm quite a beginner at this tapestry thing. I'll try to put those 
problems I encounter and hopefully solve online to help other beginners 
like me.


Thanks for all the help,
Olivier



Olivier Jacquet wrote:
> 
> Hi Filip,
> 
> 
> I was just putting id="form". I've changed it to t:id="form" per your 
> recommendation and am now getting a
> 
> 
> java.lang.StackOverflowError
> 
> Stack trace
> 
> java.lang.String.equalsIgnoreCase(String.java:950)
> o.a.t.internal.services.ComponentEventImpl.matchesByEventType(ComponentEventImpl.java:81) 
> 
> o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java) 
> 
> o.a.t.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893) 
> 
> o.a.t.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:1002) 
> 
> o.a.t.internal.structure.InternalComponentResourcesImpl.triggerEvent(InternalComponentResourcesImpl.java:141) 
> 
> o.a.t.corelib.components.BeanEditForm.onPrepareFromForm(BeanEditForm.java:196) 
> 
> o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java) 
> 
> o.a.t.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893) 
> 
> o.a.t.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:1002) 
> 
> o.a.t.internal.structure.InternalComponentResourcesImpl.triggerEvent(InternalComponentResourcesImpl.java:141) 
> 
> o.a.t.corelib.components.BeanEditForm.onPrepareFromForm(BeanEditForm.java:196) 
> 
> o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java) 
> 
> .... the keeps on going ....
> 
> 
> o.a.t = org.apache.tapestry.
> 
> 
> Thank
> 
> 
> 
> 
> Filip S. Adamsen wrote:
>> Hi Olivier,
>>
>> Try this in your page class:
>>
>> @Component(id = "form")
>> private BeanEditForm _form;
>>
>> And this in your page template:
>>
>> <form t:type="beaneditform" t:id="form" object="loginData"></form>
>>
>> Hope this helps.
>>
>> -Filip
>>
>> Olivier Jacquet skrev:
>>>
>>> Yet even with this clue I cannot get it to work. How do I access the 
>>> BeanEditForm with my page class?
>>>
>>> With:
>>>     @Component
>>>     private BeanEditForm _form;
>>>
>>>
>>> I'm sill getting the exception:
>>> Component org.example.hilo.pages.Login does not contain an embedded 
>>> component with id 'form'.
>>>
>>>
>>> So now the question becomes: "How do I get access to the BeanEditForm 
>>> component from within my pages class?".
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: recordError on BeanEditForm

Posted by Howard Lewis Ship <hl...@gmail.com>.
... an interesting side effect. I believe this bug is already fixed in
SVN trunk though I was going at it for another reason.  I'll add some
tests to check.

I'll have to think about this one; the basic issue is a complex
component that handles events from an embedded component, and they
both have the same simple id.



On 3/4/07, Olivier Jacquet <oj...@jax.be> wrote:
>
> Hi Filip,
>
>
> I was just putting id="form". I've changed it to t:id="form" per your
> recommendation and am now getting a
>
>
> java.lang.StackOverflowError
>
> Stack trace
>
> java.lang.String.equalsIgnoreCase(String.java:950)
> o.a.t.internal.services.ComponentEventImpl.matchesByEventType(ComponentEventImpl.java:81)
> o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java)
> o.a.t.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893)
> o.a.t.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:1002)
> o.a.t.internal.structure.InternalComponentResourcesImpl.triggerEvent(InternalComponentResourcesImpl.java:141)
> o.a.t.corelib.components.BeanEditForm.onPrepareFromForm(BeanEditForm.java:196)
> o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java)
> o.a.t.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893)
> o.a.t.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:1002)
> o.a.t.internal.structure.InternalComponentResourcesImpl.triggerEvent(InternalComponentResourcesImpl.java:141)
> o.a.t.corelib.components.BeanEditForm.onPrepareFromForm(BeanEditForm.java:196)
> o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java)
> .... the keeps on going ....
>
>
> o.a.t = org.apache.tapestry.
>
>
> Thank
>
>
>
>
> Filip S. Adamsen wrote:
> > Hi Olivier,
> >
> > Try this in your page class:
> >
> > @Component(id = "form")
> > private BeanEditForm _form;
> >
> > And this in your page template:
> >
> > <form t:type="beaneditform" t:id="form" object="loginData"></form>
> >
> > Hope this helps.
> >
> > -Filip
> >
> > Olivier Jacquet skrev:
> >>
> >> Yet even with this clue I cannot get it to work. How do I access the
> >> BeanEditForm with my page class?
> >>
> >> With:
> >>     @Component
> >>     private BeanEditForm _form;
> >>
> >>
> >> I'm sill getting the exception:
> >> Component org.example.hilo.pages.Login does not contain an embedded
> >> component with id 'form'.
> >>
> >>
> >> So now the question becomes: "How do I get access to the BeanEditForm
> >> component from within my pages class?".
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: recordError on BeanEditForm

Posted by Olivier Jacquet <oj...@jax.be>.
Hi Filip,


I was just putting id="form". I've changed it to t:id="form" per your 
recommendation and am now getting a


java.lang.StackOverflowError

Stack trace

java.lang.String.equalsIgnoreCase(String.java:950)
o.a.t.internal.services.ComponentEventImpl.matchesByEventType(ComponentEventImpl.java:81)
o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java)
o.a.t.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893)
o.a.t.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:1002)
o.a.t.internal.structure.InternalComponentResourcesImpl.triggerEvent(InternalComponentResourcesImpl.java:141)
o.a.t.corelib.components.BeanEditForm.onPrepareFromForm(BeanEditForm.java:196)
o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java)
o.a.t.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893)
o.a.t.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:1002)
o.a.t.internal.structure.InternalComponentResourcesImpl.triggerEvent(InternalComponentResourcesImpl.java:141)
o.a.t.corelib.components.BeanEditForm.onPrepareFromForm(BeanEditForm.java:196)
o.a.t.corelib.components.BeanEditForm.handleComponentEvent(BeanEditForm.java)
.... the keeps on going ....


o.a.t = org.apache.tapestry.


Thank




Filip S. Adamsen wrote:
> Hi Olivier,
> 
> Try this in your page class:
> 
> @Component(id = "form")
> private BeanEditForm _form;
> 
> And this in your page template:
> 
> <form t:type="beaneditform" t:id="form" object="loginData"></form>
> 
> Hope this helps.
> 
> -Filip
> 
> Olivier Jacquet skrev:
>>
>> Yet even with this clue I cannot get it to work. How do I access the 
>> BeanEditForm with my page class?
>>
>> With:
>>     @Component
>>     private BeanEditForm _form;
>>
>>
>> I'm sill getting the exception:
>> Component org.example.hilo.pages.Login does not contain an embedded 
>> component with id 'form'.
>>
>>
>> So now the question becomes: "How do I get access to the BeanEditForm 
>> component from within my pages class?".
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [WARNING] T5: recordError on BeanEditForm

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi Olivier,

Try this in your page class:

@Component(id = "form")
private BeanEditForm _form;

And this in your page template:

<form t:type="beaneditform" t:id="form" object="loginData"></form>

Hope this helps.

-Filip

Olivier Jacquet skrev:
> 
> Yet even with this clue I cannot get it to work. How do I access the 
> BeanEditForm with my page class?
> 
> With:
>     @Component
>     private BeanEditForm _form;
> 
> 
> I'm sill getting the exception:
> Component org.example.hilo.pages.Login does not contain an embedded 
> component with id 'form'.
> 
> 
> So now the question becomes: "How do I get access to the BeanEditForm 
> component from within my pages class?".

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [WARNING] T5: recordError on BeanEditForm

Posted by Olivier Jacquet <oj...@jax.be>.
Yet even with this clue I cannot get it to work. How do I access the 
BeanEditForm with my page class?

With:
	@Component
	private BeanEditForm _form;


I'm sill getting the exception:
Component org.example.hilo.pages.Login does not contain an embedded 
component with id 'form'.


So now the question becomes: "How do I get access to the BeanEditForm 
component from within my pages class?".




SergeEby wrote:
> Hi,
> 
> You can access the form from the BeanEditForm component:
> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/BeanEditForm.html
> 
> /Serge
> 
> 
> Massimo Lusetti wrote:
>> On 3/4/07, Olivier Jacquet <oj...@jax.be> wrote:
>>
>>> How can I record additional errors on BeanEditForm. I cannot get access
>>> to the form with:
>>>
>>> @Component
>>> private Form _form;
>> Does the BeanEditForm's form has form id of "form" or something else?
>>
>> -- 
>> Massimo
>> http://meridio.blogspot.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [WARNING] T5: recordError on BeanEditForm

Posted by SergeEby <sd...@hotmail.com>.
Hi,

You can access the form from the BeanEditForm component:
http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/BeanEditForm.html

/Serge


Massimo Lusetti wrote:
> 
> On 3/4/07, Olivier Jacquet <oj...@jax.be> wrote:
> 
>> How can I record additional errors on BeanEditForm. I cannot get access
>> to the form with:
>>
>> @Component
>> private Form _form;
> 
> Does the BeanEditForm's form has form id of "form" or something else?
> 
> -- 
> Massimo
> http://meridio.blogspot.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-recordError-on-BeanEditForm-tf3342827.html#a9297261
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: recordError on BeanEditForm

Posted by Massimo Lusetti <ml...@gmail.com>.
On 3/4/07, Olivier Jacquet <oj...@jax.be> wrote:

> How can I record additional errors on BeanEditForm. I cannot get access
> to the form with:
>
> @Component
> private Form _form;

Does the BeanEditForm's form has form id of "form" or something else?

-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org