You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Koen Segers <Ko...@scarlet.be> on 2005/02/14 02:21:57 UTC

dynamic form

Hi,

I'm sure you know what I mean, but it is quite difficult to explain...

I want a form where you have 2 select fields.
The first field is the most important select.
When I select a field, I want the second select to appear with the possible 
values corresponding the first select.
The code works if I press the submit button. Then the second select is 
automaticly filled in with the correct value. I want this functionality 
without pression the button...

Any ideas?

-- 

Koen Segers

<ko...@scarlet.be>
<http://eddyvite.dyndns.org>

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


Re: dynamic form

Posted by Koen Segers <Ko...@scarlet.be>.
I will first use the submitOnChange, because the need of time is extremely 
large. Later on I will implement it by using JavaScript...

Thx everybody !

On Monday 14 February 2005 06:24, Daniel Honig wrote:
> Which is a great suggestion other than my policy of deliberately tyring
> to avoid any
> and all javascript work ;)...However, if someone has most of the client
> side work done,
> I do think this could be turned into a rather elegant component on it's
> own. The RC
> could then be shared or added to the "contrib" library.
>
> -dh
>
> Albert Kwong wrote:
> >Once you have the following working, you may want to
> >take the Tapestry spirit and make the component
> >reusable.  Chapter 8.2 of Tapestry in Action is a good
> >starting point.
> >
> >Albert
> >
> > --- Daniel Honig <da...@gmail.com> 內容:
> >
> >>This is usually achieved via Javascript.  You would
> >>give the page object
> >>methods to provide access to the collections that
> >>you with to use.  You
> >>would then use the collections via foreach and
> >>insert components to
> >>generate a Javascript data structure such as an
> >>Array of Arrays or Hash
> >>of Hashes.  In the select components onClick event
> >>you would then
> >>dynamically change the contents of the select list.
> >>So the only
> >>interaction with Tapestry per se would be giving the
> >>page object a
> >>method to generate the list, and I'm taking a
> >>liberty of assuming you
> >>are using a database....If you do not have the need
> >>for a data driven
> >>approach you could simply hardcode all the values
> >>into the HTML page or
> >>javascript file.   If you look around you will find
> >>many examples of how
> >>to do this.  You need to have a fundamental
> >>understanding of DOM
> >>manipulatioin via Javascript before you go about
> >>implementing this.
> >>
> >>Cheers,
> >> -dh
> >>
> >>Koen Segers wrote:
> >>>Hi,
> >>>
> >>>I'm sure you know what I mean, but it is quite
> >>
> >>difficult to explain...
> >>
> >>>I want a form where you have 2 select fields.
> >>>The first field is the most important select.
> >>>When I select a field, I want the second select to
> >>
> >>appear with the possible
> >>
> >>>values corresponding the first select.
> >>>The code works if I press the submit button. Then
> >>
> >>the second select is
> >>
> >>>automaticly filled in with the correct value. I
> >>
> >>want this functionality
> >>
> >>>without pression the button...
> >>>
> >>>Any ideas?
> >
> >---------------------------------------------------------------------
> >
> >>To unsubscribe, e-mail:
> >>tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail:
> >>tapestry-user-help@jakarta.apache.org
> >
> >=====
> >Are you an MBA?  Check out http://www.mba.hk for value added services.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org

-- 

Koen Segers

<ko...@scarlet.be>
<http://eddyvite.dyndns.org>

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


Re: dynamic form

Posted by Daniel Honig <da...@gmail.com>.
Which is a great suggestion other than my policy of deliberately tyring
to avoid any
and all javascript work ;)...However, if someone has most of the client
side work done,
I do think this could be turned into a rather elegant component on it's
own. The RC
could then be shared or added to the "contrib" library.

-dh

Albert Kwong wrote:

>Once you have the following working, you may want to
>take the Tapestry spirit and make the component
>reusable.  Chapter 8.2 of Tapestry in Action is a good
>starting point.
>
>Albert
>
> --- Daniel Honig <da...@gmail.com> 內容:
>  
>
>>This is usually achieved via Javascript.  You would
>>give the page object 
>>methods to provide access to the collections that
>>you with to use.  You 
>>would then use the collections via foreach and
>>insert components to 
>>generate a Javascript data structure such as an
>>Array of Arrays or Hash 
>>of Hashes.  In the select components onClick event
>>you would then 
>>dynamically change the contents of the select list. 
>>So the only 
>>interaction with Tapestry per se would be giving the
>>page object a 
>>method to generate the list, and I'm taking a
>>liberty of assuming you 
>>are using a database....If you do not have the need
>>for a data driven 
>>approach you could simply hardcode all the values
>>into the HTML page or 
>>javascript file.   If you look around you will find
>>many examples of how 
>>to do this.  You need to have a fundamental
>>understanding of DOM 
>>manipulatioin via Javascript before you go about
>>implementing this.
>>
>>Cheers,
>> -dh
>>
>>Koen Segers wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>I'm sure you know what I mean, but it is quite
>>>      
>>>
>>difficult to explain...
>>    
>>
>>>I want a form where you have 2 select fields.
>>>The first field is the most important select.
>>>When I select a field, I want the second select to
>>>      
>>>
>>appear with the possible 
>>    
>>
>>>values corresponding the first select.
>>>The code works if I press the submit button. Then
>>>      
>>>
>>the second select is 
>>    
>>
>>>automaticly filled in with the correct value. I
>>>      
>>>
>>want this functionality 
>>    
>>
>>>without pression the button...
>>>
>>>Any ideas?
>>>
>>> 
>>>
>>>      
>>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail:
>>tapestry-user-help@jakarta.apache.org
>>
>> 
>>    
>>
>
>=====
>Are you an MBA?  Check out http://www.mba.hk for value added services.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>


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


RE: pagelink problem

Posted by david joffrin <da...@hotmail.com>.
I am not an expert at all... but try to help a bit!
You should have a OGNL expression, may be: ognl:@[package].LoginSuccess

David Joffrin
MSN: david_joffrin@hotmail.com

>From: "Sunil" <su...@hotmail.com>
>Reply-To: "Tapestry users" <ta...@jakarta.apache.org>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Subject: pagelink problem
>Date: Mon, 14 Feb 2005 15:12:38 +0530
>
>Hi all,
>
>I have got one problem with Pagelink component. If I use PageLink in the 
>html(like this) it's working
>
>    <a jwcid="@PageLink" page="LoginSuccess">Return to search page</a>
>
>But if I try to use like this it's not working...creating component and 
>providing it's specification in the .page file
>
>Abc.html
>
>......
>
><a jwcid="LoginSuccessLink">Return to search page</a>
>
>.......
>
>Abc.page
>
>.......
>
><component id="LoginSuccessLink" type="PageLink">
>        <binding name="page" expression="LoginSuccess"/>    <--- line 31
></component>
>
>.......
>
>I m getting this error
>
>      Unable to resolve expression 'LoginSuccess' for 
>org.apache.tapestry.html.BasePage@aea8cf[ShowDetail].
>      binding: ExpressionBinding[Abc LoginSuccess]
>      location: context:/WEB-INF/Abc.page, line 31, column 57
>
>
>Can anybody ...help me...
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>



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


pagelink problem

Posted by Sunil <su...@hotmail.com>.
Hi all,

I have got one problem with Pagelink component. If I use PageLink in the 
html(like this) it's working

    <a jwcid="@PageLink" page="LoginSuccess">Return to search page</a>

But if I try to use like this it's not working...creating component and 
providing it's specification in the .page file

Abc.html

......

<a jwcid="LoginSuccessLink">Return to search page</a>

.......

Abc.page

.......

 <component id="LoginSuccessLink" type="PageLink">
        <binding name="page" expression="LoginSuccess"/>    <--- line 31
</component>

.......

I m getting this error

      Unable to resolve expression 'LoginSuccess' for 
org.apache.tapestry.html.BasePage@aea8cf[ShowDetail].
      binding: ExpressionBinding[Abc LoginSuccess]
      location: context:/WEB-INF/Abc.page, line 31, column 57


Can anybody ...help me...

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


Re: dynamic form

Posted by Albert Kwong <ma...@yahoo.com>.
Once you have the following working, you may want to
take the Tapestry spirit and make the component
reusable.  Chapter 8.2 of Tapestry in Action is a good
starting point.

Albert

 --- Daniel Honig <da...@gmail.com> 內容:
> This is usually achieved via Javascript.  You would
> give the page object 
> methods to provide access to the collections that
> you with to use.  You 
> would then use the collections via foreach and
> insert components to 
> generate a Javascript data structure such as an
> Array of Arrays or Hash 
> of Hashes.  In the select components onClick event
> you would then 
> dynamically change the contents of the select list. 
> So the only 
> interaction with Tapestry per se would be giving the
> page object a 
> method to generate the list, and I'm taking a
> liberty of assuming you 
> are using a database....If you do not have the need
> for a data driven 
> approach you could simply hardcode all the values
> into the HTML page or 
> javascript file.   If you look around you will find
> many examples of how 
> to do this.  You need to have a fundamental
> understanding of DOM 
> manipulatioin via Javascript before you go about
> implementing this.
> 
> Cheers,
>  -dh
> 
> Koen Segers wrote:
> 
> >Hi,
> >
> >I'm sure you know what I mean, but it is quite
> difficult to explain...
> >
> >I want a form where you have 2 select fields.
> >The first field is the most important select.
> >When I select a field, I want the second select to
> appear with the possible 
> >values corresponding the first select.
> >The code works if I press the submit button. Then
> the second select is 
> >automaticly filled in with the correct value. I
> want this functionality 
> >without pression the button...
> >
> >Any ideas?
> >
> >  
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 
>  

=====
Are you an MBA?  Check out http://www.mba.hk for value added services.

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


Re: dynamic form

Posted by Daniel Honig <da...@gmail.com>.
This is usually achieved via Javascript.  You would give the page object 
methods to provide access to the collections that you with to use.  You 
would then use the collections via foreach and insert components to 
generate a Javascript data structure such as an Array of Arrays or Hash 
of Hashes.  In the select components onClick event you would then 
dynamically change the contents of the select list.  So the only 
interaction with Tapestry per se would be giving the page object a 
method to generate the list, and I'm taking a liberty of assuming you 
are using a database....If you do not have the need for a data driven 
approach you could simply hardcode all the values into the HTML page or 
javascript file.   If you look around you will find many examples of how 
to do this.  You need to have a fundamental understanding of DOM 
manipulatioin via Javascript before you go about implementing this.

Cheers,
 -dh

Koen Segers wrote:

>Hi,
>
>I'm sure you know what I mean, but it is quite difficult to explain...
>
>I want a form where you have 2 select fields.
>The first field is the most important select.
>When I select a field, I want the second select to appear with the possible 
>values corresponding the first select.
>The code works if I press the submit button. Then the second select is 
>automaticly filled in with the correct value. I want this functionality 
>without pression the button...
>
>Any ideas?
>
>  
>


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


Re: dynamic form

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Quick solution is to use the submitOnChange attribute of the 
PropertySelection component.     Though a more JavaScripty solution is 
usually more desirable, perhaps using the hot XmlHttpRequest feature to 
get more data if its too much to send down in the first render.

	Erik

On Feb 13, 2005, at 8:21 PM, Koen Segers wrote:

> Hi,
>
> I'm sure you know what I mean, but it is quite difficult to explain...
>
> I want a form where you have 2 select fields.
> The first field is the most important select.
> When I select a field, I want the second select to appear with the 
> possible
> values corresponding the first select.
> The code works if I press the submit button. Then the second select is
> automaticly filled in with the correct value. I want this functionality
> without pression the button...
>
> Any ideas?
>
> -- 
>
> Koen Segers
>
> <ko...@scarlet.be>
> <http://eddyvite.dyndns.org>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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