Message Boards

« Back to 2.- Usage ( From Xml file to CRUD Portlet)

How to configure the package of the generated classes

Combination View Flat View Tree View
Threads [ Previous | Next ]
How to configure the package of the generated classes
package configuration
Answer
6/26/12 6:32 PM
Hello,

Here is a small tutorial to explain how to configure the package of the classes generated by XMLportletFactory.

This configuration is available for Version 2,1 and above.

Step 1 :
Edit the following file:
<your liferay plugin SDK dir>\XMLPortletFactory\Resources\VelocityTemplates_common\PortletFiles\variables.txt.

Step 2:
Edit the 2 lines:
1#set( $packageBase = "org.xmlportletfactory")
2#set( $pathBase = "org/xmlportletfactory")


Warning : the 2 lines are linked.
2 small examples are better than a long explanation:

if your package is
com.mycompany.portal
then you set
1#set( $packageBase = "com.mycompany.portal")
2#set( $pathBase = "com/mycompany/portal")


If your package is
net.ilove.xmlportletfactory
then you set
1#set( $packageBase = "net.ilove.xmlportletfactory")
2#set( $pathBase = "net/ilove/xmlportletfactory")


Step 3:
Save your modifications.

Step 4:
Use XMLPortletFactory and have fun.

Regards,
Eric