You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by in...@softwareentwicklung-hell.de on 2013/08/13 14:35:24 UTC

General Converter

Hi all,

is there a plan to implement Seam like general Converter like the Seam  
Faces Object converter? I know it is not really a cdi topic, but there  
is still a big gap between what Seam was providing and what DeltaSpike  
does.

Thanks and Regards
Florian

Re: General Converter

Posted by in...@softwareentwicklung-hell.de.
Oh well, my intention was a simple entity converter.


Quoting Jason Porter <li...@gmail.com>:

> Yeah, it's doable. We'd need to tweak how we're storing things and possibly
> do a fetch / or merge.
>
> Though the OT is "general" converter, what we're now talking about is an
> entity converter, so which one do people want?
>
>
> On Mon, Aug 19, 2013 at 8:49 AM, Arne Limburg <arne.limburg@openknowledge.de
>> wrote:
>
>> Hmm,
>>
>>
>> Anyway, with an EntityManager we could identify the id field of the entity
>> and convert the entity to its id and vice versa. This could be useful for
>> lists or select menus.
>>
>> Am 19.08.13 16:35 schrieb "Jason Porter" unter <li...@gmail.com>:
>>
>> >Hm, I'll have to go back to the code to see what was done.
>> >
>> >
>> >On Mon, Aug 19, 2013 at 5:06 AM, Pete Muir <pm...@redhat.com> wrote:
>> >
>> >> The Seam 2 converter worked on any entity class, you just had to provide
>> >> it with a reference to the EntityManager.
>> >>
>> >> On 18 Aug 2013, at 05:16, Jason Porter <li...@gmail.com> wrote:
>> >>
>> >> > The problem with a generic JSF converter is that it has to be very
>> >>dumb,
>> >> or you have to use a certain kind of object.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >    The Seam 3 converter went as generic as possible, it also kept
>> >>things
>> >> in the conversion (and should work fine in the request as a
>> >>conversation is
>> >> at least as long as a request). Depending on what state you're storing
>> >>in
>> >> the converter, you probably wouldn't want anything longer than the
>> >> conversation due to memory issues.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >    If memory serves correctly, the Seam 2 converter really only worked
>> >> if you were using the EntityHome classes.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >    If you were to do anything similar to the Seam 2 converter you'd
>> >>need
>> >> to create some sort of object hierarchy the user would need to use, or
>> >>try
>> >> to perform some sort of generic magic with the criteria API, which is
>> >>not
>> >> the easiest of things to do.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >    All that being said, I'd be happy to talk ideas out anyone may
>> >>have.
>> >> >
>> >> >    ?
>> >> > Sent from Mailbox for iPhone
>> >> >
>> >> > On Sat, Aug 17, 2013 at 7:51 PM, hantsy <ha...@yahoo.com.cn> wrote:
>> >> >
>> >> >> I have posted some content on JBoss.org forum before....the Seam3
>> >>faces
>> >> >> object converter does not work well as the Seam 2 one.
>> >> >> The Seam 3 only works in a conversation(the view is a conversation),
>> >>and
>> >> >> it also does not support @ManytoMany.
>> >> >> The Seam2 version works perfectly....it works in request,
>> >>conversation
>> >> >> and other scopes...the better is when I used multi check box...it can
>> >> >> deal with the Hibernate/JPA @ManyToMany relation correctly with any
>> >> >> codes in the backend codes when I selected or unselected an option.
>> >> >> Hantsy
>> >> >> On 8/18/2013 05:42, Adrian Gonzalez wrote:
>> >> >>> Hi,
>> >> >>>
>> >> >>> In the meantime, if you're looking for a JSF converter, you can
>> >>take a
>> >> look at Omnifaces SelectItemsConverter [1].
>> >> >>>
>> >> >>> Regards,
>> >> >>> Adrian
>> >> >>>
>> >> >>> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
>> >> >>>
>> >> >>>
>> >> >>> ________________________________
>> >> >>> De : Mark Struberg <st...@yahoo.de>
>> >> >>> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org>
>> >> >>> Envoyé le : Vendredi 16 août 2013 12h39
>> >> >>> Objet : Re: General Converter
>> >> >>>
>> >> >>>
>> >> >>> Hi Florian!
>> >> >>>
>> >> >>> Not yet on our list. We are currently working on getting 0.5 out of
>> >> the door (code reviews and testing against many containers)
>> >> >>>
>> >> >>>
>> >> >>> Please file a feature request in JIRA describing what this Seam2
>> >> feature is about and why you like it.
>> >> >>>
>> >> >>>
>> >> >>> txs and LieGrue,
>> >> >>> strub
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> ----- Original Message -----
>> >> >>>> From: "info@softwareentwicklung-hell.de" <
>> >> info@softwareentwicklung-hell.de>
>> >> >>>> To: dev@deltaspike.apache.org
>> >> >>>> Cc:
>> >> >>>> Sent: Tuesday, 13 August 2013, 14:35
>> >> >>>> Subject: General Converter
>> >> >>>>
>> >> >>>> Hi all,
>> >> >>>>
>> >> >>>> is there a plan to implement Seam like general Converter like the
>> >>Seam
>> >> >>>> Faces Object converter? I know it is not really a cdi topic, but
>> >>there
>> >> >>>> is still a big gap between what Seam was providing and what
>> >>DeltaSpike
>> >> >>>> does.
>> >> >>>>
>> >> >>>> Thanks and Regards
>> >> >>>> Florian
>> >>
>> >>
>> >
>> >
>> >--
>> >Jason Porter
>> >http://en.gravatar.com/lightguardjp
>>
>>
>
>
> --
> Jason Porter
> http://en.gravatar.com/lightguardjp
>


Re: General Converter

Posted by Jason Porter <li...@gmail.com>.
Yeah, it's doable. We'd need to tweak how we're storing things and possibly
do a fetch / or merge.

Though the OT is "general" converter, what we're now talking about is an
entity converter, so which one do people want?


On Mon, Aug 19, 2013 at 8:49 AM, Arne Limburg <arne.limburg@openknowledge.de
> wrote:

> Hmm,
>
>
> Anyway, with an EntityManager we could identify the id field of the entity
> and convert the entity to its id and vice versa. This could be useful for
> lists or select menus.
>
> Am 19.08.13 16:35 schrieb "Jason Porter" unter <li...@gmail.com>:
>
> >Hm, I'll have to go back to the code to see what was done.
> >
> >
> >On Mon, Aug 19, 2013 at 5:06 AM, Pete Muir <pm...@redhat.com> wrote:
> >
> >> The Seam 2 converter worked on any entity class, you just had to provide
> >> it with a reference to the EntityManager.
> >>
> >> On 18 Aug 2013, at 05:16, Jason Porter <li...@gmail.com> wrote:
> >>
> >> > The problem with a generic JSF converter is that it has to be very
> >>dumb,
> >> or you have to use a certain kind of object.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >    The Seam 3 converter went as generic as possible, it also kept
> >>things
> >> in the conversion (and should work fine in the request as a
> >>conversation is
> >> at least as long as a request). Depending on what state you're storing
> >>in
> >> the converter, you probably wouldn't want anything longer than the
> >> conversation due to memory issues.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >    If memory serves correctly, the Seam 2 converter really only worked
> >> if you were using the EntityHome classes.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >    If you were to do anything similar to the Seam 2 converter you'd
> >>need
> >> to create some sort of object hierarchy the user would need to use, or
> >>try
> >> to perform some sort of generic magic with the criteria API, which is
> >>not
> >> the easiest of things to do.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >    All that being said, I'd be happy to talk ideas out anyone may
> >>have.
> >> >
> >> >    ‹
> >> > Sent from Mailbox for iPhone
> >> >
> >> > On Sat, Aug 17, 2013 at 7:51 PM, hantsy <ha...@yahoo.com.cn> wrote:
> >> >
> >> >> I have posted some content on JBoss.org forum before....the Seam3
> >>faces
> >> >> object converter does not work well as the Seam 2 one.
> >> >> The Seam 3 only works in a conversation(the view is a conversation),
> >>and
> >> >> it also does not support @ManytoMany.
> >> >> The Seam2 version works perfectly....it works in request,
> >>conversation
> >> >> and other scopes...the better is when I used multi check box...it can
> >> >> deal with the Hibernate/JPA @ManyToMany relation correctly with any
> >> >> codes in the backend codes when I selected or unselected an option.
> >> >> Hantsy
> >> >> On 8/18/2013 05:42, Adrian Gonzalez wrote:
> >> >>> Hi,
> >> >>>
> >> >>> In the meantime, if you're looking for a JSF converter, you can
> >>take a
> >> look at Omnifaces SelectItemsConverter [1].
> >> >>>
> >> >>> Regards,
> >> >>> Adrian
> >> >>>
> >> >>> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
> >> >>>
> >> >>>
> >> >>> ________________________________
> >> >>> De : Mark Struberg <st...@yahoo.de>
> >> >>> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org>
> >> >>> Envoyé le : Vendredi 16 août 2013 12h39
> >> >>> Objet : Re: General Converter
> >> >>>
> >> >>>
> >> >>> Hi Florian!
> >> >>>
> >> >>> Not yet on our list. We are currently working on getting 0.5 out of
> >> the door (code reviews and testing against many containers)
> >> >>>
> >> >>>
> >> >>> Please file a feature request in JIRA describing what this Seam2
> >> feature is about and why you like it.
> >> >>>
> >> >>>
> >> >>> txs and LieGrue,
> >> >>> strub
> >> >>>
> >> >>>
> >> >>>
> >> >>> ----- Original Message -----
> >> >>>> From: "info@softwareentwicklung-hell.de" <
> >> info@softwareentwicklung-hell.de>
> >> >>>> To: dev@deltaspike.apache.org
> >> >>>> Cc:
> >> >>>> Sent: Tuesday, 13 August 2013, 14:35
> >> >>>> Subject: General Converter
> >> >>>>
> >> >>>> Hi all,
> >> >>>>
> >> >>>> is there a plan to implement Seam like general Converter like the
> >>Seam
> >> >>>> Faces Object converter? I know it is not really a cdi topic, but
> >>there
> >> >>>> is still a big gap between what Seam was providing and what
> >>DeltaSpike
> >> >>>> does.
> >> >>>>
> >> >>>> Thanks and Regards
> >> >>>> Florian
> >>
> >>
> >
> >
> >--
> >Jason Porter
> >http://en.gravatar.com/lightguardjp
>
>


-- 
Jason Porter
http://en.gravatar.com/lightguardjp

AW: General Converter

Posted by Thomas Herzog <t....@curecomp.com>.
Hi guys

Regarding a converter for entities we did the following.

AbstractGenericConverter which implements the logic for retrieving the entities from the DB.
AbstractIntegerIdConverter  subtype for entities with integer id
LanguageConverter for Language entities

Maybe it helps :)

Mit freundlichen Grüßen

Thomas Herzog
Softwareentwicklung

curecomp Software Services GmbH
Hafenstrasse 47-51
4020 Linz

web: www.curecomp.com
e-Mail: t.herzog@curecomp.com
tel: +43 (0)732 9015-5564
mobile: +43 (0)664 8867 9829





-----Ursprüngliche Nachricht-----
Von: Arne Limburg [mailto:arne.limburg@openknowledge.de] 
Gesendet: Montag, 19. August 2013 16:50
An: dev@deltaspike.apache.org
Betreff: Re: General Converter

Hmm,


Anyway, with an EntityManager we could identify the id field of the entity and convert the entity to its id and vice versa. This could be useful for lists or select menus.

Am 19.08.13 16:35 schrieb "Jason Porter" unter <li...@gmail.com>:

>Hm, I'll have to go back to the code to see what was done.
>
>
>On Mon, Aug 19, 2013 at 5:06 AM, Pete Muir <pm...@redhat.com> wrote:
>
>> The Seam 2 converter worked on any entity class, you just had to 
>> provide it with a reference to the EntityManager.
>>
>> On 18 Aug 2013, at 05:16, Jason Porter <li...@gmail.com> wrote:
>>
>> > The problem with a generic JSF converter is that it has to be very
>>dumb,
>> or you have to use a certain kind of object.
>> >
>> >
>> >
>> >
>> >
>> >    The Seam 3 converter went as generic as possible, it also kept
>>things
>> in the conversion (and should work fine in the request as a 
>>conversation is  at least as long as a request). Depending on what 
>>state you're storing in  the converter, you probably wouldn't want 
>>anything longer than the  conversation due to memory issues.
>> >
>> >
>> >
>> >
>> >
>> >    If memory serves correctly, the Seam 2 converter really only 
>> > worked
>> if you were using the EntityHome classes.
>> >
>> >
>> >
>> >
>> >
>> >    If you were to do anything similar to the Seam 2 converter you'd
>>need
>> to create some sort of object hierarchy the user would need to use, 
>>or try  to perform some sort of generic magic with the criteria API, 
>>which is not  the easiest of things to do.
>> >
>> >
>> >
>> >
>> >
>> >    All that being said, I'd be happy to talk ideas out anyone may
>>have.
>> >
>> >    <
>> > Sent from Mailbox for iPhone
>> >
>> > On Sat, Aug 17, 2013 at 7:51 PM, hantsy <ha...@yahoo.com.cn> wrote:
>> >
>> >> I have posted some content on JBoss.org forum before....the Seam3
>>faces
>> >> object converter does not work well as the Seam 2 one.
>> >> The Seam 3 only works in a conversation(the view is a 
>> >> conversation),
>>and
>> >> it also does not support @ManytoMany.
>> >> The Seam2 version works perfectly....it works in request,
>>conversation
>> >> and other scopes...the better is when I used multi check box...it 
>> >> can deal with the Hibernate/JPA @ManyToMany relation correctly 
>> >> with any codes in the backend codes when I selected or unselected an option.
>> >> Hantsy
>> >> On 8/18/2013 05:42, Adrian Gonzalez wrote:
>> >>> Hi,
>> >>>
>> >>> In the meantime, if you're looking for a JSF converter, you can
>>take a
>> look at Omnifaces SelectItemsConverter [1].
>> >>>
>> >>> Regards,
>> >>> Adrian
>> >>>
>> >>> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
>> >>>
>> >>>
>> >>> ________________________________
>> >>> De : Mark Struberg <st...@yahoo.de> À : 
>> >>> "dev@deltaspike.apache.org" <de...@deltaspike.apache.org> Envoyé le 
>> >>> : Vendredi 16 août 2013 12h39 Objet : Re: General Converter
>> >>>
>> >>>
>> >>> Hi Florian!
>> >>>
>> >>> Not yet on our list. We are currently working on getting 0.5 out 
>> >>> of
>> the door (code reviews and testing against many containers)
>> >>>
>> >>>
>> >>> Please file a feature request in JIRA describing what this Seam2
>> feature is about and why you like it.
>> >>>
>> >>>
>> >>> txs and LieGrue,
>> >>> strub
>> >>>
>> >>>
>> >>>
>> >>> ----- Original Message -----
>> >>>> From: "info@softwareentwicklung-hell.de" <
>> info@softwareentwicklung-hell.de>
>> >>>> To: dev@deltaspike.apache.org
>> >>>> Cc:
>> >>>> Sent: Tuesday, 13 August 2013, 14:35
>> >>>> Subject: General Converter
>> >>>>
>> >>>> Hi all,
>> >>>>
>> >>>> is there a plan to implement Seam like general Converter like 
>> >>>> the
>>Seam
>> >>>> Faces Object converter? I know it is not really a cdi topic, but
>>there
>> >>>> is still a big gap between what Seam was providing and what
>>DeltaSpike
>> >>>> does.
>> >>>>
>> >>>> Thanks and Regards
>> >>>> Florian
>>
>>
>
>
>--
>Jason Porter
>http://en.gravatar.com/lightguardjp


Re: General Converter

Posted by Pete Muir <pm...@redhat.com>.
Right, this is how the Seam 2 convertor worked. It used an abstraction over JPA providers (to give us extra hooks, maybe not needed now in JPA 2) to extract the id of an entity (as you can't rely on the annotation as there is xml as well). It then use a unique id generator to put that into the form as an id, and stored a map that attached the database id to this unique id (this prevented leaking database ids to the UI).

It worked pretty well in the end.

On 19 Aug 2013, at 15:49, Arne Limburg <ar...@openknowledge.de> wrote:

> Hmm,
> 
> 
> Anyway, with an EntityManager we could identify the id field of the entity
> and convert the entity to its id and vice versa. This could be useful for
> lists or select menus.
> 
> Am 19.08.13 16:35 schrieb "Jason Porter" unter <li...@gmail.com>:
> 
>> Hm, I'll have to go back to the code to see what was done.
>> 
>> 
>> On Mon, Aug 19, 2013 at 5:06 AM, Pete Muir <pm...@redhat.com> wrote:
>> 
>>> The Seam 2 converter worked on any entity class, you just had to provide
>>> it with a reference to the EntityManager.
>>> 
>>> On 18 Aug 2013, at 05:16, Jason Porter <li...@gmail.com> wrote:
>>> 
>>>> The problem with a generic JSF converter is that it has to be very
>>> dumb,
>>> or you have to use a certain kind of object.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>   The Seam 3 converter went as generic as possible, it also kept
>>> things
>>> in the conversion (and should work fine in the request as a
>>> conversation is
>>> at least as long as a request). Depending on what state you're storing
>>> in
>>> the converter, you probably wouldn't want anything longer than the
>>> conversation due to memory issues.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>   If memory serves correctly, the Seam 2 converter really only worked
>>> if you were using the EntityHome classes.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>   If you were to do anything similar to the Seam 2 converter you'd
>>> need
>>> to create some sort of object hierarchy the user would need to use, or
>>> try
>>> to perform some sort of generic magic with the criteria API, which is
>>> not
>>> the easiest of things to do.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>   All that being said, I'd be happy to talk ideas out anyone may
>>> have.
>>>> 
>>>>   ‹
>>>> Sent from Mailbox for iPhone
>>>> 
>>>> On Sat, Aug 17, 2013 at 7:51 PM, hantsy <ha...@yahoo.com.cn> wrote:
>>>> 
>>>>> I have posted some content on JBoss.org forum before....the Seam3
>>> faces
>>>>> object converter does not work well as the Seam 2 one.
>>>>> The Seam 3 only works in a conversation(the view is a conversation),
>>> and
>>>>> it also does not support @ManytoMany.
>>>>> The Seam2 version works perfectly....it works in request,
>>> conversation
>>>>> and other scopes...the better is when I used multi check box...it can
>>>>> deal with the Hibernate/JPA @ManyToMany relation correctly with any
>>>>> codes in the backend codes when I selected or unselected an option.
>>>>> Hantsy
>>>>> On 8/18/2013 05:42, Adrian Gonzalez wrote:
>>>>>> Hi,
>>>>>> 
>>>>>> In the meantime, if you're looking for a JSF converter, you can
>>> take a
>>> look at Omnifaces SelectItemsConverter [1].
>>>>>> 
>>>>>> Regards,
>>>>>> Adrian
>>>>>> 
>>>>>> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
>>>>>> 
>>>>>> 
>>>>>> ________________________________
>>>>>> De : Mark Struberg <st...@yahoo.de>
>>>>>> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org>
>>>>>> Envoyé le : Vendredi 16 août 2013 12h39
>>>>>> Objet : Re: General Converter
>>>>>> 
>>>>>> 
>>>>>> Hi Florian!
>>>>>> 
>>>>>> Not yet on our list. We are currently working on getting 0.5 out of
>>> the door (code reviews and testing against many containers)
>>>>>> 
>>>>>> 
>>>>>> Please file a feature request in JIRA describing what this Seam2
>>> feature is about and why you like it.
>>>>>> 
>>>>>> 
>>>>>> txs and LieGrue,
>>>>>> strub
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ----- Original Message -----
>>>>>>> From: "info@softwareentwicklung-hell.de" <
>>> info@softwareentwicklung-hell.de>
>>>>>>> To: dev@deltaspike.apache.org
>>>>>>> Cc:
>>>>>>> Sent: Tuesday, 13 August 2013, 14:35
>>>>>>> Subject: General Converter
>>>>>>> 
>>>>>>> Hi all,
>>>>>>> 
>>>>>>> is there a plan to implement Seam like general Converter like the
>>> Seam
>>>>>>> Faces Object converter? I know it is not really a cdi topic, but
>>> there
>>>>>>> is still a big gap between what Seam was providing and what
>>> DeltaSpike
>>>>>>> does.
>>>>>>> 
>>>>>>> Thanks and Regards
>>>>>>> Florian
>>> 
>>> 
>> 
>> 
>> -- 
>> Jason Porter
>> http://en.gravatar.com/lightguardjp
> 


Re: General Converter

Posted by Arne Limburg <ar...@openknowledge.de>.
Hmm,


Anyway, with an EntityManager we could identify the id field of the entity
and convert the entity to its id and vice versa. This could be useful for
lists or select menus.

Am 19.08.13 16:35 schrieb "Jason Porter" unter <li...@gmail.com>:

>Hm, I'll have to go back to the code to see what was done.
>
>
>On Mon, Aug 19, 2013 at 5:06 AM, Pete Muir <pm...@redhat.com> wrote:
>
>> The Seam 2 converter worked on any entity class, you just had to provide
>> it with a reference to the EntityManager.
>>
>> On 18 Aug 2013, at 05:16, Jason Porter <li...@gmail.com> wrote:
>>
>> > The problem with a generic JSF converter is that it has to be very
>>dumb,
>> or you have to use a certain kind of object.
>> >
>> >
>> >
>> >
>> >
>> >    The Seam 3 converter went as generic as possible, it also kept
>>things
>> in the conversion (and should work fine in the request as a
>>conversation is
>> at least as long as a request). Depending on what state you're storing
>>in
>> the converter, you probably wouldn't want anything longer than the
>> conversation due to memory issues.
>> >
>> >
>> >
>> >
>> >
>> >    If memory serves correctly, the Seam 2 converter really only worked
>> if you were using the EntityHome classes.
>> >
>> >
>> >
>> >
>> >
>> >    If you were to do anything similar to the Seam 2 converter you'd
>>need
>> to create some sort of object hierarchy the user would need to use, or
>>try
>> to perform some sort of generic magic with the criteria API, which is
>>not
>> the easiest of things to do.
>> >
>> >
>> >
>> >
>> >
>> >    All that being said, I'd be happy to talk ideas out anyone may
>>have.
>> >
>> >    ‹
>> > Sent from Mailbox for iPhone
>> >
>> > On Sat, Aug 17, 2013 at 7:51 PM, hantsy <ha...@yahoo.com.cn> wrote:
>> >
>> >> I have posted some content on JBoss.org forum before....the Seam3
>>faces
>> >> object converter does not work well as the Seam 2 one.
>> >> The Seam 3 only works in a conversation(the view is a conversation),
>>and
>> >> it also does not support @ManytoMany.
>> >> The Seam2 version works perfectly....it works in request,
>>conversation
>> >> and other scopes...the better is when I used multi check box...it can
>> >> deal with the Hibernate/JPA @ManyToMany relation correctly with any
>> >> codes in the backend codes when I selected or unselected an option.
>> >> Hantsy
>> >> On 8/18/2013 05:42, Adrian Gonzalez wrote:
>> >>> Hi,
>> >>>
>> >>> In the meantime, if you're looking for a JSF converter, you can
>>take a
>> look at Omnifaces SelectItemsConverter [1].
>> >>>
>> >>> Regards,
>> >>> Adrian
>> >>>
>> >>> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
>> >>>
>> >>>
>> >>> ________________________________
>> >>> De : Mark Struberg <st...@yahoo.de>
>> >>> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org>
>> >>> Envoyé le : Vendredi 16 août 2013 12h39
>> >>> Objet : Re: General Converter
>> >>>
>> >>>
>> >>> Hi Florian!
>> >>>
>> >>> Not yet on our list. We are currently working on getting 0.5 out of
>> the door (code reviews and testing against many containers)
>> >>>
>> >>>
>> >>> Please file a feature request in JIRA describing what this Seam2
>> feature is about and why you like it.
>> >>>
>> >>>
>> >>> txs and LieGrue,
>> >>> strub
>> >>>
>> >>>
>> >>>
>> >>> ----- Original Message -----
>> >>>> From: "info@softwareentwicklung-hell.de" <
>> info@softwareentwicklung-hell.de>
>> >>>> To: dev@deltaspike.apache.org
>> >>>> Cc:
>> >>>> Sent: Tuesday, 13 August 2013, 14:35
>> >>>> Subject: General Converter
>> >>>>
>> >>>> Hi all,
>> >>>>
>> >>>> is there a plan to implement Seam like general Converter like the
>>Seam
>> >>>> Faces Object converter? I know it is not really a cdi topic, but
>>there
>> >>>> is still a big gap between what Seam was providing and what
>>DeltaSpike
>> >>>> does.
>> >>>>
>> >>>> Thanks and Regards
>> >>>> Florian
>>
>>
>
>
>-- 
>Jason Porter
>http://en.gravatar.com/lightguardjp


Re: General Converter

Posted by Jason Porter <li...@gmail.com>.
Hm, I'll have to go back to the code to see what was done.


On Mon, Aug 19, 2013 at 5:06 AM, Pete Muir <pm...@redhat.com> wrote:

> The Seam 2 converter worked on any entity class, you just had to provide
> it with a reference to the EntityManager.
>
> On 18 Aug 2013, at 05:16, Jason Porter <li...@gmail.com> wrote:
>
> > The problem with a generic JSF converter is that it has to be very dumb,
> or you have to use a certain kind of object.
> >
> >
> >
> >
> >
> >    The Seam 3 converter went as generic as possible, it also kept things
> in the conversion (and should work fine in the request as a conversation is
> at least as long as a request). Depending on what state you're storing in
> the converter, you probably wouldn't want anything longer than the
> conversation due to memory issues.
> >
> >
> >
> >
> >
> >    If memory serves correctly, the Seam 2 converter really only worked
> if you were using the EntityHome classes.
> >
> >
> >
> >
> >
> >    If you were to do anything similar to the Seam 2 converter you'd need
> to create some sort of object hierarchy the user would need to use, or try
> to perform some sort of generic magic with the criteria API, which is not
> the easiest of things to do.
> >
> >
> >
> >
> >
> >    All that being said, I'd be happy to talk ideas out anyone may have.
> >
> >    —
> > Sent from Mailbox for iPhone
> >
> > On Sat, Aug 17, 2013 at 7:51 PM, hantsy <ha...@yahoo.com.cn> wrote:
> >
> >> I have posted some content on JBoss.org forum before....the Seam3 faces
> >> object converter does not work well as the Seam 2 one.
> >> The Seam 3 only works in a conversation(the view is a conversation), and
> >> it also does not support @ManytoMany.
> >> The Seam2 version works perfectly....it works in request, conversation
> >> and other scopes...the better is when I used multi check box...it can
> >> deal with the Hibernate/JPA @ManyToMany relation correctly with any
> >> codes in the backend codes when I selected or unselected an option.
> >> Hantsy
> >> On 8/18/2013 05:42, Adrian Gonzalez wrote:
> >>> Hi,
> >>>
> >>> In the meantime, if you're looking for a JSF converter, you can take a
> look at Omnifaces SelectItemsConverter [1].
> >>>
> >>> Regards,
> >>> Adrian
> >>>
> >>> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
> >>>
> >>>
> >>> ________________________________
> >>> De : Mark Struberg <st...@yahoo.de>
> >>> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org>
> >>> Envoyé le : Vendredi 16 août 2013 12h39
> >>> Objet : Re: General Converter
> >>>
> >>>
> >>> Hi Florian!
> >>>
> >>> Not yet on our list. We are currently working on getting 0.5 out of
> the door (code reviews and testing against many containers)
> >>>
> >>>
> >>> Please file a feature request in JIRA describing what this Seam2
> feature is about and why you like it.
> >>>
> >>>
> >>> txs and LieGrue,
> >>> strub
> >>>
> >>>
> >>>
> >>> ----- Original Message -----
> >>>> From: "info@softwareentwicklung-hell.de" <
> info@softwareentwicklung-hell.de>
> >>>> To: dev@deltaspike.apache.org
> >>>> Cc:
> >>>> Sent: Tuesday, 13 August 2013, 14:35
> >>>> Subject: General Converter
> >>>>
> >>>> Hi all,
> >>>>
> >>>> is there a plan to implement Seam like general Converter like the Seam
> >>>> Faces Object converter? I know it is not really a cdi topic, but there
> >>>> is still a big gap between what Seam was providing and what DeltaSpike
> >>>> does.
> >>>>
> >>>> Thanks and Regards
> >>>> Florian
>
>


-- 
Jason Porter
http://en.gravatar.com/lightguardjp

Re: General Converter

Posted by Pete Muir <pm...@redhat.com>.
The Seam 2 converter worked on any entity class, you just had to provide it with a reference to the EntityManager.

On 18 Aug 2013, at 05:16, Jason Porter <li...@gmail.com> wrote:

> The problem with a generic JSF converter is that it has to be very dumb, or you have to use a certain kind of object. 
> 
> 
> 
> 
> 
>    The Seam 3 converter went as generic as possible, it also kept things in the conversion (and should work fine in the request as a conversation is at least as long as a request). Depending on what state you're storing in the converter, you probably wouldn't want anything longer than the conversation due to memory issues. 
> 
> 
> 
> 
> 
>    If memory serves correctly, the Seam 2 converter really only worked if you were using the EntityHome classes.
> 
> 
> 
> 
> 
>    If you were to do anything similar to the Seam 2 converter you'd need to create some sort of object hierarchy the user would need to use, or try to perform some sort of generic magic with the criteria API, which is not the easiest of things to do. 
> 
> 
> 
> 
> 
>    All that being said, I'd be happy to talk ideas out anyone may have. 
> 
>    —
> Sent from Mailbox for iPhone
> 
> On Sat, Aug 17, 2013 at 7:51 PM, hantsy <ha...@yahoo.com.cn> wrote:
> 
>> I have posted some content on JBoss.org forum before....the Seam3 faces
>> object converter does not work well as the Seam 2 one.
>> The Seam 3 only works in a conversation(the view is a conversation), and
>> it also does not support @ManytoMany.
>> The Seam2 version works perfectly....it works in request, conversation
>> and other scopes...the better is when I used multi check box...it can
>> deal with the Hibernate/JPA @ManyToMany relation correctly with any
>> codes in the backend codes when I selected or unselected an option.
>> Hantsy
>> On 8/18/2013 05:42, Adrian Gonzalez wrote:
>>> Hi, 
>>> 
>>> In the meantime, if you're looking for a JSF converter, you can take a look at Omnifaces SelectItemsConverter [1].
>>> 
>>> Regards,
>>> Adrian
>>> 
>>> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
>>> 
>>> 
>>> ________________________________
>>> De : Mark Struberg <st...@yahoo.de>
>>> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org> 
>>> Envoyé le : Vendredi 16 août 2013 12h39
>>> Objet : Re: General Converter
>>> 
>>> 
>>> Hi Florian!
>>> 
>>> Not yet on our list. We are currently working on getting 0.5 out of the door (code reviews and testing against many containers)
>>> 
>>> 
>>> Please file a feature request in JIRA describing what this Seam2 feature is about and why you like it.
>>> 
>>> 
>>> txs and LieGrue,
>>> strub
>>> 
>>> 
>>> 
>>> ----- Original Message -----
>>>> From: "info@softwareentwicklung-hell.de" <in...@softwareentwicklung-hell.de>
>>>> To: dev@deltaspike.apache.org
>>>> Cc: 
>>>> Sent: Tuesday, 13 August 2013, 14:35
>>>> Subject: General Converter
>>>> 
>>>> Hi all,
>>>> 
>>>> is there a plan to implement Seam like general Converter like the Seam  
>>>> Faces Object converter? I know it is not really a cdi topic, but there  
>>>> is still a big gap between what Seam was providing and what DeltaSpike  
>>>> does.
>>>> 
>>>> Thanks and Regards
>>>> Florian


Re: General Converter

Posted by Jason Porter <li...@gmail.com>.
The problem with a generic JSF converter is that it has to be very dumb, or you have to use a certain kind of object. 

    
      


    The Seam 3 converter went as generic as possible, it also kept things in the conversion (and should work fine in the request as a conversation is at least as long as a request). Depending on what state you're storing in the converter, you probably wouldn't want anything longer than the conversation due to memory issues. 

    
      


    If memory serves correctly, the Seam 2 converter really only worked if you were using the EntityHome classes.

    
      


    If you were to do anything similar to the Seam 2 converter you'd need to create some sort of object hierarchy the user would need to use, or try to perform some sort of generic magic with the criteria API, which is not the easiest of things to do. 

    
      


    All that being said, I'd be happy to talk ideas out anyone may have. 

    —
Sent from Mailbox for iPhone

On Sat, Aug 17, 2013 at 7:51 PM, hantsy <ha...@yahoo.com.cn> wrote:

> I have posted some content on JBoss.org forum before....the Seam3 faces
> object converter does not work well as the Seam 2 one.
> The Seam 3 only works in a conversation(the view is a conversation), and
> it also does not support @ManytoMany.
> The Seam2 version works perfectly....it works in request, conversation
> and other scopes...the better is when I used multi check box...it can
> deal with the Hibernate/JPA @ManyToMany relation correctly with any
> codes in the backend codes when I selected or unselected an option.
> Hantsy
> On 8/18/2013 05:42, Adrian Gonzalez wrote:
>> Hi, 
>>
>> In the meantime, if you're looking for a JSF converter, you can take a look at Omnifaces SelectItemsConverter [1].
>>
>> Regards,
>> Adrian
>>
>> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
>>
>>
>> ________________________________
>> De : Mark Struberg <st...@yahoo.de>
>> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org> 
>> Envoyé le : Vendredi 16 août 2013 12h39
>> Objet : Re: General Converter
>>
>>
>> Hi Florian!
>>
>> Not yet on our list. We are currently working on getting 0.5 out of the door (code reviews and testing against many containers)
>>
>>
>> Please file a feature request in JIRA describing what this Seam2 feature is about and why you like it.
>>
>>
>> txs and LieGrue,
>> strub
>>
>>
>>
>> ----- Original Message -----
>>> From: "info@softwareentwicklung-hell.de" <in...@softwareentwicklung-hell.de>
>>> To: dev@deltaspike.apache.org
>>> Cc: 
>>> Sent: Tuesday, 13 August 2013, 14:35
>>> Subject: General Converter
>>>
>>> Hi all,
>>>
>>> is there a plan to implement Seam like general Converter like the Seam  
>>> Faces Object converter? I know it is not really a cdi topic, but there  
>>> is still a big gap between what Seam was providing and what DeltaSpike  
>>> does.
>>>
>>> Thanks and Regards
>>> Florian
>>>

Re: General Converter

Posted by hantsy <ha...@yahoo.com.cn>.
I have posted some content on JBoss.org forum before....the Seam3 faces
object converter does not work well as the Seam 2 one.
The Seam 3 only works in a conversation(the view is a conversation), and
it also does not support @ManytoMany.
The Seam2 version works perfectly....it works in request, conversation
and other scopes...the better is when I used multi check box...it can
deal with the Hibernate/JPA @ManyToMany relation correctly with any
codes in the backend codes when I selected or unselected an option.

Hantsy

On 8/18/2013 05:42, Adrian Gonzalez wrote:
> Hi, 
>
> In the meantime, if you're looking for a JSF converter, you can take a look at Omnifaces SelectItemsConverter [1].
>
> Regards,
> Adrian
>
> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
>
>
> ________________________________
> De : Mark Struberg <st...@yahoo.de>
> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org> 
> Envoyé le : Vendredi 16 août 2013 12h39
> Objet : Re: General Converter
>
>
> Hi Florian!
>
> Not yet on our list. We are currently working on getting 0.5 out of the door (code reviews and testing against many containers)
>
>
> Please file a feature request in JIRA describing what this Seam2 feature is about and why you like it.
>
>
> txs and LieGrue,
> strub
>
>
>
> ----- Original Message -----
>> From: "info@softwareentwicklung-hell.de" <in...@softwareentwicklung-hell.de>
>> To: dev@deltaspike.apache.org
>> Cc: 
>> Sent: Tuesday, 13 August 2013, 14:35
>> Subject: General Converter
>>
>> Hi all,
>>
>> is there a plan to implement Seam like general Converter like the Seam  
>> Faces Object converter? I know it is not really a cdi topic, but there  
>> is still a big gap between what Seam was providing and what DeltaSpike  
>> does.
>>
>> Thanks and Regards
>> Florian
>>


Re: General Converter

Posted by hantsy <ha...@yahoo.com.cn>.
It seems it does not support @ManyToMany relation... for example, in
multi checkbox.

Hantsy

On 8/18/2013 05:42, Adrian Gonzalez wrote:
> Hi, 
>
> In the meantime, if you're looking for a JSF converter, you can take a look at Omnifaces SelectItemsConverter [1].
>
> Regards,
> Adrian
>
> [1] http://showcase.omnifaces.org/converters/SelectItemsConverter
>
>
> ________________________________
> De : Mark Struberg <st...@yahoo.de>
> À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org> 
> Envoyé le : Vendredi 16 août 2013 12h39
> Objet : Re: General Converter
>
>
> Hi Florian!
>
> Not yet on our list. We are currently working on getting 0.5 out of the door (code reviews and testing against many containers)
>
>
> Please file a feature request in JIRA describing what this Seam2 feature is about and why you like it.
>
>
> txs and LieGrue,
> strub
>
>
>
> ----- Original Message -----
>> From: "info@softwareentwicklung-hell.de" <in...@softwareentwicklung-hell.de>
>> To: dev@deltaspike.apache.org
>> Cc: 
>> Sent: Tuesday, 13 August 2013, 14:35
>> Subject: General Converter
>>
>> Hi all,
>>
>> is there a plan to implement Seam like general Converter like the Seam  
>> Faces Object converter? I know it is not really a cdi topic, but there  
>> is still a big gap between what Seam was providing and what DeltaSpike  
>> does.
>>
>> Thanks and Regards
>> Florian
>>


Re: General Converter

Posted by Adrian Gonzalez <ad...@yahoo.fr>.
Hi, 

In the meantime, if you're looking for a JSF converter, you can take a look at Omnifaces SelectItemsConverter [1].

Regards,
Adrian

[1] http://showcase.omnifaces.org/converters/SelectItemsConverter


________________________________
De : Mark Struberg <st...@yahoo.de>
À : "dev@deltaspike.apache.org" <de...@deltaspike.apache.org> 
Envoyé le : Vendredi 16 août 2013 12h39
Objet : Re: General Converter


Hi Florian!

Not yet on our list. We are currently working on getting 0.5 out of the door (code reviews and testing against many containers)


Please file a feature request in JIRA describing what this Seam2 feature is about and why you like it.


txs and LieGrue,
strub



----- Original Message -----
> From: "info@softwareentwicklung-hell.de" <in...@softwareentwicklung-hell.de>
> To: dev@deltaspike.apache.org
> Cc: 
> Sent: Tuesday, 13 August 2013, 14:35
> Subject: General Converter
> 
> Hi all,
> 
> is there a plan to implement Seam like general Converter like the Seam  
> Faces Object converter? I know it is not really a cdi topic, but there  
> is still a big gap between what Seam was providing and what DeltaSpike  
> does.
> 
> Thanks and Regards
> Florian
>

Re: General Converter

Posted by Mark Struberg <st...@yahoo.de>.
Hi Florian!

Not yet on our list. We are currently working on getting 0.5 out of the door (code reviews and testing against many containers)


Please file a feature request in JIRA describing what this Seam2 feature is about and why you like it.


txs and LieGrue,
strub



----- Original Message -----
> From: "info@softwareentwicklung-hell.de" <in...@softwareentwicklung-hell.de>
> To: dev@deltaspike.apache.org
> Cc: 
> Sent: Tuesday, 13 August 2013, 14:35
> Subject: General Converter
> 
> Hi all,
> 
> is there a plan to implement Seam like general Converter like the Seam  
> Faces Object converter? I know it is not really a cdi topic, but there  
> is still a big gap between what Seam was providing and what DeltaSpike  
> does.
> 
> Thanks and Regards
> Florian
>