Re: General Converter

2013-08-17 Thread hantsy
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 strub...@yahoo.de
 À : dev@deltaspike.apache.org dev@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: i...@softwareentwicklung-hell.de i...@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: Data Module

2013-07-12 Thread hantsy
Your requirement is based on your experience, i do not think a must in
REST application.

Some case we can wrap the result in query result like this.

select new UserResult(name, email ) from  User u

to get a  ValueObject directly.


Hantsy
On 7/12/2013 14:12, Romain Manni-Bucau wrote:
 Hi

 Depending the case DTO are not an option.

 I agree in rest app i wouldnt it but if not possible (maybe through another
 Bean) it would kill this module for half of the usages i see since i'd need
 to add this layer.
 Le 12 juil. 2013 06:55, hantsy han...@yahoo.com.cn a écrit :

 No DTO please, data module for data access, why we care about DTO.

 A question about the data, the difference for EJB and none EJB environment.

 if possible in a EJB envoriment, proxy the Repository and add @Stateless
 and transaction declaration to Repository automatically at runtime.

 Regards

 Hantsy
 On 7/10/2013 23:23, Thomas Hug wrote:
 I wouldn't label the feature with DTO but rather as some general result
 transformation - might also be useful for e.g. native queries. Going back
 to the API suggestion, from that perspective such an annotation should
 probably also work on method level, so I'd keep the forEntity out there.


 On Wed, Jul 10, 2013 at 4:22 PM, John D. Ament john.d.am...@gmail.com
 wrote:

 Personally, I don't like this idea.

 A DAO should do DAO stuff.
 A DTO should do DTO stuff.

 The transformation of your entities into some other POJO shouldn't be
 inside your DAO.

 Right now, I use google guava to do DTO work on entities going back and
 forth over a REST API.  Works well IMHO.

 John


 On Wed, Jul 10, 2013 at 9:21 AM, Romain Manni-Bucau
 rmannibu...@gmail.comwrote:

 globally my answer meant if forEntity is sometimes mandatory,
 sometimes
 not this is maybe not the right place

 i thought to add it to mapper config

 *Romain Manni-Bucau*
 *Twitter: @rmannibucau https://twitter.com/rmannibucau*
 *Blog: **http://rmannibucau.wordpress.com/*
 http://rmannibucau.wordpress.com/
 *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
 *Github: https://github.com/rmannibucau*



 2013/7/10 Thomas Hug thomas@gmail.com

 Making forEntity non-optional would then be redundant for the regular
 cases
 using the base interface, so I wouldn't. But I see that it should be
 clearly documented then as things might get confusing...


 On Wed, Jul 10, 2013 at 3:02 PM, Romain Manni-Bucau
 rmannibu...@gmail.comwrote:

 do you mean you force forEntity = Person.class?

 looks ok for me since the only constraint is to add the dto types
 somewhere
 :)

 *Romain Manni-Bucau*
 *Twitter: @rmannibucau https://twitter.com/rmannibucau*
 *Blog: **http://rmannibucau.wordpress.com/*
 http://rmannibucau.wordpress.com/
 *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
 *Github: https://github.com/rmannibucau*



 2013/7/10 Thomas Hug thomas@gmail.com

 Hmm and I assumed DTOs are dead and buried :-)

 Packing this in the base interface feels kind of clunky to me -
 also
 considering that there are repositories without the need to extend
 the
 base
 interface. What about something like

 @Repository(forEntity = Person.class)
 @ResultMapper(entityMapper = MapperX.class, keyMapper =
 MapperY.class)
 public interface PersonRepository extends
 EntityRepositoryPersonDto,
 DtoPk { ... }

 Having the Entity on @Repository takes precedence and the type
 parameters
 are in this case just for convenience.



 On Wed, Jul 10, 2013 at 2:35 PM, Romain Manni-Bucau
 rmannibu...@gmail.comwrote:

 +1

 just to complete this thread the main issue is not the
 implementation
 but
 the exposed API:

 public interface EntityRepositoryE, PK extends Serializable

 would become

 public interface EntityDtoRepositoryE, PK extends Serializable,
 Dto,
 DtoPk

 *Romain Manni-Bucau*
 *Twitter: @rmannibucau https://twitter.com/rmannibucau*
 *Blog: **http://rmannibucau.wordpress.com/*
 http://rmannibucau.wordpress.com/
 *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
 *Github: https://github.com/rmannibucau*



 2013/7/10 Jean-Louis MONTEIRO jeano...@gmail.com

 Hello guys,

 Just used DS Data module yesturday, and I was wondering if we
 could
 add a
 feature allowing on-the-fly conversion to DTO.
 For example, we could use modelmapper (or similar to convert
 DAO
 return
 values to DTO objects).

 Adding a mapper interface to delegate to would also allow
 people
 to
 plug
 their own implementation in.

 WDYT?

 JLouis


 2013/7/1 Thomas Hug thomas@gmail.com

 Hi John
 Thnx for the message, missed that one. Looks like there's a
 default
 profile
 needed (test-persistence.xml only part of the specific server
 profiles).
 Will check tonight.


 On Mon, Jul 1, 2013 at 2:42 AM, John D. Ament 
 john.d.am...@gmail.com
 wrote:
 Hi

 Whoever brought in the data module, can you double check
 your
 tests
 and
 license headers?

 I think it's just your tests, but it's failing during a rat
 check

 https://builds.apache.org/job/DeltaSpike%20RAT-Check

Re: Plans for implementing Seam Reports

2013-07-11 Thread hantsy
I would like the render module can be continued,
provided renderer for freemarker, velocity, and others file format/
built-in expression.

On 6/26/2013 02:19, titou10 titou10 wrote:
 I have myself created a jar/module for PDF rendering.
 This jar includes:
 - the facelets tags of Seam 2 (excepted the ones using Charts) for
 rendering PDF (uses old free version of iText)
 - a filter to capture the request for PDF document and render it
 correctly (The name of the rendered doc is in the html template as in
 seam 2)
 - a CDI component (FaceletsRenderer) that you can inject in your java
 code in case you need to render a PDF document and store it in a
 database or do whatever you want with it without an HTTP request that
 triggers the rendering. It is applicatrionscoped has one metho:
 public byte[] renderViewAsBytes(String template)

 IMHO, for simple PDF document with moderated performance/capacity
 needs,  it is way more easy to use compared to Jasper. Dev just have
 to code normal xhtml/facelets.

 For xls, we use jXls templating and rendering. Very simple to use.

 As the only CDI component is the FaceletsRenderer component, i don't
 know if this would be a nice addition to DS or not.

 However, if someone wants this to be part of DS, I would be please to
 help to commit it myself (before I need a fast-path training in GIT
 and MAVEN -from svn and ant-)

 Denis

 2013/6/25 Dev Khadka dev.kha...@syntechnepal.com:
 Do we have any plans for migrating Seam Reports to DS?

 --
 Dev Khadka
 Synergy Tech Software Pvt. Ltd.
 e-Mail: dev.kha...@syntechnepal.com
 Office: 977-1-5009085, 5526297
 Mobile: +9779841358015