Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

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

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

David E Jones-2

The selectall.js file, or any other js file, should not go in a general decorator, especially an application-wide one like mainContentDecorator. It should go in each individual screen that actually uses/needs the JavaScript.

This is important for efficient functioning of the applications (avoid loading unused files, which need to be requested for every page hit in HTTPS), and also to reduce problems with naming and other conflicts in the per-page scripting contexts.

-David


[hidden email] wrote:

> Author: jleroux
> Date: Sun Sep 30 11:08:19 2007
> New Revision: 580760
>
> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
> Log:
> From a David Goodenough's issue "Missing .js file when searching for DataResource" (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>
> Modified:
>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>
> Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Sun Sep 30 11:08:19 2007
> @@ -36,9 +36,10 @@
>                  <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot; href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;"/>
>                  <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
>                  <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
> +                <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>                
>                  <set field="activeApp" value="contentmgr" global="true"/>
>                  <set field="applicationMenuName" value="ContentAppBar" global="true"/>
> -                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml" global="true"/>
> +                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml" global="true"/>                
>              </actions>
>              <widgets>
>                  <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

Jacques Le Roux
Administrator
David,

The reason I put it there is because there are no easy identifiable screens. The only place I found submitFormDisableSubmits is in
HtmlFormRenderer.renderFormOpen. What is the best practice in such case ? Because I can't see a quick way to find concerned screens.

Thanks

Jacques


De : "David E Jones" <[hidden email]>
>
> The selectall.js file, or any other js file, should not go in a general decorator, especially an application-wide one like
mainContentDecorator. It should go in each individual screen that actually uses/needs the JavaScript.
>
> This is important for efficient functioning of the applications (avoid loading unused files, which need to be requested for every
page hit in HTTPS), and also to reduce problems with naming and other conflicts in the per-page scripting contexts.

>
> -David
>
>
> [hidden email] wrote:
> > Author: jleroux
> > Date: Sun Sep 30 11:08:19 2007
> > New Revision: 580760
> >
> > URL: http://svn.apache.org/viewvc?rev=580760&view=rev
> > Log:
> > From a David Goodenough's issue "Missing .js file when searching for DataResource"
(https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
> >
> > Modified:
> >     ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >
> > Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
> > URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
> > ==============================================================================
> > --- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
> > +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Sun Sep 30 11:08:19 2007
> > @@ -36,9 +36,10 @@
> >                  <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot;
href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;"/>
> >                  <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
> >                  <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
> > +                <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
> >                  <set field="activeApp" value="contentmgr" global="true"/>
> >                  <set field="applicationMenuName" value="ContentAppBar" global="true"/>
> > -                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
global="true"/>
> > +                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
global="true"/>
> >              </actions>
> >              <widgets>
> >                  <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
> >
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

jonwimp
Jacques,

Do a grep in the webapp folders. And in case some .ftl(s) end up in widget folders, grep there too.

One more place. Grep the Widget framework folder.

Jonathon

Jacques Le Roux wrote:

> David,
>
> The reason I put it there is because there are no easy identifiable screens. The only place I found submitFormDisableSubmits is in
> HtmlFormRenderer.renderFormOpen. What is the best practice in such case ? Because I can't see a quick way to find concerned screens.
>
> Thanks
>
> Jacques
>
>
> De : "David E Jones" <[hidden email]>
>> The selectall.js file, or any other js file, should not go in a general decorator, especially an application-wide one like
> mainContentDecorator. It should go in each individual screen that actually uses/needs the JavaScript.
>> This is important for efficient functioning of the applications (avoid loading unused files, which need to be requested for every
> page hit in HTTPS), and also to reduce problems with naming and other conflicts in the per-page scripting contexts.
>> -David
>>
>>
>> [hidden email] wrote:
>>> Author: jleroux
>>> Date: Sun Sep 30 11:08:19 2007
>>> New Revision: 580760
>>>
>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
>>> Log:
>>> From a David Goodenough's issue "Missing .js file when searching for DataResource"
> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>>> Modified:
>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>
>>> Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Sun Sep 30 11:08:19 2007
>>> @@ -36,9 +36,10 @@
>>>                  <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot;
> href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;"/>
>>>                  <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
>>>                  <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
>>> +                <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
>>>                  <set field="activeApp" value="contentmgr" global="true"/>
>>>                  <set field="applicationMenuName" value="ContentAppBar" global="true"/>
>>> -                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
> global="true"/>
>>> +                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
> global="true"/>
>>>              </actions>
>>>              <widgets>
>>>                  <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
>>>
>>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

Jacques Le Roux
Administrator
Jonathon,

I'm on Windows XP. But Eclipse has a great search feature too (even replace is good in 3.4M1 now), and I discovered nothing. So I
can put it in the screen where the problem was found but this does not cover other cases that exist for sure... This is the basic
reason...

Jacques

De : "Jonathon -- Improov" <[hidden email]>

> Jacques,
>
> Do a grep in the webapp folders. And in case some .ftl(s) end up in widget folders, grep there too.
>
> One more place. Grep the Widget framework folder.
>
> Jonathon
>
> Jacques Le Roux wrote:
> > David,
> >
> > The reason I put it there is because there are no easy identifiable screens. The only place I found submitFormDisableSubmits is
in
> > HtmlFormRenderer.renderFormOpen. What is the best practice in such case ? Because I can't see a quick way to find concerned
screens.

> >
> > Thanks
> >
> > Jacques
> >
> >
> > De : "David E Jones" <[hidden email]>
> >> The selectall.js file, or any other js file, should not go in a general decorator, especially an application-wide one like
> > mainContentDecorator. It should go in each individual screen that actually uses/needs the JavaScript.
> >> This is important for efficient functioning of the applications (avoid loading unused files, which need to be requested for
every

> > page hit in HTTPS), and also to reduce problems with naming and other conflicts in the per-page scripting contexts.
> >> -David
> >>
> >>
> >> [hidden email] wrote:
> >>> Author: jleroux
> >>> Date: Sun Sep 30 11:08:19 2007
> >>> New Revision: 580760
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
> >>> Log:
> >>> From a David Goodenough's issue "Missing .js file when searching for DataResource"
> > (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
> >>> Modified:
> >>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>
> >>> Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>> URL:
> > http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
> >>> ==============================================================================
> >>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
> >>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Sun Sep 30 11:08:19 2007
> >>> @@ -36,9 +36,10 @@
> >>>                  <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot;
> > href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;"/>
> >>>                  <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
> >>>                  <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
> >>> +                <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
> >>>                  <set field="activeApp" value="contentmgr" global="true"/>
> >>>                  <set field="applicationMenuName" value="ContentAppBar" global="true"/>
> >>> -                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
> > global="true"/>
> >>> +                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
> > global="true"/>
> >>>              </actions>
> >>>              <widgets>
> >>>                  <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
> >>>
> >>>
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

jonwimp
Jacques,

If you didn't find the string "submitFormDisableSubmits" anywhere else, then perhaps it isn't used
anywhere else?

Try grepping/searching for shorter strings like "submitForm" or "DisableSubmits", case-insensitive.

Jonathon

Jacques Le Roux wrote:

> Jonathon,
>
> I'm on Windows XP. But Eclipse has a great search feature too (even replace is good in 3.4M1 now), and I discovered nothing. So I
> can put it in the screen where the problem was found but this does not cover other cases that exist for sure... This is the basic
> reason...
>
> Jacques
>
> De : "Jonathon -- Improov" <[hidden email]>
>
>> Jacques,
>>
>> Do a grep in the webapp folders. And in case some .ftl(s) end up in widget folders, grep there too.
>>
>> One more place. Grep the Widget framework folder.
>>
>> Jonathon
>>
>> Jacques Le Roux wrote:
>>> David,
>>>
>>> The reason I put it there is because there are no easy identifiable screens. The only place I found submitFormDisableSubmits is
> in
>>> HtmlFormRenderer.renderFormOpen. What is the best practice in such case ? Because I can't see a quick way to find concerned
> screens.
>>> Thanks
>>>
>>> Jacques
>>>
>>>
>>> De : "David E Jones" <[hidden email]>
>>>> The selectall.js file, or any other js file, should not go in a general decorator, especially an application-wide one like
>>> mainContentDecorator. It should go in each individual screen that actually uses/needs the JavaScript.
>>>> This is important for efficient functioning of the applications (avoid loading unused files, which need to be requested for
> every
>>> page hit in HTTPS), and also to reduce problems with naming and other conflicts in the per-page scripting contexts.
>>>> -David
>>>>
>>>>
>>>> [hidden email] wrote:
>>>>> Author: jleroux
>>>>> Date: Sun Sep 30 11:08:19 2007
>>>>> New Revision: 580760
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
>>>>> Log:
>>>>> From a David Goodenough's issue "Missing .js file when searching for DataResource"
>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>>>>> Modified:
>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>
>>>>> Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>> URL:
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
>>>>> ==============================================================================
>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Sun Sep 30 11:08:19 2007
>>>>> @@ -36,9 +36,10 @@
>>>>>                  <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot;
>>> href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;"/>
>>>>>                  <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
>>>>>                  <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
>>>>> +                <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
>>>>>                  <set field="activeApp" value="contentmgr" global="true"/>
>>>>>                  <set field="applicationMenuName" value="ContentAppBar" global="true"/>
>>>>> -                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
>>> global="true"/>
>>>>> +                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
>>> global="true"/>
>>>>>              </actions>
>>>>>              <widgets>
>>>>>                  <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
>>>>>
>>>>>
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

Jacques Le Roux
Administrator
Jonathon,

As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which is used in every widget forms...

Jacques

De : "Jonathon -- Improov" <[hidden email]>

> Jacques,
>
> If you didn't find the string "submitFormDisableSubmits" anywhere else, then perhaps it isn't used
> anywhere else?
>
> Try grepping/searching for shorter strings like "submitForm" or "DisableSubmits", case-insensitive.
>
> Jonathon
>
> Jacques Le Roux wrote:
> > Jonathon,
> >
> > I'm on Windows XP. But Eclipse has a great search feature too (even replace is good in 3.4M1 now), and I discovered nothing. So
I
> > can put it in the screen where the problem was found but this does not cover other cases that exist for sure... This is the
basic

> > reason...
> >
> > Jacques
> >
> > De : "Jonathon -- Improov" <[hidden email]>
> >
> >> Jacques,
> >>
> >> Do a grep in the webapp folders. And in case some .ftl(s) end up in widget folders, grep there too.
> >>
> >> One more place. Grep the Widget framework folder.
> >>
> >> Jonathon
> >>
> >> Jacques Le Roux wrote:
> >>> David,
> >>>
> >>> The reason I put it there is because there are no easy identifiable screens. The only place I found submitFormDisableSubmits
is

> > in
> >>> HtmlFormRenderer.renderFormOpen. What is the best practice in such case ? Because I can't see a quick way to find concerned
> > screens.
> >>> Thanks
> >>>
> >>> Jacques
> >>>
> >>>
> >>> De : "David E Jones" <[hidden email]>
> >>>> The selectall.js file, or any other js file, should not go in a general decorator, especially an application-wide one like
> >>> mainContentDecorator. It should go in each individual screen that actually uses/needs the JavaScript.
> >>>> This is important for efficient functioning of the applications (avoid loading unused files, which need to be requested for
> > every
> >>> page hit in HTTPS), and also to reduce problems with naming and other conflicts in the per-page scripting contexts.
> >>>> -David
> >>>>
> >>>>
> >>>> [hidden email] wrote:
> >>>>> Author: jleroux
> >>>>> Date: Sun Sep 30 11:08:19 2007
> >>>>> New Revision: 580760
> >>>>>
> >>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
> >>>>> Log:
> >>>>> From a David Goodenough's issue "Missing .js file when searching for DataResource"
> >>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
> >>>>> Modified:
> >>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>
> >>>>> Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>> URL:
> >>>
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff

> >>>>> ==============================================================================
> >>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
> >>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Sun Sep 30 11:08:19 2007
> >>>>> @@ -36,9 +36,10 @@
> >>>>>                  <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot;
> >>> href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;"/>
> >>>>>                  <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
> >>>>>                  <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
> >>>>> +                <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
> >>>>>                  <set field="activeApp" value="contentmgr" global="true"/>
> >>>>>                  <set field="applicationMenuName" value="ContentAppBar" global="true"/>
> >>>>> -                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
> >>> global="true"/>
> >>>>> +                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
> >>> global="true"/>
> >>>>>              </actions>
> >>>>>              <widgets>
> >>>>>                  <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
> >>>>>
> >>>>>
> >>>
> >>
> >
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

jonwimp
Jacques,

Well then, that's great. It's centralized in HtmlFormRenderer.

If your search didn't find any in the .ftl(s) or webapp folders, I think that's it. You must have
caught them all (in the Widget Engine).

Jonathon

Jacques Le Roux wrote:

> Jonathon,
>
> As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which is used in every widget forms...
>
> Jacques
>
> De : "Jonathon -- Improov" <[hidden email]>
>> Jacques,
>>
>> If you didn't find the string "submitFormDisableSubmits" anywhere else, then perhaps it isn't used
>> anywhere else?
>>
>> Try grepping/searching for shorter strings like "submitForm" or "DisableSubmits", case-insensitive.
>>
>> Jonathon
>>
>> Jacques Le Roux wrote:
>>> Jonathon,
>>>
>>> I'm on Windows XP. But Eclipse has a great search feature too (even replace is good in 3.4M1 now), and I discovered nothing. So
> I
>>> can put it in the screen where the problem was found but this does not cover other cases that exist for sure... This is the
> basic
>>> reason...
>>>
>>> Jacques
>>>
>>> De : "Jonathon -- Improov" <[hidden email]>
>>>
>>>> Jacques,
>>>>
>>>> Do a grep in the webapp folders. And in case some .ftl(s) end up in widget folders, grep there too.
>>>>
>>>> One more place. Grep the Widget framework folder.
>>>>
>>>> Jonathon
>>>>
>>>> Jacques Le Roux wrote:
>>>>> David,
>>>>>
>>>>> The reason I put it there is because there are no easy identifiable screens. The only place I found submitFormDisableSubmits
> is
>>> in
>>>>> HtmlFormRenderer.renderFormOpen. What is the best practice in such case ? Because I can't see a quick way to find concerned
>>> screens.
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>> De : "David E Jones" <[hidden email]>
>>>>>> The selectall.js file, or any other js file, should not go in a general decorator, especially an application-wide one like
>>>>> mainContentDecorator. It should go in each individual screen that actually uses/needs the JavaScript.
>>>>>> This is important for efficient functioning of the applications (avoid loading unused files, which need to be requested for
>>> every
>>>>> page hit in HTTPS), and also to reduce problems with naming and other conflicts in the per-page scripting contexts.
>>>>>> -David
>>>>>>
>>>>>>
>>>>>> [hidden email] wrote:
>>>>>>> Author: jleroux
>>>>>>> Date: Sun Sep 30 11:08:19 2007
>>>>>>> New Revision: 580760
>>>>>>>
>>>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
>>>>>>> Log:
>>>>>>> From a David Goodenough's issue "Missing .js file when searching for DataResource"
>>>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>>>>>>> Modified:
>>>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>
>>>>>>> Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
>>>>>>> ==============================================================================
>>>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
>>>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Sun Sep 30 11:08:19 2007
>>>>>>> @@ -36,9 +36,10 @@
>>>>>>>                  <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot;
>>>>> href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;"/>
>>>>>>>                  <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
>>>>>>>                  <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
>>>>>>> +                <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
>>>>>>>                  <set field="activeApp" value="contentmgr" global="true"/>
>>>>>>>                  <set field="applicationMenuName" value="ContentAppBar" global="true"/>
>>>>>>> -                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
>>>>> global="true"/>
>>>>>>> +                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
>>>>> global="true"/>
>>>>>>>              </actions>
>>>>>>>              <widgets>
>>>>>>>                  <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
>>>>>>>
>>>>>>>
>>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

David E Jones

Jonathon,

The point it it's HTML generated by the form widget, so searching is NOT going to find each instance, ie anything that can get to a per-screen thing.

If you are wondering more about this I recommend researching the form widget more, especially for the type="multi" forms.

-David


Jonathon -- Improov wrote:

> Jacques,
>
> Well then, that's great. It's centralized in HtmlFormRenderer.
>
> If your search didn't find any in the .ftl(s) or webapp folders, I think
> that's it. You must have caught them all (in the Widget Engine).
>
> Jonathon
>
> Jacques Le Roux wrote:
>> Jonathon,
>>
>> As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which
>> is used in every widget forms...
>>
>> Jacques
>>
>> De : "Jonathon -- Improov" <[hidden email]>
>>> Jacques,
>>>
>>> If you didn't find the string "submitFormDisableSubmits" anywhere
>>> else, then perhaps it isn't used
>>> anywhere else?
>>>
>>> Try grepping/searching for shorter strings like "submitForm" or
>>> "DisableSubmits", case-insensitive.
>>>
>>> Jonathon
>>>
>>> Jacques Le Roux wrote:
>>>> Jonathon,
>>>>
>>>> I'm on Windows XP. But Eclipse has a great search feature too (even
>>>> replace is good in 3.4M1 now), and I discovered nothing. So
>> I
>>>> can put it in the screen where the problem was found but this does
>>>> not cover other cases that exist for sure... This is the
>> basic
>>>> reason...
>>>>
>>>> Jacques
>>>>
>>>> De : "Jonathon -- Improov" <[hidden email]>
>>>>
>>>>> Jacques,
>>>>>
>>>>> Do a grep in the webapp folders. And in case some .ftl(s) end up in
>>>>> widget folders, grep there too.
>>>>>
>>>>> One more place. Grep the Widget framework folder.
>>>>>
>>>>> Jonathon
>>>>>
>>>>> Jacques Le Roux wrote:
>>>>>> David,
>>>>>>
>>>>>> The reason I put it there is because there are no easy
>>>>>> identifiable screens. The only place I found submitFormDisableSubmits
>> is
>>>> in
>>>>>> HtmlFormRenderer.renderFormOpen. What is the best practice in such
>>>>>> case ? Because I can't see a quick way to find concerned
>>>> screens.
>>>>>> Thanks
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>>
>>>>>> De : "David E Jones" <[hidden email]>
>>>>>>> The selectall.js file, or any other js file, should not go in a
>>>>>>> general decorator, especially an application-wide one like
>>>>>> mainContentDecorator. It should go in each individual screen that
>>>>>> actually uses/needs the JavaScript.
>>>>>>> This is important for efficient functioning of the applications
>>>>>>> (avoid loading unused files, which need to be requested for
>>>> every
>>>>>> page hit in HTTPS), and also to reduce problems with naming and
>>>>>> other conflicts in the per-page scripting contexts.
>>>>>>> -David
>>>>>>>
>>>>>>>
>>>>>>> [hidden email] wrote:
>>>>>>>> Author: jleroux
>>>>>>>> Date: Sun Sep 30 11:08:19 2007
>>>>>>>> New Revision: 580760
>>>>>>>>
>>>>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
>>>>>>>> Log:
>>>>>>>> From a David Goodenough's issue "Missing .js file when searching
>>>>>>>> for DataResource"
>>>>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>>>>>>>> Modified:
>>>>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>
>>>>>>>> Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff 
>>
>>>>>>>> ==============================================================================
>>>>>>>>
>>>>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>> (original)
>>>>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>> Sun Sep 30 11:08:19 2007
>>>>>>>> @@ -36,9 +36,10 @@
>>>>>>>>                  <set field="layoutSettings.extraHead"
>>>>>>>> value="&lt;link rel=&quot;stylesheet&quot;
>>>>>> href=&quot;/content/images/contentForum.css&quot;
>>>>>> type=&quot;text/css&quot;/&gt;"/>
>>>>>>>>                  <!-- <set
>>>>>>>> field="layoutSettings.headerMiddleBackgroundUrl" value=""
>>>>>>>> global="true"/> -->
>>>>>>>>                  <!-- <set
>>>>>>>> field="layoutSettings.headerRightBackgroundUrl" value=""
>>>>>>>> global="true"/> -->
>>>>>>>> +                <set field="layoutSettings.javaScripts[]"
>>>>>>>> value="/images/selectall.js" global="true"/>
>>>>>>>>                  <set field="activeApp" value="contentmgr"
>>>>>>>> global="true"/>
>>>>>>>>                  <set field="applicationMenuName"
>>>>>>>> value="ContentAppBar" global="true"/>
>>>>>>>> -                <set field="applicationMenuLocation"
>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
>>>>>> global="true"/>
>>>>>>>> +                <set field="applicationMenuLocation"
>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
>>>>>> global="true"/>
>>>>>>>>              </actions>
>>>>>>>>              <widgets>
>>>>>>>>                  <include-screen name="GlobalDecorator"
>>>>>>>> location="component://common/widget/CommonScreens.xml"/>
>>>>>>>>
>>>>>>>>
>>>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

Adrian Crum
It seems to me, if we want to load the javascript only when it's needed, then we would have to
specify it whenever a form widget is used.

-Adrian

David E Jones wrote:

>
> Jonathon,
>
> The point it it's HTML generated by the form widget, so searching is NOT
> going to find each instance, ie anything that can get to a per-screen
> thing.
>
> If you are wondering more about this I recommend researching the form
> widget more, especially for the type="multi" forms.
>
> -David
>
>
> Jonathon -- Improov wrote:
>
>> Jacques,
>>
>> Well then, that's great. It's centralized in HtmlFormRenderer.
>>
>> If your search didn't find any in the .ftl(s) or webapp folders, I
>> think that's it. You must have caught them all (in the Widget Engine).
>>
>> Jonathon
>>
>> Jacques Le Roux wrote:
>>
>>> Jonathon,
>>>
>>> As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which
>>> is used in every widget forms...
>>>
>>> Jacques
>>>
>>> De : "Jonathon -- Improov" <[hidden email]>
>>>
>>>> Jacques,
>>>>
>>>> If you didn't find the string "submitFormDisableSubmits" anywhere
>>>> else, then perhaps it isn't used
>>>> anywhere else?
>>>>
>>>> Try grepping/searching for shorter strings like "submitForm" or
>>>> "DisableSubmits", case-insensitive.
>>>>
>>>> Jonathon
>>>>
>>>> Jacques Le Roux wrote:
>>>>
>>>>> Jonathon,
>>>>>
>>>>> I'm on Windows XP. But Eclipse has a great search feature too (even
>>>>> replace is good in 3.4M1 now), and I discovered nothing. So
>>>
>>> I
>>>
>>>>> can put it in the screen where the problem was found but this does
>>>>> not cover other cases that exist for sure... This is the
>>>
>>> basic
>>>
>>>>> reason...
>>>>>
>>>>> Jacques
>>>>>
>>>>> De : "Jonathon -- Improov" <[hidden email]>
>>>>>
>>>>>> Jacques,
>>>>>>
>>>>>> Do a grep in the webapp folders. And in case some .ftl(s) end up
>>>>>> in widget folders, grep there too.
>>>>>>
>>>>>> One more place. Grep the Widget framework folder.
>>>>>>
>>>>>> Jonathon
>>>>>>
>>>>>> Jacques Le Roux wrote:
>>>>>>
>>>>>>> David,
>>>>>>>
>>>>>>> The reason I put it there is because there are no easy
>>>>>>> identifiable screens. The only place I found
>>>>>>> submitFormDisableSubmits
>>>
>>> is
>>>
>>>>> in
>>>>>
>>>>>>> HtmlFormRenderer.renderFormOpen. What is the best practice in
>>>>>>> such case ? Because I can't see a quick way to find concerned
>>>>>
>>>>> screens.
>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>>
>>>>>>> De : "David E Jones" <[hidden email]>
>>>>>>>
>>>>>>>> The selectall.js file, or any other js file, should not go in a
>>>>>>>> general decorator, especially an application-wide one like
>>>>>>>
>>>>>>> mainContentDecorator. It should go in each individual screen that
>>>>>>> actually uses/needs the JavaScript.
>>>>>>>
>>>>>>>> This is important for efficient functioning of the applications
>>>>>>>> (avoid loading unused files, which need to be requested for
>>>>>
>>>>> every
>>>>>
>>>>>>> page hit in HTTPS), and also to reduce problems with naming and
>>>>>>> other conflicts in the per-page scripting contexts.
>>>>>>>
>>>>>>>> -David
>>>>>>>>
>>>>>>>>
>>>>>>>> [hidden email] wrote:
>>>>>>>>
>>>>>>>>> Author: jleroux
>>>>>>>>> Date: Sun Sep 30 11:08:19 2007
>>>>>>>>> New Revision: 580760
>>>>>>>>>
>>>>>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
>>>>>>>>> Log:
>>>>>>>>> From a David Goodenough's issue "Missing .js file when
>>>>>>>>> searching for DataResource"
>>>>>>>
>>>>>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>>>>>>>
>>>>>>>>> Modified:
>>>>>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>>
>>>>>>>>> Modified:
>>>>>>>>> ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>> URL:
>>>
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff 
>>>
>>>
>>>>>>>>> ==============================================================================
>>>>>>>>>
>>>>>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>> (original)
>>>>>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>> Sun Sep 30 11:08:19 2007
>>>>>>>>> @@ -36,9 +36,10 @@
>>>>>>>>>                  <set field="layoutSettings.extraHead"
>>>>>>>>> value="&lt;link rel=&quot;stylesheet&quot;
>>>>>>>
>>>>>>> href=&quot;/content/images/contentForum.css&quot;
>>>>>>> type=&quot;text/css&quot;/&gt;"/>
>>>>>>>
>>>>>>>>>                  <!-- <set
>>>>>>>>> field="layoutSettings.headerMiddleBackgroundUrl" value=""
>>>>>>>>> global="true"/> -->
>>>>>>>>>                  <!-- <set
>>>>>>>>> field="layoutSettings.headerRightBackgroundUrl" value=""
>>>>>>>>> global="true"/> -->
>>>>>>>>> +                <set field="layoutSettings.javaScripts[]"
>>>>>>>>> value="/images/selectall.js" global="true"/>
>>>>>>>>>                  <set field="activeApp" value="contentmgr"
>>>>>>>>> global="true"/>
>>>>>>>>>                  <set field="applicationMenuName"
>>>>>>>>> value="ContentAppBar" global="true"/>
>>>>>>>>> -                <set field="applicationMenuLocation"
>>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
>>>>>>>
>>>>>>> global="true"/>
>>>>>>>
>>>>>>>>> +                <set field="applicationMenuLocation"
>>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
>>>>>>>
>>>>>>> global="true"/>
>>>>>>>
>>>>>>>>>              </actions>
>>>>>>>>>              <widgets>
>>>>>>>>>                  <include-screen name="GlobalDecorator"
>>>>>>>>> location="component://common/widget/CommonScreens.xml"/>
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

David E Jones
In reply to this post by Jacques Le Roux

Jacques,

I think on this... nevermind. I looked into the specific method that was a problem in the issue and it is one used for pretty much ALL html forms generated by the form widget, so including it somewhere high level like this is fine.

The selectall.js file is the problem and should be split up to have the more generic ones includ-able in all screens, and the more specific ones (like the toggle* and selectAll* methods in there) into a file that can be included more locally. Of course, that should be done for other js files in OFBiz too... and this would be a lot of work and there are bigger issues to work on (like automated tests... for example).

-David


Jacques Le Roux wrote:

> David,
>
> The reason I put it there is because there are no easy identifiable screens. The only place I found submitFormDisableSubmits is in
> HtmlFormRenderer.renderFormOpen. What is the best practice in such case ? Because I can't see a quick way to find concerned screens.
>
> Thanks
>
> Jacques
>
>
> De : "David E Jones" <[hidden email]>
>> The selectall.js file, or any other js file, should not go in a general decorator, especially an application-wide one like
> mainContentDecorator. It should go in each individual screen that actually uses/needs the JavaScript.
>> This is important for efficient functioning of the applications (avoid loading unused files, which need to be requested for every
> page hit in HTTPS), and also to reduce problems with naming and other conflicts in the per-page scripting contexts.
>> -David
>>
>>
>> [hidden email] wrote:
>>> Author: jleroux
>>> Date: Sun Sep 30 11:08:19 2007
>>> New Revision: 580760
>>>
>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
>>> Log:
>>> From a David Goodenough's issue "Missing .js file when searching for DataResource"
> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>>> Modified:
>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>
>>> Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Sun Sep 30 11:08:19 2007
>>> @@ -36,9 +36,10 @@
>>>                  <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot;
> href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;"/>
>>>                  <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
>>>                  <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
>>> +                <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
>>>                  <set field="activeApp" value="contentmgr" global="true"/>
>>>                  <set field="applicationMenuName" value="ContentAppBar" global="true"/>
>>> -                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
> global="true"/>
>>> +                <set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml"
> global="true"/>
>>>              </actions>
>>>              <widgets>
>>>                  <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
>>>
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

jonwimp
In reply to this post by David E Jones
David,

Oh, I just re-read the thread. It's to do with deciding where to include selectall.js .

Hmm. Maybe for now, just add throw up a Debug log each time "submitFormDisableSubmits" is put into
HTML? That way, we'll be able to catch those screens using it, over time. (But isn't that
javascript function used in every form widget, not just "multi" forms? If so, lots of screens to
catch.)

Is it possible to include selectall.js in the Widget Engine? Say, when rendering a widget screen?
Bit of an overkill, perhaps. Maybe the ad hoc solution above is better?

Jonathon

David E Jones wrote:

>
> Jonathon,
>
> The point it it's HTML generated by the form widget, so searching is NOT
> going to find each instance, ie anything that can get to a per-screen
> thing.
>
> If you are wondering more about this I recommend researching the form
> widget more, especially for the type="multi" forms.
>
> -David
>
>
> Jonathon -- Improov wrote:
>> Jacques,
>>
>> Well then, that's great. It's centralized in HtmlFormRenderer.
>>
>> If your search didn't find any in the .ftl(s) or webapp folders, I
>> think that's it. You must have caught them all (in the Widget Engine).
>>
>> Jonathon
>>
>> Jacques Le Roux wrote:
>>> Jonathon,
>>>
>>> As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which
>>> is used in every widget forms...
>>>
>>> Jacques
>>>
>>> De : "Jonathon -- Improov" <[hidden email]>
>>>> Jacques,
>>>>
>>>> If you didn't find the string "submitFormDisableSubmits" anywhere
>>>> else, then perhaps it isn't used
>>>> anywhere else?
>>>>
>>>> Try grepping/searching for shorter strings like "submitForm" or
>>>> "DisableSubmits", case-insensitive.
>>>>
>>>> Jonathon
>>>>
>>>> Jacques Le Roux wrote:
>>>>> Jonathon,
>>>>>
>>>>> I'm on Windows XP. But Eclipse has a great search feature too (even
>>>>> replace is good in 3.4M1 now), and I discovered nothing. So
>>> I
>>>>> can put it in the screen where the problem was found but this does
>>>>> not cover other cases that exist for sure... This is the
>>> basic
>>>>> reason...
>>>>>
>>>>> Jacques
>>>>>
>>>>> De : "Jonathon -- Improov" <[hidden email]>
>>>>>
>>>>>> Jacques,
>>>>>>
>>>>>> Do a grep in the webapp folders. And in case some .ftl(s) end up
>>>>>> in widget folders, grep there too.
>>>>>>
>>>>>> One more place. Grep the Widget framework folder.
>>>>>>
>>>>>> Jonathon
>>>>>>
>>>>>> Jacques Le Roux wrote:
>>>>>>> David,
>>>>>>>
>>>>>>> The reason I put it there is because there are no easy
>>>>>>> identifiable screens. The only place I found
>>>>>>> submitFormDisableSubmits
>>> is
>>>>> in
>>>>>>> HtmlFormRenderer.renderFormOpen. What is the best practice in
>>>>>>> such case ? Because I can't see a quick way to find concerned
>>>>> screens.
>>>>>>> Thanks
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>>
>>>>>>> De : "David E Jones" <[hidden email]>
>>>>>>>> The selectall.js file, or any other js file, should not go in a
>>>>>>>> general decorator, especially an application-wide one like
>>>>>>> mainContentDecorator. It should go in each individual screen that
>>>>>>> actually uses/needs the JavaScript.
>>>>>>>> This is important for efficient functioning of the applications
>>>>>>>> (avoid loading unused files, which need to be requested for
>>>>> every
>>>>>>> page hit in HTTPS), and also to reduce problems with naming and
>>>>>>> other conflicts in the per-page scripting contexts.
>>>>>>>> -David
>>>>>>>>
>>>>>>>>
>>>>>>>> [hidden email] wrote:
>>>>>>>>> Author: jleroux
>>>>>>>>> Date: Sun Sep 30 11:08:19 2007
>>>>>>>>> New Revision: 580760
>>>>>>>>>
>>>>>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
>>>>>>>>> Log:
>>>>>>>>> From a David Goodenough's issue "Missing .js file when
>>>>>>>>> searching for DataResource"
>>>>>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>>>>>>>>> Modified:
>>>>>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>>
>>>>>>>>> Modified:
>>>>>>>>> ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>> URL:
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff 
>>>
>>>>>>>>> ==============================================================================
>>>>>>>>>
>>>>>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>> (original)
>>>>>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>> Sun Sep 30 11:08:19 2007
>>>>>>>>> @@ -36,9 +36,10 @@
>>>>>>>>>                  <set field="layoutSettings.extraHead"
>>>>>>>>> value="&lt;link rel=&quot;stylesheet&quot;
>>>>>>> href=&quot;/content/images/contentForum.css&quot;
>>>>>>> type=&quot;text/css&quot;/&gt;"/>
>>>>>>>>>                  <!-- <set
>>>>>>>>> field="layoutSettings.headerMiddleBackgroundUrl" value=""
>>>>>>>>> global="true"/> -->
>>>>>>>>>                  <!-- <set
>>>>>>>>> field="layoutSettings.headerRightBackgroundUrl" value=""
>>>>>>>>> global="true"/> -->
>>>>>>>>> +                <set field="layoutSettings.javaScripts[]"
>>>>>>>>> value="/images/selectall.js" global="true"/>
>>>>>>>>>                  <set field="activeApp" value="contentmgr"
>>>>>>>>> global="true"/>
>>>>>>>>>                  <set field="applicationMenuName"
>>>>>>>>> value="ContentAppBar" global="true"/>
>>>>>>>>> -                <set field="applicationMenuLocation"
>>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
>>>>>>> global="true"/>
>>>>>>>>> +                <set field="applicationMenuLocation"
>>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
>>>>>>> global="true"/>
>>>>>>>>>              </actions>
>>>>>>>>>              <widgets>
>>>>>>>>>                  <include-screen name="GlobalDecorator"
>>>>>>>>> location="component://common/widget/CommonScreens.xml"/>
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

Jacques Le Roux
Administrator
Thanks for your ideas Jonathon,

I will try to find a solution next weekend (and will review any suggestions then), time is flying...

Jacques

De : "Jonathon -- Improov" <[hidden email]>

> David,
>
> Oh, I just re-read the thread. It's to do with deciding where to include selectall.js .
>
> Hmm. Maybe for now, just add throw up a Debug log each time "submitFormDisableSubmits" is put into
> HTML? That way, we'll be able to catch those screens using it, over time. (But isn't that
> javascript function used in every form widget, not just "multi" forms? If so, lots of screens to
> catch.)
>
> Is it possible to include selectall.js in the Widget Engine? Say, when rendering a widget screen?
> Bit of an overkill, perhaps. Maybe the ad hoc solution above is better?
>
> Jonathon
>
> David E Jones wrote:
> >
> > Jonathon,
> >
> > The point it it's HTML generated by the form widget, so searching is NOT
> > going to find each instance, ie anything that can get to a per-screen
> > thing.
> >
> > If you are wondering more about this I recommend researching the form
> > widget more, especially for the type="multi" forms.
> >
> > -David
> >
> >
> > Jonathon -- Improov wrote:
> >> Jacques,
> >>
> >> Well then, that's great. It's centralized in HtmlFormRenderer.
> >>
> >> If your search didn't find any in the .ftl(s) or webapp folders, I
> >> think that's it. You must have caught them all (in the Widget Engine).
> >>
> >> Jonathon
> >>
> >> Jacques Le Roux wrote:
> >>> Jonathon,
> >>>
> >>> As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which
> >>> is used in every widget forms...
> >>>
> >>> Jacques
> >>>
> >>> De : "Jonathon -- Improov" <[hidden email]>
> >>>> Jacques,
> >>>>
> >>>> If you didn't find the string "submitFormDisableSubmits" anywhere
> >>>> else, then perhaps it isn't used
> >>>> anywhere else?
> >>>>
> >>>> Try grepping/searching for shorter strings like "submitForm" or
> >>>> "DisableSubmits", case-insensitive.
> >>>>
> >>>> Jonathon
> >>>>
> >>>> Jacques Le Roux wrote:
> >>>>> Jonathon,
> >>>>>
> >>>>> I'm on Windows XP. But Eclipse has a great search feature too (even
> >>>>> replace is good in 3.4M1 now), and I discovered nothing. So
> >>> I
> >>>>> can put it in the screen where the problem was found but this does
> >>>>> not cover other cases that exist for sure... This is the
> >>> basic
> >>>>> reason...
> >>>>>
> >>>>> Jacques
> >>>>>
> >>>>> De : "Jonathon -- Improov" <[hidden email]>
> >>>>>
> >>>>>> Jacques,
> >>>>>>
> >>>>>> Do a grep in the webapp folders. And in case some .ftl(s) end up
> >>>>>> in widget folders, grep there too.
> >>>>>>
> >>>>>> One more place. Grep the Widget framework folder.
> >>>>>>
> >>>>>> Jonathon
> >>>>>>
> >>>>>> Jacques Le Roux wrote:
> >>>>>>> David,
> >>>>>>>
> >>>>>>> The reason I put it there is because there are no easy
> >>>>>>> identifiable screens. The only place I found
> >>>>>>> submitFormDisableSubmits
> >>> is
> >>>>> in
> >>>>>>> HtmlFormRenderer.renderFormOpen. What is the best practice in
> >>>>>>> such case ? Because I can't see a quick way to find concerned
> >>>>> screens.
> >>>>>>> Thanks
> >>>>>>>
> >>>>>>> Jacques
> >>>>>>>
> >>>>>>>
> >>>>>>> De : "David E Jones" <[hidden email]>
> >>>>>>>> The selectall.js file, or any other js file, should not go in a
> >>>>>>>> general decorator, especially an application-wide one like
> >>>>>>> mainContentDecorator. It should go in each individual screen that
> >>>>>>> actually uses/needs the JavaScript.
> >>>>>>>> This is important for efficient functioning of the applications
> >>>>>>>> (avoid loading unused files, which need to be requested for
> >>>>> every
> >>>>>>> page hit in HTTPS), and also to reduce problems with naming and
> >>>>>>> other conflicts in the per-page scripting contexts.
> >>>>>>>> -David
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> [hidden email] wrote:
> >>>>>>>>> Author: jleroux
> >>>>>>>>> Date: Sun Sep 30 11:08:19 2007
> >>>>>>>>> New Revision: 580760
> >>>>>>>>>
> >>>>>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
> >>>>>>>>> Log:
> >>>>>>>>> From a David Goodenough's issue "Missing .js file when
> >>>>>>>>> searching for DataResource"
> >>>>>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
> >>>>>>>>> Modified:
> >>>>>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>>>>>
> >>>>>>>>> Modified:
> >>>>>>>>> ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>>>>> URL:
> >>>
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff

> >>>
> >>>>>>>>> ==============================================================================
> >>>>>>>>>
> >>>>>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>>>>> (original)
> >>>>>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>>>>> Sun Sep 30 11:08:19 2007
> >>>>>>>>> @@ -36,9 +36,10 @@
> >>>>>>>>>                  <set field="layoutSettings.extraHead"
> >>>>>>>>> value="&lt;link rel=&quot;stylesheet&quot;
> >>>>>>> href=&quot;/content/images/contentForum.css&quot;
> >>>>>>> type=&quot;text/css&quot;/&gt;"/>
> >>>>>>>>>                  <!-- <set
> >>>>>>>>> field="layoutSettings.headerMiddleBackgroundUrl" value=""
> >>>>>>>>> global="true"/> -->
> >>>>>>>>>                  <!-- <set
> >>>>>>>>> field="layoutSettings.headerRightBackgroundUrl" value=""
> >>>>>>>>> global="true"/> -->
> >>>>>>>>> +                <set field="layoutSettings.javaScripts[]"
> >>>>>>>>> value="/images/selectall.js" global="true"/>
> >>>>>>>>>                  <set field="activeApp" value="contentmgr"
> >>>>>>>>> global="true"/>
> >>>>>>>>>                  <set field="applicationMenuName"
> >>>>>>>>> value="ContentAppBar" global="true"/>
> >>>>>>>>> -                <set field="applicationMenuLocation"
> >>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
> >>>>>>> global="true"/>
> >>>>>>>>> +                <set field="applicationMenuLocation"
> >>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
> >>>>>>> global="true"/>
> >>>>>>>>>              </actions>
> >>>>>>>>>              <widgets>
> >>>>>>>>>                  <include-screen name="GlobalDecorator"
> >>>>>>>>> location="component://common/widget/CommonScreens.xml"/>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>
> >>>
> >>>
> >>
> >
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

Jacques Le Roux
Administrator
In reply to this post by Adrian Crum
Please wait about this issue for now. I will try to find a better solution next weekend. Of course any suggestion (as Adrian's here
that I have no time to think seriously about) is welcome...

Thanks

Jacques

De : "Adrian Crum" <[hidden email]>

> It seems to me, if we want to load the javascript only when it's needed, then we would have to
> specify it whenever a form widget is used.
>
> -Adrian
>
> David E Jones wrote:
>
> >
> > Jonathon,
> >
> > The point it it's HTML generated by the form widget, so searching is NOT
> > going to find each instance, ie anything that can get to a per-screen
> > thing.
> >
> > If you are wondering more about this I recommend researching the form
> > widget more, especially for the type="multi" forms.
> >
> > -David
> >
> >
> > Jonathon -- Improov wrote:
> >
> >> Jacques,
> >>
> >> Well then, that's great. It's centralized in HtmlFormRenderer.
> >>
> >> If your search didn't find any in the .ftl(s) or webapp folders, I
> >> think that's it. You must have caught them all (in the Widget Engine).
> >>
> >> Jonathon
> >>
> >> Jacques Le Roux wrote:
> >>
> >>> Jonathon,
> >>>
> >>> As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which
> >>> is used in every widget forms...
> >>>
> >>> Jacques
> >>>
> >>> De : "Jonathon -- Improov" <[hidden email]>
> >>>
> >>>> Jacques,
> >>>>
> >>>> If you didn't find the string "submitFormDisableSubmits" anywhere
> >>>> else, then perhaps it isn't used
> >>>> anywhere else?
> >>>>
> >>>> Try grepping/searching for shorter strings like "submitForm" or
> >>>> "DisableSubmits", case-insensitive.
> >>>>
> >>>> Jonathon
> >>>>
> >>>> Jacques Le Roux wrote:
> >>>>
> >>>>> Jonathon,
> >>>>>
> >>>>> I'm on Windows XP. But Eclipse has a great search feature too (even
> >>>>> replace is good in 3.4M1 now), and I discovered nothing. So
> >>>
> >>> I
> >>>
> >>>>> can put it in the screen where the problem was found but this does
> >>>>> not cover other cases that exist for sure... This is the
> >>>
> >>> basic
> >>>
> >>>>> reason...
> >>>>>
> >>>>> Jacques
> >>>>>
> >>>>> De : "Jonathon -- Improov" <[hidden email]>
> >>>>>
> >>>>>> Jacques,
> >>>>>>
> >>>>>> Do a grep in the webapp folders. And in case some .ftl(s) end up
> >>>>>> in widget folders, grep there too.
> >>>>>>
> >>>>>> One more place. Grep the Widget framework folder.
> >>>>>>
> >>>>>> Jonathon
> >>>>>>
> >>>>>> Jacques Le Roux wrote:
> >>>>>>
> >>>>>>> David,
> >>>>>>>
> >>>>>>> The reason I put it there is because there are no easy
> >>>>>>> identifiable screens. The only place I found
> >>>>>>> submitFormDisableSubmits
> >>>
> >>> is
> >>>
> >>>>> in
> >>>>>
> >>>>>>> HtmlFormRenderer.renderFormOpen. What is the best practice in
> >>>>>>> such case ? Because I can't see a quick way to find concerned
> >>>>>
> >>>>> screens.
> >>>>>
> >>>>>>> Thanks
> >>>>>>>
> >>>>>>> Jacques
> >>>>>>>
> >>>>>>>
> >>>>>>> De : "David E Jones" <[hidden email]>
> >>>>>>>
> >>>>>>>> The selectall.js file, or any other js file, should not go in a
> >>>>>>>> general decorator, especially an application-wide one like
> >>>>>>>
> >>>>>>> mainContentDecorator. It should go in each individual screen that
> >>>>>>> actually uses/needs the JavaScript.
> >>>>>>>
> >>>>>>>> This is important for efficient functioning of the applications
> >>>>>>>> (avoid loading unused files, which need to be requested for
> >>>>>
> >>>>> every
> >>>>>
> >>>>>>> page hit in HTTPS), and also to reduce problems with naming and
> >>>>>>> other conflicts in the per-page scripting contexts.
> >>>>>>>
> >>>>>>>> -David
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> [hidden email] wrote:
> >>>>>>>>
> >>>>>>>>> Author: jleroux
> >>>>>>>>> Date: Sun Sep 30 11:08:19 2007
> >>>>>>>>> New Revision: 580760
> >>>>>>>>>
> >>>>>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
> >>>>>>>>> Log:
> >>>>>>>>> From a David Goodenough's issue "Missing .js file when
> >>>>>>>>> searching for DataResource"
> >>>>>>>
> >>>>>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
> >>>>>>>
> >>>>>>>>> Modified:
> >>>>>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>>>>>
> >>>>>>>>> Modified:
> >>>>>>>>> ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>>>>> URL:
> >>>
> >>>
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff

> >>>
> >>>
> >>>>>>>>> ==============================================================================
> >>>>>>>>>
> >>>>>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>>>>> (original)
> >>>>>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml
> >>>>>>>>> Sun Sep 30 11:08:19 2007
> >>>>>>>>> @@ -36,9 +36,10 @@
> >>>>>>>>>                  <set field="layoutSettings.extraHead"
> >>>>>>>>> value="&lt;link rel=&quot;stylesheet&quot;
> >>>>>>>
> >>>>>>> href=&quot;/content/images/contentForum.css&quot;
> >>>>>>> type=&quot;text/css&quot;/&gt;"/>
> >>>>>>>
> >>>>>>>>>                  <!-- <set
> >>>>>>>>> field="layoutSettings.headerMiddleBackgroundUrl" value=""
> >>>>>>>>> global="true"/> -->
> >>>>>>>>>                  <!-- <set
> >>>>>>>>> field="layoutSettings.headerRightBackgroundUrl" value=""
> >>>>>>>>> global="true"/> -->
> >>>>>>>>> +                <set field="layoutSettings.javaScripts[]"
> >>>>>>>>> value="/images/selectall.js" global="true"/>
> >>>>>>>>>                  <set field="activeApp" value="contentmgr"
> >>>>>>>>> global="true"/>
> >>>>>>>>>                  <set field="applicationMenuName"
> >>>>>>>>> value="ContentAppBar" global="true"/>
> >>>>>>>>> -                <set field="applicationMenuLocation"
> >>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
> >>>>>>>
> >>>>>>> global="true"/>
> >>>>>>>
> >>>>>>>>> +                <set field="applicationMenuLocation"
> >>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
> >>>>>>>
> >>>>>>> global="true"/>
> >>>>>>>
> >>>>>>>>>              </actions>
> >>>>>>>>>              <widgets>
> >>>>>>>>>                  <include-screen name="GlobalDecorator"
> >>>>>>>>> location="component://common/widget/CommonScreens.xml"/>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>
> >>>
> >>>
> >>
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

Jacques Le Roux
Administrator
In reply to this post by David E Jones-2
David, Jonathon, Adrian,

I have open a more general Jira issue for this : https://issues.apache.org/jira/browse/OFBIZ-1319

Jacques

De : "Jacques Le Roux" <[hidden email]>


> Please wait about this issue for now. I will try to find a better solution next weekend. Of course any suggestion (as Adrian's
here

> that I have no time to think seriously about) is welcome...
>
> Thanks
>
> Jacques
>
> De : "Adrian Crum" <[hidden email]>
> > It seems to me, if we want to load the javascript only when it's needed, then we would have to
> > specify it whenever a form widget is used.
> >
> > -Adrian
> >
> > David E Jones wrote:
> >
> > >
> > > Jonathon,
> > >
> > > The point it it's HTML generated by the form widget, so searching is NOT
> > > going to find each instance, ie anything that can get to a per-screen
> > > thing.
> > >
> > > If you are wondering more about this I recommend researching the form
> > > widget more, especially for the type="multi" forms.
> > >
> > > -David
> > >
> > >
> > > Jonathon -- Improov wrote:
> > >
> > >> Jacques,
> > >>
> > >> Well then, that's great. It's centralized in HtmlFormRenderer.
> > >>
> > >> If your search didn't find any in the .ftl(s) or webapp folders, I
> > >> think that's it. You must have caught them all (in the Widget Engine).
> > >>
> > >> Jonathon
> > >>
> > >> Jacques Le Roux wrote:
> > >>
> > >>> Jonathon,
> > >>>
> > >>> As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which
> > >>> is used in every widget forms...
> > >>>
> > >>> Jacques
> > >>>
> > >>> De : "Jonathon -- Improov" <[hidden email]>
> > >>>
> > >>>> Jacques,
> > >>>>
> > >>>> If you didn't find the string "submitFormDisableSubmits" anywhere
> > >>>> else, then perhaps it isn't used
> > >>>> anywhere else?
> > >>>>
> > >>>> Try grepping/searching for shorter strings like "submitForm" or
> > >>>> "DisableSubmits", case-insensitive.
> > >>>>
> > >>>> Jonathon
> > >>>>
> > >>>> Jacques Le Roux wrote:
> > >>>>
> > >>>>> Jonathon,
> > >>>>>
> > >>>>> I'm on Windows XP. But Eclipse has a great search feature too (even
> > >>>>> replace is good in 3.4M1 now), and I discovered nothing. So
> > >>>
> > >>> I
> > >>>
> > >>>>> can put it in the screen where the problem was found but this does
> > >>>>> not cover other cases that exist for sure... This is the
> > >>>
> > >>> basic
> > >>>
> > >>>>> reason...
> > >>>>>
> > >>>>> Jacques
> > >>>>>
> > >>>>> De : "Jonathon -- Improov" <[hidden email]>
> > >>>>>
> > >>>>>> Jacques,
> > >>>>>>
> > >>>>>> Do a grep in the webapp folders. And in case some .ftl(s) end up
> > >>>>>> in widget folders, grep there too.
> > >>>>>>
> > >>>>>> One more place. Grep the Widget framework folder.
> > >>>>>>
> > >>>>>> Jonathon
> > >>>>>>
> > >>>>>> Jacques Le Roux wrote:
> > >>>>>>
> > >>>>>>> David,
> > >>>>>>>
> > >>>>>>> The reason I put it there is because there are no easy
> > >>>>>>> identifiable screens. The only place I found
> > >>>>>>> submitFormDisableSubmits
> > >>>
> > >>> is
> > >>>
> > >>>>> in
> > >>>>>
> > >>>>>>> HtmlFormRenderer.renderFormOpen. What is the best practice in
> > >>>>>>> such case ? Because I can't see a quick way to find concerned
> > >>>>>
> > >>>>> screens.
> > >>>>>
> > >>>>>>> Thanks
> > >>>>>>>
> > >>>>>>> Jacques
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> De : "David E Jones" <[hidden email]>
> > >>>>>>>
> > >>>>>>>> The selectall.js file, or any other js file, should not go in a
> > >>>>>>>> general decorator, especially an application-wide one like
> > >>>>>>>
> > >>>>>>> mainContentDecorator. It should go in each individual screen that
> > >>>>>>> actually uses/needs the JavaScript.
> > >>>>>>>
> > >>>>>>>> This is important for efficient functioning of the applications
> > >>>>>>>> (avoid loading unused files, which need to be requested for
> > >>>>>
> > >>>>> every
> > >>>>>
> > >>>>>>> page hit in HTTPS), and also to reduce problems with naming and
> > >>>>>>> other conflicts in the per-page scripting contexts.
> > >>>>>>>
> > >>>>>>>> -David
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> [hidden email] wrote:
> > >>>>>>>>
> > >>>>>>>>> Author: jleroux
> > >>>>>>>>> Date: Sun Sep 30 11:08:19 2007
> > >>>>>>>>> New Revision: 580760
> > >>>>>>>>>
> > >>>>>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
> > >>>>>>>>> Log:
> > >>>>>>>>> From a David Goodenough's issue "Missing .js file when
> > >>>>>>>>> searching for DataResource"
> > >>>>>>>
> > >>>>>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
> > >>>>>>>
> > >>>>>>>>> Modified:
> > >>>>>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
> > >>>>>>>>>
> > >>>>>>>>> Modified:
> > >>>>>>>>> ofbiz/trunk/applications/content/widget/CommonScreens.xml
> > >>>>>>>>> URL:
> > >>>
> > >>>
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
> > >>>
> > >>>
> > >>>>>>>>> ==============================================================================
> > >>>>>>>>>
> > >>>>>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml
> > >>>>>>>>> (original)
> > >>>>>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml
> > >>>>>>>>> Sun Sep 30 11:08:19 2007
> > >>>>>>>>> @@ -36,9 +36,10 @@
> > >>>>>>>>>                  <set field="layoutSettings.extraHead"
> > >>>>>>>>> value="&lt;link rel=&quot;stylesheet&quot;
> > >>>>>>>
> > >>>>>>> href=&quot;/content/images/contentForum.css&quot;
> > >>>>>>> type=&quot;text/css&quot;/&gt;"/>
> > >>>>>>>
> > >>>>>>>>>                  <!-- <set
> > >>>>>>>>> field="layoutSettings.headerMiddleBackgroundUrl" value=""
> > >>>>>>>>> global="true"/> -->
> > >>>>>>>>>                  <!-- <set
> > >>>>>>>>> field="layoutSettings.headerRightBackgroundUrl" value=""
> > >>>>>>>>> global="true"/> -->
> > >>>>>>>>> +                <set field="layoutSettings.javaScripts[]"
> > >>>>>>>>> value="/images/selectall.js" global="true"/>
> > >>>>>>>>>                  <set field="activeApp" value="contentmgr"
> > >>>>>>>>> global="true"/>
> > >>>>>>>>>                  <set field="applicationMenuName"
> > >>>>>>>>> value="ContentAppBar" global="true"/>
> > >>>>>>>>> -                <set field="applicationMenuLocation"
> > >>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
> > >>>>>>>
> > >>>>>>> global="true"/>
> > >>>>>>>
> > >>>>>>>>> +                <set field="applicationMenuLocation"
> > >>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
> > >>>>>>>
> > >>>>>>> global="true"/>
> > >>>>>>>
> > >>>>>>>>>              </actions>
> > >>>>>>>>>              <widgets>
> > >>>>>>>>>                  <include-screen name="GlobalDecorator"
> > >>>>>>>>> location="component://common/widget/CommonScreens.xml"/>
> > >>>>>>>>>
> > >>>>>>>>>
> > >>>>>
> > >>>
> > >>>
> > >>
> > >
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r580760 - /ofbiz/trunk/applications/content/widget/CommonScreens.xml

jonwimp
Jacques,

Yup, nice one, that issue. Just some routine housekeeping and refactor, it seems. I often save
time in coding by throwing "unclassifiable functions" into a single file as an interim measure,
and sort them properly when I have time to properly classify them. Seems that's how selectall.js
was done too.

But I gotta admit that the "submitFormDisableSubmits" function does not in any way seem related to
"selectall". Whatever the case, good fix suggested. I vote for it.

Jonathon

Jacques Le Roux wrote:

> David, Jonathon, Adrian,
>
> I have open a more general Jira issue for this : https://issues.apache.org/jira/browse/OFBIZ-1319
>
> Jacques
>
> De : "Jacques Le Roux" <[hidden email]>
>
>
>> Please wait about this issue for now. I will try to find a better solution next weekend. Of course any suggestion (as Adrian's
> here
>> that I have no time to think seriously about) is welcome...
>>
>> Thanks
>>
>> Jacques
>>
>> De : "Adrian Crum" <[hidden email]>
>>> It seems to me, if we want to load the javascript only when it's needed, then we would have to
>>> specify it whenever a form widget is used.
>>>
>>> -Adrian
>>>
>>> David E Jones wrote:
>>>
>>>> Jonathon,
>>>>
>>>> The point it it's HTML generated by the form widget, so searching is NOT
>>>> going to find each instance, ie anything that can get to a per-screen
>>>> thing.
>>>>
>>>> If you are wondering more about this I recommend researching the form
>>>> widget more, especially for the type="multi" forms.
>>>>
>>>> -David
>>>>
>>>>
>>>> Jonathon -- Improov wrote:
>>>>
>>>>> Jacques,
>>>>>
>>>>> Well then, that's great. It's centralized in HtmlFormRenderer.
>>>>>
>>>>> If your search didn't find any in the .ftl(s) or webapp folders, I
>>>>> think that's it. You must have caught them all (in the Widget Engine).
>>>>>
>>>>> Jonathon
>>>>>
>>>>> Jacques Le Roux wrote:
>>>>>
>>>>>> Jonathon,
>>>>>>
>>>>>> As I wrote below, it's used in HtmlFormRenderer.renderFormOpen which
>>>>>> is used in every widget forms...
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> De : "Jonathon -- Improov" <[hidden email]>
>>>>>>
>>>>>>> Jacques,
>>>>>>>
>>>>>>> If you didn't find the string "submitFormDisableSubmits" anywhere
>>>>>>> else, then perhaps it isn't used
>>>>>>> anywhere else?
>>>>>>>
>>>>>>> Try grepping/searching for shorter strings like "submitForm" or
>>>>>>> "DisableSubmits", case-insensitive.
>>>>>>>
>>>>>>> Jonathon
>>>>>>>
>>>>>>> Jacques Le Roux wrote:
>>>>>>>
>>>>>>>> Jonathon,
>>>>>>>>
>>>>>>>> I'm on Windows XP. But Eclipse has a great search feature too (even
>>>>>>>> replace is good in 3.4M1 now), and I discovered nothing. So
>>>>>> I
>>>>>>
>>>>>>>> can put it in the screen where the problem was found but this does
>>>>>>>> not cover other cases that exist for sure... This is the
>>>>>> basic
>>>>>>
>>>>>>>> reason...
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>> De : "Jonathon -- Improov" <[hidden email]>
>>>>>>>>
>>>>>>>>> Jacques,
>>>>>>>>>
>>>>>>>>> Do a grep in the webapp folders. And in case some .ftl(s) end up
>>>>>>>>> in widget folders, grep there too.
>>>>>>>>>
>>>>>>>>> One more place. Grep the Widget framework folder.
>>>>>>>>>
>>>>>>>>> Jonathon
>>>>>>>>>
>>>>>>>>> Jacques Le Roux wrote:
>>>>>>>>>
>>>>>>>>>> David,
>>>>>>>>>>
>>>>>>>>>> The reason I put it there is because there are no easy
>>>>>>>>>> identifiable screens. The only place I found
>>>>>>>>>> submitFormDisableSubmits
>>>>>> is
>>>>>>
>>>>>>>> in
>>>>>>>>
>>>>>>>>>> HtmlFormRenderer.renderFormOpen. What is the best practice in
>>>>>>>>>> such case ? Because I can't see a quick way to find concerned
>>>>>>>> screens.
>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> Jacques
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> De : "David E Jones" <[hidden email]>
>>>>>>>>>>
>>>>>>>>>>> The selectall.js file, or any other js file, should not go in a
>>>>>>>>>>> general decorator, especially an application-wide one like
>>>>>>>>>> mainContentDecorator. It should go in each individual screen that
>>>>>>>>>> actually uses/needs the JavaScript.
>>>>>>>>>>
>>>>>>>>>>> This is important for efficient functioning of the applications
>>>>>>>>>>> (avoid loading unused files, which need to be requested for
>>>>>>>> every
>>>>>>>>
>>>>>>>>>> page hit in HTTPS), and also to reduce problems with naming and
>>>>>>>>>> other conflicts in the per-page scripting contexts.
>>>>>>>>>>
>>>>>>>>>>> -David
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> [hidden email] wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Author: jleroux
>>>>>>>>>>>> Date: Sun Sep 30 11:08:19 2007
>>>>>>>>>>>> New Revision: 580760
>>>>>>>>>>>>
>>>>>>>>>>>> URL: http://svn.apache.org/viewvc?rev=580760&view=rev
>>>>>>>>>>>> Log:
>>>>>>>>>>>> From a David Goodenough's issue "Missing .js file when
>>>>>>>>>>>> searching for DataResource"
>>>>>>>>>> (https://issues.apache.org/jira/browse/OFBIZ-1272) - OFBIZ-1272
>>>>>>>>>>
>>>>>>>>>>>> Modified:
>>>>>>>>>>>>     ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>>>>>
>>>>>>>>>>>> Modified:
>>>>>>>>>>>> ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>>>>> URL:
>>>>>>
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=580760&r1=580759&r2=580760&view=diff
>>>>>>
>>>>>>>>>>>> ==============================================================================
>>>>>>>>>>>>
>>>>>>>>>>>> --- ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>>>>> (original)
>>>>>>>>>>>> +++ ofbiz/trunk/applications/content/widget/CommonScreens.xml
>>>>>>>>>>>> Sun Sep 30 11:08:19 2007
>>>>>>>>>>>> @@ -36,9 +36,10 @@
>>>>>>>>>>>>                  <set field="layoutSettings.extraHead"
>>>>>>>>>>>> value="&lt;link rel=&quot;stylesheet&quot;
>>>>>>>>>> href=&quot;/content/images/contentForum.css&quot;
>>>>>>>>>> type=&quot;text/css&quot;/&gt;"/>
>>>>>>>>>>
>>>>>>>>>>>>                  <!-- <set
>>>>>>>>>>>> field="layoutSettings.headerMiddleBackgroundUrl" value=""
>>>>>>>>>>>> global="true"/> -->
>>>>>>>>>>>>                  <!-- <set
>>>>>>>>>>>> field="layoutSettings.headerRightBackgroundUrl" value=""
>>>>>>>>>>>> global="true"/> -->
>>>>>>>>>>>> +                <set field="layoutSettings.javaScripts[]"
>>>>>>>>>>>> value="/images/selectall.js" global="true"/>
>>>>>>>>>>>>                  <set field="activeApp" value="contentmgr"
>>>>>>>>>>>> global="true"/>
>>>>>>>>>>>>                  <set field="applicationMenuName"
>>>>>>>>>>>> value="ContentAppBar" global="true"/>
>>>>>>>>>>>> -                <set field="applicationMenuLocation"
>>>>>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
>>>>>>>>>> global="true"/>
>>>>>>>>>>
>>>>>>>>>>>> +                <set field="applicationMenuLocation"
>>>>>>>>>>>> value="component://content/widget/content/ContentMenus.xml"
>>>>>>>>>> global="true"/>
>>>>>>>>>>
>>>>>>>>>>>>              </actions>
>>>>>>>>>>>>              <widgets>
>>>>>>>>>>>>                  <include-screen name="GlobalDecorator"
>>>>>>>>>>>> location="component://common/widget/CommonScreens.xml"/>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>
>
>