Re: Structuring the Components
Re: Structuring the Components
- Subject: Re: Structuring the Components
- From: Zak Burke <email@hidden>
- Date: Thu, 02 Jun 2005 12:10:59 -0400
email@hidden wrote on 6/2/05 8:15 AM:
Hello,
i have many components in my application. about 20.
However, I thought i can structure the related components together.
For example i have 5 components which are very strong related only together.
the question is weather i can gather them together in one folder?
The problems i face are
1. the main page in this group (5 components) has a relation with other
components of the project.
2. In Default when i create a new Component in the target Folder. the
"component.java" is still in the default package with all other java files.
Maybe any of you could give me a hint or a link where i can get some
information about this :)
If you're using Eclipse with woproject/wolips, when you create a new
WOComponent it will always place the .java file in the default package
in your source directory, but you can simply drag this file to the
package where you want it to reside.
You don't have to maintain a common directory structure between your
components and your class files because nested component directories are
all flattened into the single deployment directory. For sanity's sake,
however, it's good to use similar structure between the WOComponent and
java source directories.
For example, I have a project directory like this:
src/tld/hostname/appname/pages/
Page1.java
Page2.java
packagename/
Page3.java
Page4.java
pages/
Page1.api
Page1.wo/...
Page2.api
Page2.wo/...
packagename/
Page3.api
Page3.wo/...
Page4.api
Page4.wo/...
which will get deployed into this:
dist/myproject.woa/Content/Resources/
Page1.api
Page1.wo/
Page2.api
Page2.wo/
Page3.api
Page3.wo/
Page4.api
Page4.wo/
Java/myproject.jar
The wolips build tasks will automatically find all the component items,
even in nested directories, and deploys them into .../Resources. See the
patterns in woproject/resources.include.patternset for how this works.
HTH --
zak.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden