You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Derek Brown <ze...@yahoo.com> on 2005/10/21 02:47:48 UTC

PropertySelection Problem

In my home page I have something like:

<form jwcid="@Form">
  <span jwcid="@PropertySelection"
model="ognl:@com.example.pages.Selector@GENDER_MODEL" 
    value="ognl:currentSelection"
onchange="literal:javascript:this.form.events.submit();"/>
	</form>

This code works fine when its on the home page. If I
move it into another component and then include the
component in the Home page, I always get the error,
component ($Form) not found in home page.

Any Ideas?

Component $BasePage_149@4d5575[Home] does not contain
a component $Form.
org.apache.tapestry.AbstractComponent.getComponent(AbstractComponent.java:344)
org.apache.tapestry.AbstractPage.getNestedComponent(AbstractPage.java:229)
org.apache.tapestry.engine.DirectService.service(DirectService.java:101)

Thanks


		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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


Re: PropertySelection Problem

Posted by Jesse Kuhnert <jk...@gmail.com>.
form.events is an arbitrary object that tapestry adds to the form object to
give it additional functionality. It's found under
org.apache.tapestry.form.Form.js . Calling the events.submit() causes all of
the added listeners/validators/etc to be run as per normal.



On 10/24/05, Chris Norris <th...@gmail.com> wrote:
>
> I don't have a solution, nor have I had that problem, but I have some
> comments. We're still using the deprecated submitOnChange parameter for
> the
> PropertySelection components. The documentation says of that parameter:
> "If
> true, then additional JavaScript is added to submit the containing form
> when
> select is changed. Equivalent to specifying a JavaScript event handler of
> this.form.submit()."
>
> Wouldn't you want to use "this.form.submit()" instead of "
> this.form.events.submit()"? I couldn't find "form.events" in my javascript
> reference book, so I'm not sure what that means.
>
> On 10/22/05, Derek Brown <ze...@yahoo.com> wrote:
> >
> > Anyone else encounter this problem? Do I need to
> > change something if I put this in a component?
> >
> > Thanks
> >
> > --- Derek Brown <ze...@yahoo.com> wrote:
> >
> > > In my home page I have something like:
> > >
> > > <form jwcid="@Form">
> > > <span jwcid="@PropertySelection"
> > >
> > model="ognl:@com.example.pages.Selector@GENDER_MODEL"
> > >
> > > value="ognl:currentSelection"
> > >
> > onchange="literal:javascript:this.form.events.submit();"/>
> > > </form>
> > >
> > > This code works fine when its on the home page. If I
> > > move it into another component and then include the
> > > component in the Home page, I always get the error,
> > > component ($Form) not found in home page.
> > >
> > > Any Ideas?
> > >
> > > Component $BasePage_149@4d5575[Home] does not
> > > contain
> > > a component $Form.
> > >
> > org.apache.tapestry.AbstractComponent.getComponent(
> AbstractComponent.java
> > :344)
> > >
> > org.apache.tapestry.AbstractPage.getNestedComponent(AbstractPage.java
> :229)
> > >
> > org.apache.tapestry.engine.DirectService.service(DirectService.java:101)
> > >
> > > Thanks
> > >
> > >
> > >
> > > __________________________________
> > > Start your day with Yahoo! - Make it your home page!
> > >
> > > http://www.yahoo.com/r/hs
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
> >
> > __________________________________
> > Start your day with Yahoo! - Make it your home page!
> > http://www.yahoo.com/r/hs
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>

Re: PropertySelection Problem

Posted by Chris Norris <th...@gmail.com>.
I don't have a solution, nor have I had that problem, but I have some
comments. We're still using the deprecated submitOnChange parameter for the
PropertySelection components. The documentation says of that parameter: "If
true, then additional JavaScript is added to submit the containing form when
select is changed. Equivalent to specifying a JavaScript event handler of
this.form.submit()."

Wouldn't you want to use "this.form.submit()" instead of "
this.form.events.submit()"? I couldn't find "form.events" in my javascript
reference book, so I'm not sure what that means.

On 10/22/05, Derek Brown <ze...@yahoo.com> wrote:
>
> Anyone else encounter this problem? Do I need to
> change something if I put this in a component?
>
> Thanks
>
> --- Derek Brown <ze...@yahoo.com> wrote:
>
> > In my home page I have something like:
> >
> > <form jwcid="@Form">
> > <span jwcid="@PropertySelection"
> >
> model="ognl:@com.example.pages.Selector@GENDER_MODEL"
> >
> > value="ognl:currentSelection"
> >
> onchange="literal:javascript:this.form.events.submit();"/>
> > </form>
> >
> > This code works fine when its on the home page. If I
> > move it into another component and then include the
> > component in the Home page, I always get the error,
> > component ($Form) not found in home page.
> >
> > Any Ideas?
> >
> > Component $BasePage_149@4d5575[Home] does not
> > contain
> > a component $Form.
> >
> org.apache.tapestry.AbstractComponent.getComponent(AbstractComponent.java
> :344)
> >
> org.apache.tapestry.AbstractPage.getNestedComponent(AbstractPage.java:229)
> >
> org.apache.tapestry.engine.DirectService.service(DirectService.java:101)
> >
> > Thanks
> >
> >
> >
> > __________________________________
> > Start your day with Yahoo! - Make it your home page!
> >
> > http://www.yahoo.com/r/hs
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tapestry-user-help@jakarta.apache.org
> >
> >
>
>
>
>
> __________________________________
> Start your day with Yahoo! - Make it your home page!
> http://www.yahoo.com/r/hs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

Re: PropertySelection Problem

Posted by Howard Lewis Ship <hl...@gmail.com>.
It would be useful to see a view-source from when you've moved the
Form into a component.

Also, it is always best to give ids to your components, especially
anything form related.

The URL generated for a form-inside-a-component is different than the
URL for a form-on-the-page; you did run the app, let it build new
HTML, and work from there, right?

On 10/20/05, Derek Brown <ze...@yahoo.com> wrote:
> In my home page I have something like:
>
> <form jwcid="@Form">
>   <span jwcid="@PropertySelection"
> model="ognl:@com.example.pages.Selector@GENDER_MODEL"
>     value="ognl:currentSelection"
> onchange="literal:javascript:this.form.events.submit();"/>
>         </form>
>
> This code works fine when its on the home page. If I
> move it into another component and then include the
> component in the Home page, I always get the error,
> component ($Form) not found in home page.
>
> Any Ideas?
>
> Component $BasePage_149@4d5575[Home] does not contain
> a component $Form.
> org.apache.tapestry.AbstractComponent.getComponent(AbstractComponent.java:344)
> org.apache.tapestry.AbstractPage.getNestedComponent(AbstractPage.java:229)
> org.apache.tapestry.engine.DirectService.service(DirectService.java:101)
>
> Thanks
>
>
>
> __________________________________
> Start your day with Yahoo! - Make it your home page!
> http://www.yahoo.com/r/hs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

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

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


Re: PropertySelection Problem

Posted by Derek Brown <ze...@yahoo.com>.
Anyone else encounter this problem? Do I need to
change something if I put this in a component?

Thanks

--- Derek Brown <ze...@yahoo.com> wrote:

> In my home page I have something like:
> 
> <form jwcid="@Form">
>   <span jwcid="@PropertySelection"
>
model="ognl:@com.example.pages.Selector@GENDER_MODEL"
> 
>     value="ognl:currentSelection"
>
onchange="literal:javascript:this.form.events.submit();"/>
> 	</form>
> 
> This code works fine when its on the home page. If I
> move it into another component and then include the
> component in the Home page, I always get the error,
> component ($Form) not found in home page.
> 
> Any Ideas?
> 
> Component $BasePage_149@4d5575[Home] does not
> contain
> a component $Form.
>
org.apache.tapestry.AbstractComponent.getComponent(AbstractComponent.java:344)
>
org.apache.tapestry.AbstractPage.getNestedComponent(AbstractPage.java:229)
>
org.apache.tapestry.engine.DirectService.service(DirectService.java:101)
> 
> Thanks
> 
> 
> 		
> __________________________________ 
> Start your day with Yahoo! - Make it your home page!
> 
> http://www.yahoo.com/r/hs
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 
> 



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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