[JBoss Eclipse IDE (users)] - custom templates
by kthackray
Dear all,
I would like to generate, based on 1 set of hmb.xml files, 2 kind of classes: the domain pojos for the server side and their equivalent for the client side.
My hbm.xml files contains the definition for the server side. I have then 2 sets of custom templates, with 2 hbm2java task (1 for server side/1 for client side)
<hibernate-mapping package="be.xxx.server.domain.model">
| <class table="table" name="Table">
| ...
In my Pojo.ftl (for the client side), as my client/server domain code package naming is quite similar, I use this trick to customize the package declaration:
${pojo.getPackageDeclaration()?replace("server", "client")}
For the client side, everything is going fine, except that the generated code does not go into the correct package; generated classes still end up in the server side packages, even with my custom Pojo.ftl
Am I clear? Is it possible?
Thanks in advance,
Kevin.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971047#3971047
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971047
19 years, 7 months
[JBoss Seam] - Re: Questions on Seam's PAGE scope
by petemuir
Event Scope Example:
In Request x the user visits the page which references an outjected DataModel initialized by a Factory method. The user then clicks on a link (e.g. a detail view for a particular entity) at their leisure. In Request x + 1the state is lost and so information (e.g. entity id) must be propogated using a request parameter to allow the detail to be displayed
Page Scope example:
In Request x the user visits the page which references an outjected DataModel initialized by a Factory method. The user then clicks on a link (e.g. a detail view for a particular entity) at their leisure. In Request x + 1the state (of the datamodel at least) is still present in the page scope. The row clicked can then be retrieved using e.g. DataModelSelection
This is why in the manual it says PAGE scope allows easy implementation of clickable lists. Though LIEs can occur if you work directly with the PAGE scope object in a further conversation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971038#3971038
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971038
19 years, 7 months