[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-09 Thread atao
in target generate-entities:

- a template is used to put the list of all the "root" keys needed by an entity 
in a text file; this template combines the structures of list.xhtml.ftl and 
edit.xhtml.ftl to be sure to cover all the messages needed by an entity

- and an other template will put the list of all the entity name in an other 
text file

- then an ant task will read all theses files and generate a unique file for 
each language with all the final keys and the messages associated

To do the job, this last task will read:
-  in faces-config.xml to get the list of languages to deal with
- a xml file provided by the developper to get all the translations wished.

If a translation is missing, the task will create a default message from the 
key, e.g.:

Worker.grossWage -> entity.worker.gross.wage.label=Gross Wage

I'm ok to use any straight way to iterate on many entities to extract all the 
keys needed and put them directly in a unique file.

In my first patch I used fmpp library to do this, but Seam team asked me to do 
without it, then the current solution.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093113#4093113

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093113
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-09 Thread [EMAIL PROTECTED]
Why does it need to create a temp file for each entity ?! should be enough to 
just iterate all the entities in one file, right ?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092856#4092856

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092856
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread atao
anonymous wrote : JBSEAM-843 is about generate from existing entities; why 
shouldn't that make it into seam-gen ?

If so I misunderstood you. I'll be very happy if seam-gen can generate from 
existing entities.

anonymous wrote : alot of temp files are generated" what does that mean ?

The patch:
- starts by create one text file for each entity class, the "temp files", with 
the root name of each message key
- then creates the final properties files from this "temp files"

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092842#4092842

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092842
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread [EMAIL PROTECTED]
JBSEAM-843 is about generate from existing entities; why shouldn't that make it 
into seam-gen ?


btw. "alot of temp files are generated" what does that mean ?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092807#4092807

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092807
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread atao
About i18n:

I agree with you, the #{messages...} are ugly, but it's the standard way to do 
i18n with Seam...
An other way is #{interpolator.interpolate...}, but imo it's  worse and should 
be used only if necessary.

I think that seam-gen is not only for beginners, or "a fun prototype, but an 
excellent place to start with new applications" as said Dan Allen.

An option would be to be able to generate:
- either monolanguage application with hard coded messages, by default for 
beginners or if no multi languages is needed
- or fully i18n application if required

but then it adds a little more complexity in templates.

About i18n (2):

anonymous wrote : 
  | The patch might have been updated last time I saw it; but the first patch I 
looked at generated *alot* of additional files 1 per view artifcat...if that is 
not the case anymore then I rest my case ;) 
  | 

I don't remember exactly what does the first patch. At least the second patch 
still uses a lot of properties files but not one per view artifact! And now the 
current version here uses by default 3 properties files by language, as stated 
before:
- one with constant messages provided by Seam
- one with all the messages generated 
- one with specific messages provided by the developer

A lot of temp files are generated, but only the properties files above are to 
be know by the developer.

About many-to-many:

anonymous wrote : 
  | then that is an issue with seam-gen's templates; and since RHDS does its 
best to work with the seam developed templates we don't have a "fix" for that
  | 

If I understand, this issue has to be managed by seam-gen. Then the situation 
is:
- many-to-many can't be managed by target "generate-entities": I don't remember 
where but on the forum or in jira there is a discussion on this issue.
- I wrote a patch to add many-to-many above the patch for JBSEAM-843
- but JBSEAM-843 will not be added to seam-gen

So now I have no clear vision of the next step...

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092800#4092800

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092800
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread [EMAIL PROTECTED]
and yes #{messages...} for every reference makes the code hard to read for 
newbies IMObut maybe I just need some more convincing ;)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092694#4092694

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092694
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread [EMAIL PROTECTED]
ato: The patch might have been updated last time I saw it; but the first patch 
I looked at generated *alot* of additional files 1 per view artifcat...if that 
is not the case anymore then I rest my case ;)

about many-to-many then that is an issue with seam-gen's templates; and since 
RHDS does its best to work with the seam developed templates we don't have a 
"fix" for that.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092693#4092693

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092693
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread atao
anonymous wrote : 
  | related is that we handle JBSEAM-843 ... in jboss tools/rhds now...just fyi 
;) 
  | 

does rhds manage manytomany associations?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092665#4092665

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092665
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread atao
anonymous wrote : 
  | I'm not against all these I just think some of the templates are 
(unnecessarily) complex as is (same for the generated result)
  | 

I guess that it's JBSEAM-1206 which is concerned here.

Mainly I replaced each hard coded message in templates by a 
"#{messages['...']". 

I guess that what you are speaking about is:
- in a few cases I used messages with parameters
- some of the templates are quite rough and can be optimized.

But at least it works. 

I'm ok to rework any unnecessarily complex cases...

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092604#4092604

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092604
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread atao
anonymous wrote : 
  | i18n probably is easy to fix but needs fixes to hibernatetools to not 
overwrite files that are changed etc.
  | 

The current version here of this feature deals with it through separation of 
properties files:
- one with constant messages provided by Seam: can be modified by developer, 
but to be avoided (see below);
- one with all the messages generated each time that generate-entities is 
executed: must not be modified by developer
- one with specific messages provided by the developer.

In this last one, developer can even put messages which will overwrite thoses 
of the 2 other files.

When new translations is provided by developer, a new run of generate-entities 
will automatically takes them in account.

So, no fixes of hibernatetools were needed.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092576#4092576

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092576
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread atao
anonymous wrote : 
  | something that just compiles is not enough, it needs to also actually work
  | 

patch proposed with JSEAM-994 IS working here. 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092569#4092569

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092569
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-08 Thread [EMAIL PROTECTED]
multiforeignkeys are not trivial to solve but is probably worth the trouble IFF 
it can be done right (something that just compiles is not enough, it needs to 
also actually work);

i18n probably is easy to fix but needs fixes to hibernatetools to not overwrite 
files that are changed etc.

I'm not against all these I just think some of the templates are 
(unnecessarily) complex as is (same for the generated result)





View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092481#4092481

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092481
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-07 Thread dan.j.allen
If I have any say in the matter, I would like to see these changes (or some 
variation of them) integrated. seam-gen had a lot of other areas where it 
needed attention, which was addressed for the 2.0 release. Once we are beyond 
2.0, I think we can continue to make seam-gen produce better and more flexible 
applications.

While seam-gen cannot be everything to everybody, I do feel that it can still 
do a better job. My personal goals for seam-gen is to trim down the code as 
much as possible while integrating a very rich set of features. It should be 
more than just a fun prototype, but an excellent place to start with new 
applications. Trust that we do want contributions such as yours.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092407#4092407

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092407
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-07 Thread atao
anonymous wrote : 
  | related is that we handle JBSEAM-843 and JBSEAM-1136 in jboss tools/rhds 
now...just fyi ;) 
  | 

Good! 

anonymous wrote : 
  | The best way to fix the other issues is patches and testcases
  | 

About 994, 1493 & 1206: a patch was proposed for each of them. So...

anonymous wrote : 
  | seam-gen does not try to be everything to everybody and simplicity will be 
preffered over complexity if it is not a *big* requirement
  | 

About 994 and 1493: imo, they are not new features but expected behaviors. 

About 1206: atm, all the messages are hard coded in english. If they are 
translated, as soon as you run again "seam generate-entities" all the 
translations are lost. It's not really i18n friendly.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092362#4092362

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092362
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : old issues

2007-10-07 Thread [EMAIL PROTECTED]
related is that we handle JBSEAM-843 and JBSEAM-1136 in jboss tools/rhds 
now...just fyi ;)

The best way to fix the other issues is patches and testcases (note: that 
seam-gen does not try to be everything to everybody and simplicity will be 
preffered over complexity if it is not a *big* requirement)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092328#4092328

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092328
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user