You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joshua Jackson <jo...@gmail.com> on 2007/09/05 05:18:04 UTC

T5: How to use org.apache.tapestry.corelib.components.Select ?

Dear all,

I had a problem using the Select component.

I have a List of Members that I want to populate into the Select component.

Here is my html template:
<select t:type="Select" model="members" value="member"></select>

And here's my Page class:
@Inject @Parameter Member member;
private List<Member> members;

But I get this exception:
No adapter from type com.taxandtech.projexion.entities.Member to type
org.apache.tapestry.services.ValueEncoderFactory is available
(registered types are java.lang.Enum, java.lang.String).

I've tried adding a ValueEncoder, although it hasn't worked yet but it
seems to be a long way to register the Member entity to the value
encoder. Is there an easier way to use the Select component?

Thanks in advance.

:)

-- 
It's not just about coding, it's a matter of fulfilling your core being

YM!: thejavafreak
Blog: http://joshuajava.wordpress.com/

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


Re: T5: How to use org.apache.tapestry.corelib.components.Select ?

Posted by Davor Hrg <hr...@gmail.com>.
Daniel Jue started the interest and created nice examples...

I've played arround with examples from the wiki and created a simplified
SelectModel
without BeanUtils dependancy

http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects


the catch is that you still need to inject PropertyAccess service into your
page
to supply it to this SelectModel implementation which is from my point of
view more than user should know about tapestry for doing such a simple task
(of course if example @inject is provided in the doc for the model ... thna
it's ok I guess...)

Davor Hrg

On 9/5/07, Joshua Jackson < joshua.java@gmail.com> wrote:
>
> Again,
>
> Thanks very much Nick.
>
> I'm interested with the code from here:
> http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+5+GenericSelectionModel
>
>
> I think it would be great if it is bundled in T5 core. :)
>
> Thanks in advance
>
> On 9/5/07, Nick Westgate <ni...@key-planning.co.jp> wrote:
> > Even if you supply a ValueEncode you might run into a bug in T5.0.5.
> > https://issues.apache.org/jira/browse/TAPESTRY-1597
> > (This was just fixed in SVN.)
> >
> > Anyway, your first stop for questions like this should be:
> > http://wiki.apache.org/tapestry/Tapestry5HowTos
> >
> > Cheers,
> > Nick.
> >
> >
> > Joshua Jackson wrote:
> > > Dear all,
> > >
> > > I had a problem using the Select component.
> > >
> > > I have a List of Members that I want to populate into the Select
> component.
> > >
> > > Here is my html template:
> > > <select t:type="Select" model="members" value="member"></select>
> > >
> > > And here's my Page class:
> > > @Inject @Parameter Member member;
> > > private List<Member> members;
> > >
> > > But I get this exception:
> > > No adapter from type com.taxandtech.projexion.entities.Member to type
> > > org.apache.tapestry.services.ValueEncoderFactory is available
> > > (registered types are java.lang.Enum, java.lang.String).
> > >
> > > I've tried adding a ValueEncoder, although it hasn't worked yet but it
> > > seems to be a long way to register the Member entity to the value
> > > encoder. Is there an easier way to use the Select component?
> > >
> > > Thanks in advance.
> > >
> > > :)
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> It's not just about coding, it's a matter of fulfilling your core being
>
> YM!: thejavafreak
> Blog: http://joshuajava.wordpress.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T5: How to use org.apache.tapestry.corelib.components.Select ?

Posted by Joshua Jackson <jo...@gmail.com>.
Again,

Thanks very much Nick.

I'm interested with the code from here:
http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+5+GenericSelectionModel

I think it would be great if it is bundled in T5 core. :)

Thanks in advance

On 9/5/07, Nick Westgate <ni...@key-planning.co.jp> wrote:
> Even if you supply a ValueEncode you might run into a bug in T5.0.5.
> https://issues.apache.org/jira/browse/TAPESTRY-1597
> (This was just fixed in SVN.)
>
> Anyway, your first stop for questions like this should be:
> http://wiki.apache.org/tapestry/Tapestry5HowTos
>
> Cheers,
> Nick.
>
>
> Joshua Jackson wrote:
> > Dear all,
> >
> > I had a problem using the Select component.
> >
> > I have a List of Members that I want to populate into the Select component.
> >
> > Here is my html template:
> > <select t:type="Select" model="members" value="member"></select>
> >
> > And here's my Page class:
> > @Inject @Parameter Member member;
> > private List<Member> members;
> >
> > But I get this exception:
> > No adapter from type com.taxandtech.projexion.entities.Member to type
> > org.apache.tapestry.services.ValueEncoderFactory is available
> > (registered types are java.lang.Enum, java.lang.String).
> >
> > I've tried adding a ValueEncoder, although it hasn't worked yet but it
> > seems to be a long way to register the Member entity to the value
> > encoder. Is there an easier way to use the Select component?
> >
> > Thanks in advance.
> >
> > :)
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
It's not just about coding, it's a matter of fulfilling your core being

YM!: thejavafreak
Blog: http://joshuajava.wordpress.com/

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


Re: T5: How to use org.apache.tapestry.corelib.components.Select ?

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Even if you supply a ValueEncode you might run into a bug in T5.0.5.
https://issues.apache.org/jira/browse/TAPESTRY-1597
(This was just fixed in SVN.)

Anyway, your first stop for questions like this should be:
http://wiki.apache.org/tapestry/Tapestry5HowTos

Cheers,
Nick.


Joshua Jackson wrote:
> Dear all,
> 
> I had a problem using the Select component.
> 
> I have a List of Members that I want to populate into the Select component.
> 
> Here is my html template:
> <select t:type="Select" model="members" value="member"></select>
> 
> And here's my Page class:
> @Inject @Parameter Member member;
> private List<Member> members;
> 
> But I get this exception:
> No adapter from type com.taxandtech.projexion.entities.Member to type
> org.apache.tapestry.services.ValueEncoderFactory is available
> (registered types are java.lang.Enum, java.lang.String).
> 
> I've tried adding a ValueEncoder, although it hasn't worked yet but it
> seems to be a long way to register the Member entity to the value
> encoder. Is there an easier way to use the Select component?
> 
> Thanks in advance.
> 
> :)
> 

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