You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Bruno Busco <br...@gmail.com> on 2008/07/22 18:48:46 UTC

What is the "standard" location of _WebAppName_Forms.xml files?

Hi devs,
sometime _WebAppName_Forms.xml are in widgets folder, some other they are
located in webapp/_webappname_ folder.
In the content application there are BOTH widgets/ContentForms.xml AND
webapp/content/ContentForms.xml.
This caused my modifications to webapp/content/ContentForms.xml to have no
effetct.

Which one of the two instances should I remove?

Many thanks,
-Bruno

Re: What is the "standard" location of _WebAppName_Forms.xml files?

Posted by David Jones <jo...@hotwaxmedia.com>.

On Wed, 23 Jul 2008 10:21:17 -0700, Adrian Crum <ad...@hlmksw.com> wrote:
> David Jones wrote:
>> On Tue, 22 Jul 2008 10:20:07 -0700, Adrian Crum <ad...@hlmksw.com>
> wrote:
>>> David Jones wrote:
>>>> It's tempting to even start moving the data prep scripts into the
>>>> component/scripts directory instead of the WEB-INF/actions directory,
> but
>>>> we haven't gone that far yet. I imagine FTL files used for web pages
> will
>>>> always go under the webapp directory.
>>> What about putting FTL files in component/templates?
>>
>> Do you mean for web pages? That I would disagree with. People working on
> web applications are too used to seeing those things there and I don't
> think we gain anything by moving those out of the webapps (especially
> since we have to have the webapps either way).
>>
>> For other types of templates (email, export files, etc), that is the
> recommended practice.
> 
> Okay, using your suggestions so far...
> 
> scripts are kept in component/scripts
> widgets are kept in component/widgets
> templates are kept in component/webapp

It's a little more complicated than that. All templates are in component/templates except webapp templates, which are in component/webapp.

> So, people working on web applications can understand how the first two
> folders are used, but they wouldn't understand how a component/templates
> folder is used?

It depends on where the person comes from. If they have no prior knowledge or experience the distinction I mention above might take a minute to catch on to. If they are used to working with web sites or webapps (even most non-Java webapps) they expect to have some sort of root directory for all of the HTML files or templates that will be on the web site. Usually those files are put in folders and referred to directly, and we add a layer of indirection through the controller.xml file that really allows them to be anywhere, but this is still a natural place for people to look who are used to editing webapp templates to add/chance/etc the HTML/CSS/JavaScript there, especially if they are not a back-end developer but rather specialize in front-end and web-based design and programming.

-David





Re: What is the "standard" location of _WebAppName_Forms.xml files?

Posted by Adrian Crum <ad...@hlmksw.com>.
David Jones wrote:
> On Tue, 22 Jul 2008 10:20:07 -0700, Adrian Crum <ad...@hlmksw.com> wrote:
>> David Jones wrote:
>>> It's tempting to even start moving the data prep scripts into the
>>> component/scripts directory instead of the WEB-INF/actions directory, but
>>> we haven't gone that far yet. I imagine FTL files used for web pages will
>>> always go under the webapp directory.
>> What about putting FTL files in component/templates?
> 
> Do you mean for web pages? That I would disagree with. People working on web applications are too used to seeing those things there and I don't think we gain anything by moving those out of the webapps (especially since we have to have the webapps either way).
> 
> For other types of templates (email, export files, etc), that is the recommended practice.

Okay, using your suggestions so far...

scripts are kept in component/scripts
widgets are kept in component/widgets
templates are kept in component/webapp

So, people working on web applications can understand how the first two 
folders are used, but they wouldn't understand how a component/templates 
folder is used?

-Adrian


Re: What is the "standard" location of _WebAppName_Forms.xml files?

Posted by David Jones <jo...@hotwaxmedia.com>.

On Tue, 22 Jul 2008 10:20:07 -0700, Adrian Crum <ad...@hlmksw.com> wrote:
> David Jones wrote:
>>
>> It's tempting to even start moving the data prep scripts into the
>> component/scripts directory instead of the WEB-INF/actions directory, but
>> we haven't gone that far yet. I imagine FTL files used for web pages will
>> always go under the webapp directory.
> 
> What about putting FTL files in component/templates?

Do you mean for web pages? That I would disagree with. People working on web applications are too used to seeing those things there and I don't think we gain anything by moving those out of the webapps (especially since we have to have the webapps either way).

For other types of templates (email, export files, etc), that is the recommended practice.

On a side note, we don't have an official page (that I know of...) of guidelines on where to put things, but that information is in the old training outlines:

http://docs.ofbiz.org/display/OFBTECH/Advanced+Framework+Course

-David




Re: What is the "standard" location of _WebAppName_Forms.xml files?

Posted by Adrian Crum <ad...@hlmksw.com>.
David Jones wrote:
> Yes, we've definitely been moving away from having any widget files (form, screen, tree or menu) in the webapp directory, and most of them have been moved out of there. The content component is oft neglected so it's not too surprising that something remains there.
> 
> It's tempting to even start moving the data prep scripts into the component/scripts directory instead of the WEB-INF/actions directory, but we haven't gone that far yet. I imagine FTL files used for web pages will always go under the webapp directory.

What about putting FTL files in component/templates?

-Adrian

Re: What is the "standard" location of _WebAppName_Forms.xml files?

Posted by David Jones <jo...@hotwaxmedia.com>.
Yes, we've definitely been moving away from having any widget files (form, screen, tree or menu) in the webapp directory, and most of them have been moved out of there. The content component is oft neglected so it's not too surprising that something remains there.

It's tempting to even start moving the data prep scripts into the component/scripts directory instead of the WEB-INF/actions directory, but we haven't gone that far yet. I imagine FTL files used for web pages will always go under the webapp directory.

-David


On Tue, 22 Jul 2008 10:03:24 -0700, Adrian Crum <ad...@hlmksw.com> wrote:
> I have been wondering that too.
> 
> Putting form widget XML files in the webapp folder is a practice started
> in the JPublish days. Then the widget folder was added to the
> components. Since then there has been no clear direction on where to put
> form widget XML files.
> 
> My preference would be to keep all widget XML files in the widget folder.
> 
> -Adrian
> 
> Bruno Busco wrote:
>> Hi devs,
>> sometime _WebAppName_Forms.xml are in widgets folder, some other they
> are
>> located in webapp/_webappname_ folder.
>> In the content application there are BOTH widgets/ContentForms.xml AND
>> webapp/content/ContentForms.xml.
>> This caused my modifications to webapp/content/ContentForms.xml to have
> no
>> effetct.
>>
>> Which one of the two instances should I remove?
>>
>> Many thanks,
>> -Bruno
>>


Re: What is the "standard" location of _WebAppName_Forms.xml files?

Posted by Bruno Busco <br...@gmail.com>.
I perfectly agree with you.
I have already removed the copy of the ContentForms.xml located in the
webapp folder (and everything works like before).
I will update soon the patch on
OFBIZ-1881<https://issues.apache.org/jira/browse/OFBIZ-1881>with
FindScreen and Ajax navigation.

-Bruno

2008/7/22 Adrian Crum <ad...@hlmksw.com>:

> I have been wondering that too.
>
> Putting form widget XML files in the webapp folder is a practice started in
> the JPublish days. Then the widget folder was added to the components. Since
> then there has been no clear direction on where to put form widget XML
> files.
>
> My preference would be to keep all widget XML files in the widget folder.
>
> -Adrian
>
>
> Bruno Busco wrote:
>
>> Hi devs,
>> sometime _WebAppName_Forms.xml are in widgets folder, some other they are
>> located in webapp/_webappname_ folder.
>> In the content application there are BOTH widgets/ContentForms.xml AND
>> webapp/content/ContentForms.xml.
>> This caused my modifications to webapp/content/ContentForms.xml to have no
>> effetct.
>>
>> Which one of the two instances should I remove?
>>
>> Many thanks,
>> -Bruno
>>
>>

Re: What is the "standard" location of _WebAppName_Forms.xml files?

Posted by Adrian Crum <ad...@hlmksw.com>.
I have been wondering that too.

Putting form widget XML files in the webapp folder is a practice started 
in the JPublish days. Then the widget folder was added to the 
components. Since then there has been no clear direction on where to put 
form widget XML files.

My preference would be to keep all widget XML files in the widget folder.

-Adrian

Bruno Busco wrote:
> Hi devs,
> sometime _WebAppName_Forms.xml are in widgets folder, some other they are
> located in webapp/_webappname_ folder.
> In the content application there are BOTH widgets/ContentForms.xml AND
> webapp/content/ContentForms.xml.
> This caused my modifications to webapp/content/ContentForms.xml to have no
> effetct.
> 
> Which one of the two instances should I remove?
> 
> Many thanks,
> -Bruno
> 

Re: What is the "standard" location of _WebAppName_Forms.xml files?

Posted by Bruno Busco <br...@gmail.com>.
It seems that OFBiz uses the forms from widgets/content/ContentForms.xml and
there are two forms that are only defined there:

<form name="AddWorkEffortContent"
<form name="ListWorkEffortContents"

So I guess the webapp/content/content/ContentForms.xml should be deleted.

What do you think?
-Bruno

2008/7/22 Bruno Busco <br...@gmail.com>:

> Hi devs,
> sometime _WebAppName_Forms.xml are in widgets folder, some other they are
> located in webapp/_webappname_ folder.
> In the content application there are BOTH widgets/ContentForms.xml AND
> webapp/content/ContentForms.xml.
> This caused my modifications to webapp/content/ContentForms.xml to have no
> effetct.
>
> Which one of the two instances should I remove?
>
> Many thanks,
> -Bruno
>