where a component is located

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

where a component is located

Jack Liu-2
Hi, All
I'd like to get the directory where a component is located in java code.
For example, the component "ebay" is located in
"${ofbiz}/specialpurpose/ebay".
Do you have any idea?

Best Regards,

Jack Liu

Reply | Threaded
Open this post in threaded view
|

Re: where a component is located

Ashish Vijaywargiya
Your question is not clear enough.
Please provide few more info, like what are you trying to achieve.

--
Ashish

On Thu, May 21, 2009 at 1:52 PM, Jack Liu <[hidden email]> wrote:

> Hi, All
> I'd like to get the directory where a component is located in java code.
> For example, the component "ebay" is located in
> "${ofbiz}/specialpurpose/ebay".
> Do you have any idea?
>
> Best Regards,
>
> Jack Liu
>
>
Reply | Threaded
Open this post in threaded view
|

RE: where a component is located

Jack Liu-2
Hi, Vijaywargiya
I created a directory templates under directory ${ofbiz}/hot-deploy/cbs.
Cbs is my customized component and need save template files. Now I want to write a method to process uploaded files and save them under directory templates.
And java code is located in directory cbs/src, of course.
So I must get the directory of templates, how could I do in java code?
By the way, cbs is temporarily located in directory hot-deploy and it will be placed in directory applications, so the way to get directory templates must be ok in these two scenarios.
Thank you,

-----Original Message-----
From: Ashish Vijaywargiya [mailto:[hidden email]]
Sent: 2009年5月21日 17:14
To: [hidden email]
Subject: Re: where a component is located

Your question is not clear enough.
Please provide few more info, like what are you trying to achieve.

--
Ashish

On Thu, May 21, 2009 at 1:52 PM, Jack Liu <[hidden email]> wrote:

> Hi, All
> I'd like to get the directory where a component is located in java code.
> For example, the component "ebay" is located in
> "${ofbiz}/specialpurpose/ebay".
> Do you have any idea?
>
> Best Regards,
>
> Jack Liu
>
>
Reply | Threaded
Open this post in threaded view
|

Re: where a component is located

Ashish Vijaywargiya
Please see my comments inline:

2009/5/21 Jack Liu <[hidden email]>

> Hi, Vijaywargiya
> I created a directory templates under directory ${ofbiz}/hot-deploy/cbs.
> Cbs is my customized component and need save template files. Now I want to
> write a method to process uploaded files and save them under directory
> templates.
> And java code is located in directory cbs/src, of course.
> So I must get the directory of templates, how could I do in java code?
>

Please take a look at the sample example in the link shown below (take a
look at the upload form shown below on the page):
https://localhost:8443/catalog/control/EditProductContent?productId=GZ-2644


>
> By the way, cbs is temporarily located in directory hot-deploy and it will
> be placed in directory applications, so the way to get directory templates
> must be ok in these two scenarios.


I wouldn't prefer to put custom code in the applications directory.
hot-deploy directory is provided to put all your custom development.

But yes it is good if you would like to contribute code in the components
present inside applications directory.

--
Ashish


>
> Thank you,
> > Jack Liu
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: where a component is located

hans_bakker
In reply to this post by Jack Liu-2
please check:

http://api.ofbiz.org/org/ofbiz/base/component/ComponentConfig.html

regards,
Hans

On Thu, 2009-05-21 at 16:22 +0800, Jack Liu wrote:

> Hi, All
> I'd like to get the directory where a component is located in java code.
> For example, the component "ebay" is located in
> "${ofbiz}/specialpurpose/ebay".
> Do you have any idea?
>
> Best Regards,
>
> Jack Liu
>
--
Antwebsystems.com: Quality OFBiz services for competitive rates

Reply | Threaded
Open this post in threaded view
|

RE: where a component is located

Jack Liu-2
That's it
Thank you, Bakker!

-----Original Message-----
From: Hans Bakker [mailto:[hidden email]]
Sent: 2009年5月21日 18:21
To: [hidden email]
Subject: Re: where a component is located

please check:

http://api.ofbiz.org/org/ofbiz/base/component/ComponentConfig.html

regards,
Hans

On Thu, 2009-05-21 at 16:22 +0800, Jack Liu wrote:

> Hi, All
> I'd like to get the directory where a component is located in java code.
> For example, the component "ebay" is located in
> "${ofbiz}/specialpurpose/ebay".
> Do you have any idea?
>
> Best Regards,
>
> Jack Liu
>
--
Antwebsystems.com: Quality OFBiz services for competitive rates