You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Leonard <ar...@gmail.com> on 2011/02/10 12:14:35 UTC
Dynamic combo box - Tapestry 5.2.2
Hi,
I am new to Tapestry. I am working on a project in which we require dynamic
combo box functionality where in you select some value in first combo box
and the second gets populated according to the selected value in first and
so on. I have gone through the previous posts on the same topic and got to
know this could be resolved using EventListener. But I am afraid any such
annotation is present in Tapestry 5.2.2(version in use) or if there is some
other annotation which can be used specifically of this purpose. Any help on
how i can approach to resolve my problem would be highly appreciated.
Thanks in advance.
Regards
Leonard
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p3379129.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by "Newham, Cameron" <ca...@bl.uk>.
The biggest problem I have with using Zones for dynamic combo boxes is
that the browser back button causes the whole thing to fail from a user
perspective.
Tapestry doesn't solve this out of the box - which is rather
disappointing.* Especially when it is advertised how easy AJAX is to use
with Tapestry.
I found it all to frustrating and gave up and returned to using some
Javascript to submit a form on combobox select to do the dynamics. Slow
- but at least it works.
c.
* of course, I'm always happy to have any error in my thinking pointed
out, but from an earlier question I asked on this list it appears that
this is a known issue with AJAX and the only way around it is to use
third-party hacks.
-----Original Message-----
From: Mark [mailto:mark-lists@xeric.net]
Sent: 10 February 2011 20:07
To: Tapestry users
Subject: Re: Dynamic combo box - Tapestry 5.2.2
> Atcach, can you give a complete example (with .tml and controler
code), with
> multiple select to refresh.
Take a look at this as well:
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/aja
xselect1
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
**************************************************************************
Experience the British Library online at http://www.bl.uk/
The British Library’s new interactive Annual Report and Accounts 2009/10 : http://www.bl.uk/knowledge
Help the British Library conserve the world's knowledge. Adopt a Book. http://www.bl.uk/adoptabook
The Library's St Pancras site is WiFi - enabled
*************************************************************************
The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the mailto:postmaster@bl.uk : The contents of this e-mail must not be disclosed or copied without the sender's consent.
The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author.
*************************************************************************
Think before you print
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic combo box - Tapestry 5.2.2
Posted by Everton Agner <to...@gmail.com>.
Hi!
I haven't used T5.2.x yet, and I saw that you've mentioned the improvements
on combos's chaining.
Do the "out of the box" process of chaining combos has the problem (like
T5.1 + zoneupdater) of clearing the other fields on the form? That made us
set them as @Persist'ent?
Thanks!
_______________________
Everton Agner Ramos
2011/3/29 robnangle <ro...@gmail.com>
>
> lltyk wrote:
> >
> > The js file needs to be in the same package directory, but in the
> > resources
> > directory instead of the java directory.
> >
> > --
> > View this message in context:
> >
> http://tapestry-users.832.n2.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp6011286p6218845.html
> > Sent from the Tapestry Users 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
> >
>
> Cheers, Havent worked much with java script so I had them both in the same
> package..
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4269316.html
> 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: Dynamic combo box - Tapestry 5.2.2
Posted by robnangle <ro...@gmail.com>.
lltyk wrote:
>
> The js file needs to be in the same package directory, but in the
> resources
> directory instead of the java directory.
>
> --
> View this message in context:
> http://tapestry-users.832.n2.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp6011286p6218845.html
> Sent from the Tapestry Users 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
>
Cheers, Havent worked much with java script so I had them both in the same
package..
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4269316.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by Geoff Callender <ge...@gmail.com>.
I think that's true for maven, by its convention.
Robert, the source of confusion may be that JumpStart is built with Ant, which allows us to put js, tml, java, properties, etc. together under the java directory.
On 29/03/2011, at 10:48 PM, LLTYK wrote:
> The js file needs to be in the same package directory, but in the resources
> directory instead of the java directory.
>
> --
> View this message in context: http://tapestry-users.832.n2.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp6011286p6218845.html
> Sent from the Tapestry Users 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic combo box - Tapestry 5.2.2
Posted by LLTYK <LL...@mailinator.com>.
The js file needs to be in the same package directory, but in the resources
directory instead of the java directory.
--
View this message in context: http://tapestry-users.832.n2.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp6011286p6218845.html
Sent from the Tapestry Users 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: Dynamic combo box - Tapestry 5.2.2
Posted by Yohan Yudanara <yo...@gmail.com>.
hmm sorry, I can't help you further because I never use that jumpstart
code with tapestry 5.2.2.
I've use that tapestry jumpstart code with tapestry 5.1.0.5
btw, why don't you upgrade to tapestry 5.2.4 ?
I've used T 5.2.4 and creating dynamic combobox is very simple. Don't
need to use zoneupdater anymore.
I've never try using T 5.2.2
On Tue, Mar 29, 2011 at 6:02 PM, robnangle <ro...@gmail.com> wrote:
> Ye it should be straight forward copying the example..
>
> Yes they are both in the mixins package..
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4269174.html
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic combo box - Tapestry 5.2.2
Posted by robnangle <ro...@gmail.com>.
Ye it should be straight forward copying the example..
Yes they are both in the mixins package..
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4269174.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by Yohan Yudanara <yo...@gmail.com>.
hmm.. strange error :)
just want to make sure, do you already put ZoneUpdater.java and
zone_updater.js on the same folder (on <package-name>/mixins) ?
On Tue, Mar 29, 2011 at 5:45 PM, robnangle <ro...@gmail.com> wrote:
>
> Yohan Yudanara-2 wrote:
>>
>> Look carefully on the error message..
>>
>> > With the above ajax, i get the following error:
>> >
>> > org.apache.tapestry5.internal.services.RenderQueueException
>> > Render queue error in SetupRender[ajax/Select1:carmake]: Unable to
>> locate
>> > asset 'classpath:FantasyGaa/mixins/zone_updater.js' (the file does
>> not
>> > exist).
>>
>> Do you already create zone_updater.js on mixins folder?
>>
>>
>
> Ye the mixins folder has:
>
> "ZoneUpdater.java" and "zone_updater.js"
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4269153.html
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic combo box - Tapestry 5.2.2
Posted by robnangle <ro...@gmail.com>.
Yohan Yudanara-2 wrote:
>
> Look carefully on the error message..
>
> > With the above ajax, i get the following error:
> >
> > org.apache.tapestry5.internal.services.RenderQueueException
> > Render queue error in SetupRender[ajax/Select1:carmake]: Unable to
> locate
> > asset 'classpath:FantasyGaa/mixins/zone_updater.js' (the file does
> not
> > exist).
>
> Do you already create zone_updater.js on mixins folder?
>
>
Ye the mixins folder has:
"ZoneUpdater.java" and "zone_updater.js"
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4269153.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by Yohan Yudanara <yo...@gmail.com>.
Look carefully on the error message..
> With the above ajax, i get the following error:
>
> org.apache.tapestry5.internal.services.RenderQueueException
> Render queue error in SetupRender[ajax/Select1:carmake]: Unable to locate
> asset 'classpath:FantasyGaa/mixins/zone_updater.js' (the file does not
> exist).
Do you already create zone_updater.js on mixins folder?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic combo box - Tapestry 5.2.2
Posted by robnangle <ro...@gmail.com>.
Yohan Yudanara-2 wrote:
>
> (http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/ajaxselect1)
>
With the above ajax, i get the following error:
org.apache.tapestry5.internal.services.RenderQueueException
Render queue error in SetupRender[ajax/Select1:carmake]: Unable to locate
asset 'classpath:FantasyGaa/mixins/zone_updater.js' (the file does not
exist).
Yohan Yudanara-2 wrote:
>
> http://tapestry.apache.org/tapestry5.2-dev/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
> on "Chaining of Select Components" section.
>
With this i get:
org.apache.tapestry5.internal.services.RenderQueueException
Render queue error in BeforeRenderTemplate[SelectZoneDemo:carmodel]:
Parameter 'model' of component SelectZoneDemo:carmodel is bound to null.
This parameter is not allowed to be null.
Both having being followed completely. Any idea's?
Tapestry version is 5.1.0.5
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4269056.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by Yohan Yudanara <yo...@gmail.com>.
What version of tapestry are you using?
If you use Tapestry 5.2, you don't need to follow jumpstart
(http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/ajaxselect1)
to create Ajax Select. You just need to follow this:
http://tapestry.apache.org/tapestry5.2-dev/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
on "Chaining of Select Components" section.
If you use T5.1, follow jumpstart tutorial, and follow it completely.
You need to create ZoneUpdater.java and also zone_updater.js at the
bottom of jumpstart tutorial.
On Mon, Mar 28, 2011 at 5:34 PM, robnangle <ro...@gmail.com> wrote:
> I could possibly have it in the correct place but am gettint this error:
>
> Failure creating embedded component 'carMake' of
> FantasyGaa.pages.ajax.AjaxSelect1: Unable to resolve 'zoneUpdater' to a
> mixin class name. Available mixin types: Autocomplete, DiscardBody,
> NotEmpty, RenderDisabled, RenderInformals, TriggerFragment.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4267337.html
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic combo box - Tapestry 5.2.2
Posted by robnangle <ro...@gmail.com>.
I could possibly have it in the correct place but am gettint this error:
Failure creating embedded component 'carMake' of
FantasyGaa.pages.ajax.AjaxSelect1: Unable to resolve 'zoneUpdater' to a
mixin class name. Available mixin types: Autocomplete, DiscardBody,
NotEmpty, RenderDisabled, RenderInformals, TriggerFragment.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4267337.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by robnangle <ro...@gmail.com>.
Mark wrote:
>
> > Atcach, can you give a complete example (with .tml and controler
> code), with
> > multiple select to refresh.
>
> Take a look at this as well:
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/ajaxselect1
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
Hi,
I have a similar problem and would like to implement the above ajax select.
However having not really used javascript before im wondering where does the
javascript file go in the tapestry file system?
Cheers
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p4267334.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by Mark <ma...@xeric.net>.
> Atcach, can you give a complete example (with .tml and controler code), with
> multiple select to refresh.
Take a look at this as well:
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/ajaxselect1
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic combo box - Tapestry 5.2.2
Posted by Brendan Le Ny <bl...@codelutin.com>.
Hi,
Atcach, can you give a complete example (with .tml and controler code),
with multiple select to refresh.
What if i want to refresh the content of a select or a given part of a
form when user change a checkbox value ?
I would like someone to give me an exact code because i've my way to do
things (sometimes using chenillekit onChange event) but there may be a
better way to do that (cause my way need to many code).
Regards.
--
Brendan Le Ny <bl...@codelutin.com>
Code Lutin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic combo box - Tapestry 5.2.2
Posted by Yohan Yudanara <yo...@gmail.com>.
If you use T5.2, then you can use sample code on documentation Page:
http://tapestry.apache.org/tapestry5.2-dev/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
Look into "Chaining of Select Components" section.
T5.2 have new "zone" attribute. You can use this attribute to implement your
Ajax Select.
If you use T5.1, then you need to follow jumpstart link sample as given by
Mark.
Best regards,
Yohan Yudanara
On Thu, Feb 10, 2011 at 9:16 PM, Leonard <ar...@gmail.com>wrote:
>
> Thanks atcach for the quick reply! I'll try it at my end and will let you
> know if it solves my problem. :)
>
> Regards
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p3379382.html
> 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: Dynamic combo box - Tapestry 5.2.2
Posted by Leonard <ar...@gmail.com>.
Thanks atcach for the quick reply! I'll try it at my end and will let you
know if it solves my problem. :)
Regards
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p3379382.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by atcach <at...@gmail.com>.
Hi, you could put (in the tml) a zone in each combo.
Then in the onSelected event put the necessary code to update the other
combos.
<t:form t:id="formularioselect">
<select t:type="select" t:id="select_1"
model="model" encoder="encoder" value="value"
t:zone="selectZone" />
</t:form>
<div t:type="zone" t:id="selectZone" class="selectform" >
<t:form t:id="formularioselect2" >
<select t:type="select" t:id="select_2"
model="mdoel2" encoder="encoder2" value="value2"
t:zone="selectX"/>
</t:form>
</div>
Then on the .java put your code in :
public Object onValueChanged(Object o){
Get the first object, put data in the second one
}
Regards
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp3379129p3379148.html
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: Dynamic combo box - Tapestry 5.2.2
Posted by LLTYK <LL...@mailinator.com>.
I use the ZoneUpdater mixin to do this.
http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html
<t:select t:id="firstselect" ... rest of the stuff ...
t:mixins="zoneUpdater" t:zone="myzone" t:clientEvent="change" event="change"
/>
@Log
void onChangeFromFirstSelect(String value)
{
//set options for second select
}
The zone encompasses all the selects.
--
View this message in context: http://tapestry-users.832.n2.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp6011286p6011408.html
Sent from the Tapestry Users 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