You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Erwan de FERRIERES <er...@nereide.fr> on 2010/02/23 17:43:31 UTC

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Le 22/02/2010 17:34, doogie@apache.org a écrit :
> Author: doogie
> Date: Mon Feb 22 16:34:47 2010
> New Revision: 912645
>
> URL: http://svn.apache.org/viewvc?rev=912645&view=rev
> Log:
> Make use of FSE.expand(), instead of expandString, to provide support
> for direct setting of values in widgets.  This closes OFBIZ-3486.
>
> Modified:
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>      ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>
> Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=912645&r1=912644&r2=912645&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java (original)
> +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java Mon Feb 22 16:34:47 2010
> @@ -136,12 +136,12 @@
>                   newValue = this.fromField.get(context);
>                   if (Debug.verboseOn()) Debug.logVerbose("In screen getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue, module);
>               } else if (!this.valueExdr.isEmpty()) {
> -                newValue = this.valueExdr.expandString(context);
> +                newValue = this.valueExdr.expand(context);
>               }
>
>               // If newValue is still empty, use the default value
>               if (ObjectType.isEmpty(newValue)&&  !this.defaultExdr.isEmpty()) {
> -                newValue = this.defaultExdr.expandString(context);
> +                newValue = this.defaultExdr.expand(context);
>               }
>
>               if (UtilValidate.isNotEmpty(this.type)) {
>
> Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=912645&r1=912644&r2=912645&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java (original)
> +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java Mon Feb 22 16:34:47 2010
> @@ -157,7 +157,7 @@
>                       newValue = getInMemoryPersistedFromField(session, context);
>                       if (Debug.verboseOn()) Debug.logVerbose("In user getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue, module);
>                   } else if (!this.valueExdr.isEmpty()) {
> -                    newValue = this.valueExdr.expandString(context);
> +                    newValue = this.valueExdr.expand(context);
>                   }
>               } else if (this.fromScope != null&&  this.fromScope.equals("application")) {
>                   if (!this.fromField.isEmpty()) {
> @@ -165,20 +165,20 @@
>                       newValue = getInMemoryPersistedFromField(servletContext, context);
>                       if (Debug.verboseOn()) Debug.logVerbose("In application getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue, module);
>                   } else if (!this.valueExdr.isEmpty()) {
> -                    newValue = this.valueExdr.expandString(context);
> +                    newValue = this.valueExdr.expand(context);
>                   }
>               } else {
>                   if (!this.fromField.isEmpty()) {
>                       newValue = this.fromField.get(context);
>                       if (Debug.verboseOn()) Debug.logVerbose("In screen getting value for field from [" + this.fromField.getOriginalName() + "]: " + newValue, module);
>                   } else if (!this.valueExdr.isEmpty()) {
> -                    newValue = this.valueExdr.expandString(context);
> +                    newValue = this.valueExdr.expand(context);
>                   }
>               }
>
>               // If newValue is still empty, use the default value
>               if (ObjectType.isEmpty(newValue)&&  !this.defaultExdr.isEmpty()) {
> -                newValue = this.defaultExdr.expandString(context);
> +                newValue = this.defaultExdr.expand(context);
>               }
>
>               if (UtilValidate.isNotEmpty(this.type)) {
>
>
>

Since this commit, it's impossible to connect to AP and AF applications !

-- 
Erwan de FERRIERES
www.nereide.biz

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adrian Crum <ad...@hlmksw.com>.
Adam Heath wrote:
> Adrian Crum wrote:
>> On a related note...
>>
>> The problem Adam tried to fix is one of the problems I have with how the
>> scripting language is used. Here are some examples:
>>
>> <set field="someField" value="${someMap.someElement}"/>
>> <set field="someField" from-field="someMap.someElement"/>
>>
>> Both of those set elements do the same thing. The first example is (in
>> my opinion) a hack - it should throw an exception. The value attribute
>> should contain a constant value - not an expression.
>>
>> The specific problem Adam tried to fix was:
>>
>> <set field="someField" value="${groovy:...}"/>
>>
>> Again, I believe that use of the set element should throw an exception.
>> David suggested adding an attribute to the script element that would
>> accept scriptlets (or script fragments). My suggestion is to add a third
>> choice to the set element: expression. So, the set element would look
>> like this:
>>
>> <set field="someField" expression="${groovy:...}"/>
>>
>> To summarize, a field value can be assigned from a constant value, or
>> from an existing field, or from an expression. Attempts to hack an
>> attribute to make it behave like one of the others results in an exception.
>>
>> That's my two cents.
> 
> I'm still investigating this...

I know. I guess the point I'm trying to make is, you wouldn't have had 
to make this change if mini-language was more strict.

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adam Heath <do...@brainfood.com>.
Adrian Crum wrote:
> On a related note...
> 
> The problem Adam tried to fix is one of the problems I have with how the
> scripting language is used. Here are some examples:
> 
> <set field="someField" value="${someMap.someElement}"/>
> <set field="someField" from-field="someMap.someElement"/>
> 
> Both of those set elements do the same thing. The first example is (in
> my opinion) a hack - it should throw an exception. The value attribute
> should contain a constant value - not an expression.
> 
> The specific problem Adam tried to fix was:
> 
> <set field="someField" value="${groovy:...}"/>
> 
> Again, I believe that use of the set element should throw an exception.
> David suggested adding an attribute to the script element that would
> accept scriptlets (or script fragments). My suggestion is to add a third
> choice to the set element: expression. So, the set element would look
> like this:
> 
> <set field="someField" expression="${groovy:...}"/>
> 
> To summarize, a field value can be assigned from a constant value, or
> from an existing field, or from an expression. Attempts to hack an
> attribute to make it behave like one of the others results in an exception.
> 
> That's my two cents.

I'm still investigating this...

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adrian Crum <ad...@hlmksw.com>.
David E Jones wrote:
> I guess what it comes down to is that if we could treat from-field like an expression we wouldn't need the hacks in value and we wouldn't need a separate expression attribute with yet another set of rules for people to learn.

That would work too, and it would be a simple modification to make.

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by David E Jones <de...@me.com>.
On Feb 23, 2010, at 11:15 PM, Adrian Crum wrote:

> --- On Tue, 2/23/10, David E Jones <de...@me.com> wrote:
>> Actually, my suggestion was not to add an attribute to the
>> script element, but allow script text under the script
>> element (surrounded by the funny CDATA thingy as needed to
>> avoid having to escape characters all over the place).
> 
> That could get really ugly in the screen widgets. They would start to look like JSPs.

I agree, these things can get ugly. However, if people are going to use it or if it is needed then it has to exist somewhere... why force it into another file?

-David


Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adrian Crum <ad...@yahoo.com>.
--- On Tue, 2/23/10, David E Jones <de...@me.com> wrote:
> Actually, my suggestion was not to add an attribute to the
> script element, but allow script text under the script
> element (surrounded by the funny CDATA thingy as needed to
> avoid having to escape characters all over the place).

That could get really ugly in the screen widgets. They would start to look like JSPs.



      

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by David E Jones <de...@me.com>.
Actually, my suggestion was not to add an attribute to the script element, but allow script text under the script element (surrounded by the funny CDATA thingy as needed to avoid having to escape characters all over the place).

As for the expression attribute... IMO it would be better to simplify things instead of making them more complex. In other words, it would be nice if the only different between the value and from-field attributes is that from-field is a single expression and value is a string with embeddable expressions.

It might even be nice to consider more scripting consistency in the project and use groovy for everything. I thought about this a while back after seeing that groovy supports ${} inside quoted strings, and if things were done this way then it would be simple:

from-field: evaluate the groovy expression/scriptlet and get the object it evaluates to
value: surround it with the groovy triple quotes ["""] and evaluate it, returning a string

I guess what it comes down to is that if we could treat from-field like an expression we wouldn't need the hacks in value and we wouldn't need a separate expression attribute with yet another set of rules for people to learn.

-David


On Feb 23, 2010, at 11:24 AM, Adrian Crum wrote:

> On a related note...
> 
> The problem Adam tried to fix is one of the problems I have with how the scripting language is used. Here are some examples:
> 
> <set field="someField" value="${someMap.someElement}"/>
> <set field="someField" from-field="someMap.someElement"/>
> 
> Both of those set elements do the same thing. The first example is (in my opinion) a hack - it should throw an exception. The value attribute should contain a constant value - not an expression.
> 
> The specific problem Adam tried to fix was:
> 
> <set field="someField" value="${groovy:...}"/>
> 
> Again, I believe that use of the set element should throw an exception. David suggested adding an attribute to the script element that would accept scriptlets (or script fragments). My suggestion is to add a third choice to the set element: expression. So, the set element would look like this:
> 
> <set field="someField" expression="${groovy:...}"/>
> 
> To summarize, a field value can be assigned from a constant value, or from an existing field, or from an expression. Attempts to hack an attribute to make it behave like one of the others results in an exception.
> 
> That's my two cents.
> 
> -Adrian
> 
> Adam Heath wrote:
>>> update your OFBiz instance to any version after the 912645, compile and
>>> just try to login to
>>> https://localhost:8443/ap/control/main or
>>> https://localhost:8443/ar/control/main
>>> 
>>> The page will not be displayed, and the only thing you will see is this
>>> message
>>> ERROR rendering error page [/error/error.jsp], but here is the error
>>> text: org.ofbiz.widget.screen.ScreenRenderException: Error rendering
>>> screen [component://accounting/widget/ar/CommonScreens.xml#main]:
>>> org.ofbiz.base.util.GeneralException: Error running Groovy script at
>>> location
>>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>>> (The current transaction is marked for rollback, not beginning a new
>>> transaction and aborting current operation; the rollbackOnly was caused
>>> by: Service [getPartyAccountingPreferences] threw an unexpected
>>> exception/errororg.ofbiz.service.ServiceValidationException: The
>>> following required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId] (The following
>>> required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId])) (Error running
>>> Groovy script at location
>>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>>> (The current transaction is marked for rollback, not beginning a new
>>> transaction and aborting current operation; the rollbackOnly was caused
>>> by: Service [getPartyAccountingPreferences] threw an unexpected
>>> exception/errororg.ofbiz.service.ServiceValidationException: The
>>> following required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId] (The following
>>> required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId])))
>> Duplicated, checking...


Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adrian Crum <ad...@hlmksw.com>.
On a related note...

The problem Adam tried to fix is one of the problems I have with how the 
scripting language is used. Here are some examples:

<set field="someField" value="${someMap.someElement}"/>
<set field="someField" from-field="someMap.someElement"/>

Both of those set elements do the same thing. The first example is (in 
my opinion) a hack - it should throw an exception. The value attribute 
should contain a constant value - not an expression.

The specific problem Adam tried to fix was:

<set field="someField" value="${groovy:...}"/>

Again, I believe that use of the set element should throw an exception. 
David suggested adding an attribute to the script element that would 
accept scriptlets (or script fragments). My suggestion is to add a third 
choice to the set element: expression. So, the set element would look 
like this:

<set field="someField" expression="${groovy:...}"/>

To summarize, a field value can be assigned from a constant value, or 
from an existing field, or from an expression. Attempts to hack an 
attribute to make it behave like one of the others results in an exception.

That's my two cents.

-Adrian

Adam Heath wrote:
>> update your OFBiz instance to any version after the 912645, compile and
>> just try to login to
>> https://localhost:8443/ap/control/main or
>> https://localhost:8443/ar/control/main
>>
>> The page will not be displayed, and the only thing you will see is this
>> message
>>  ERROR rendering error page [/error/error.jsp], but here is the error
>> text: org.ofbiz.widget.screen.ScreenRenderException: Error rendering
>> screen [component://accounting/widget/ar/CommonScreens.xml#main]:
>> org.ofbiz.base.util.GeneralException: Error running Groovy script at
>> location
>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>> (The current transaction is marked for rollback, not beginning a new
>> transaction and aborting current operation; the rollbackOnly was caused
>> by: Service [getPartyAccountingPreferences] threw an unexpected
>> exception/errororg.ofbiz.service.ServiceValidationException: The
>> following required parameter is missing:
>> [getPartyAccountingPreferences.organizationPartyId] (The following
>> required parameter is missing:
>> [getPartyAccountingPreferences.organizationPartyId])) (Error running
>> Groovy script at location
>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>> (The current transaction is marked for rollback, not beginning a new
>> transaction and aborting current operation; the rollbackOnly was caused
>> by: Service [getPartyAccountingPreferences] threw an unexpected
>> exception/errororg.ofbiz.service.ServiceValidationException: The
>> following required parameter is missing:
>> [getPartyAccountingPreferences.organizationPartyId] (The following
>> required parameter is missing:
>> [getPartyAccountingPreferences.organizationPartyId])))
> 
> Duplicated, checking...
> 
> 

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adam Heath <do...@brainfood.com>.
> update your OFBiz instance to any version after the 912645, compile and
> just try to login to
> https://localhost:8443/ap/control/main or
> https://localhost:8443/ar/control/main
> 
> The page will not be displayed, and the only thing you will see is this
> message
>  ERROR rendering error page [/error/error.jsp], but here is the error
> text: org.ofbiz.widget.screen.ScreenRenderException: Error rendering
> screen [component://accounting/widget/ar/CommonScreens.xml#main]:
> org.ofbiz.base.util.GeneralException: Error running Groovy script at
> location
> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
> (The current transaction is marked for rollback, not beginning a new
> transaction and aborting current operation; the rollbackOnly was caused
> by: Service [getPartyAccountingPreferences] threw an unexpected
> exception/errororg.ofbiz.service.ServiceValidationException: The
> following required parameter is missing:
> [getPartyAccountingPreferences.organizationPartyId] (The following
> required parameter is missing:
> [getPartyAccountingPreferences.organizationPartyId])) (Error running
> Groovy script at location
> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
> (The current transaction is marked for rollback, not beginning a new
> transaction and aborting current operation; the rollbackOnly was caused
> by: Service [getPartyAccountingPreferences] threw an unexpected
> exception/errororg.ofbiz.service.ServiceValidationException: The
> following required parameter is missing:
> [getPartyAccountingPreferences.organizationPartyId] (The following
> required parameter is missing:
> [getPartyAccountingPreferences.organizationPartyId])))

Duplicated, checking...


Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adam Heath <do...@brainfood.com>.
Jacques Le Roux wrote:
> Done at revision: 918476
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---
>>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>>
>>>>>>>
>>>>>>> (original)
>>>>>>> +++
>>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>>
>>>>>>>
>>>>>>> Mon Feb 22 16:34:47 2010
>>>>>>> @@ -157,7 +157,7 @@
>>>>>>>                        newValue =
>>>>>>> getInMemoryPersistedFromField(session, context);
>>>>>>>                        if (Debug.verboseOn())
>>>>>>> Debug.logVerbose("In user
>>>>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>>>>> "]: " + newValue, module);
>>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>>> -                    newValue =
>>>>>>> this.valueExdr.expandString(context);
>>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>>                    }
>>>>>>>                } else if (this.fromScope != null&&
>>>>>>> this.fromScope.equals("application")) {
>>>>>>>                    if (!this.fromField.isEmpty()) {
>>>>>>> @@ -165,20 +165,20 @@
>>>>>>>                        newValue =
>>>>>>> getInMemoryPersistedFromField(servletContext, context);
>>>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>>>>> application getting value for field from [" +
>>>>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>>> -                    newValue =
>>>>>>> this.valueExdr.expandString(context);
>>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>>                    }
>>>>>>>                } else {
>>>>>>>                    if (!this.fromField.isEmpty()) {
>>>>>>>                        newValue = this.fromField.get(context);
>>>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>>>>> screen getting value for field from [" +
>>>>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>>> -                    newValue =
>>>>>>> this.valueExdr.expandString(context);
>>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>>                    }
>>>>>>>                }
>>>>>>>
>>>>>>>                // If newValue is still empty, use the default value
>>>>>>>                if (ObjectType.isEmpty(newValue)&&
>>>>>>> !this.defaultExdr.isEmpty()) {
>>>>>>> -                newValue = this.defaultExdr.expandString(context);
>>>>>>> +                newValue = this.defaultExdr.expand(context);
>>>>>>>                }
>>>>>>>
>>>>>>>                if (UtilValidate.isNotEmpty(this.type)) {

When I originally did this change, it broke ap/ar webapps.  So, I
reverted it, 'cuz I didn't have time to look into it.

Then, when I fixed simpleTypeConvert, ap/ar broke *again*.  This was a
clue, to tell me that the apps themselves were broken, and not the
underlying code.

The exception in both cases was that organizationPartyId wasn't being
passed into a service.  Both this change and the simpleTypeConvert one
ended up changing an empty string to null.  So, what was happening,
was that an empty string was being passed to the service, which was
allowed.  Null was not, so that's why it failed.

This also tells me that whoever wrote these apps(ap/ar) didn't
actually test that organizationPartyId and defaultOrganizationPartyId
weren't being set correctly.

In summary, I'm happy that this change was finally able to go in.

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Done at revision: 918476

Jacques

From: "Jacques Le Roux" <ja...@les7arts.com>
> Hi devs,
>
> I'm using these changes in a custom application based from the trunk at r917244 with almost no other modifications (custom theme 
> and
> locales.available in general.properrties and postgres in entityengine.xml) but a specific component in hot-deploy and I don't have
> issues connecting to
>
> https://localhost:8443/ap/control/main nor
> https://localhost:8443/ar/control/main
>
> And no issues using them forward. So I wonder now if this was actually not another issue which has been resolved since.
>
> If nobody see a problem with that, I will commit these changes again. If you have the time to test it, please do.
>
> Jacques
>
> From: "Adam Heath" <do...@brainfood.com>
>> Erwan de FERRIERES wrote:
>>> Le 23/02/2010 17:46, Adam Heath a écrit :
>>>> Erwan de FERRIERES wrote:
>>>>> Le 22/02/2010 17:34, doogie@apache.org a écrit :
>>>>>> Author: doogie
>>>>>> Date: Mon Feb 22 16:34:47 2010
>>>>>> New Revision: 912645
>>>>>>
>>>>>> URL: http://svn.apache.org/viewvc?rev=912645&view=rev
>>>>>> Log:
>>>>>> Make use of FSE.expand(), instead of expandString, to provide support
>>>>>> for direct setting of values in widgets.  This closes OFBIZ-3486.
>>>>>>
>>>>>> Modified:
>>>>>>
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>>
>>>>>>
>>>>>>
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>
>>>>>>
>>>>>>
>>>>>> Modified:
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>>
>>>>>>
>>>>>> URL:
>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>>>>
>>>>>>
>>>>>> ==============================================================================
>>>>>>
>>>>>>
>>>>>> ---
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>>
>>>>>> (original)
>>>>>> +++
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>>
>>>>>> Mon Feb 22 16:34:47 2010
>>>>>> @@ -136,12 +136,12 @@
>>>>>>                    newValue = this.fromField.get(context);
>>>>>>                    if (Debug.verboseOn()) Debug.logVerbose("In screen
>>>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>>>> "]: " + newValue, module);
>>>>>>                } else if (!this.valueExdr.isEmpty()) {
>>>>>> -                newValue = this.valueExdr.expandString(context);
>>>>>> +                newValue = this.valueExdr.expand(context);
>>>>>>                }
>>>>>>
>>>>>>                // If newValue is still empty, use the default value
>>>>>>                if (ObjectType.isEmpty(newValue)&&
>>>>>> !this.defaultExdr.isEmpty()) {
>>>>>> -                newValue = this.defaultExdr.expandString(context);
>>>>>> +                newValue = this.defaultExdr.expand(context);
>>>>>>                }
>>>>>>
>>>>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>>>>
>>>>>> Modified:
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>
>>>>>>
>>>>>> URL:
>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>>>>
>>>>>>
>>>>>> ==============================================================================
>>>>>>
>>>>>>
>>>>>> ---
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>
>>>>>> (original)
>>>>>> +++
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>
>>>>>> Mon Feb 22 16:34:47 2010
>>>>>> @@ -157,7 +157,7 @@
>>>>>>                        newValue =
>>>>>> getInMemoryPersistedFromField(session, context);
>>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In user
>>>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>>>> "]: " + newValue, module);
>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>                    }
>>>>>>                } else if (this.fromScope != null&&
>>>>>> this.fromScope.equals("application")) {
>>>>>>                    if (!this.fromField.isEmpty()) {
>>>>>> @@ -165,20 +165,20 @@
>>>>>>                        newValue =
>>>>>> getInMemoryPersistedFromField(servletContext, context);
>>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>>>> application getting value for field from [" +
>>>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>                    }
>>>>>>                } else {
>>>>>>                    if (!this.fromField.isEmpty()) {
>>>>>>                        newValue = this.fromField.get(context);
>>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>>>> screen getting value for field from [" +
>>>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>                    }
>>>>>>                }
>>>>>>
>>>>>>                // If newValue is still empty, use the default value
>>>>>>                if (ObjectType.isEmpty(newValue)&&
>>>>>> !this.defaultExdr.isEmpty()) {
>>>>>> -                newValue = this.defaultExdr.expandString(context);
>>>>>> +                newValue = this.defaultExdr.expand(context);
>>>>>>                }
>>>>>>
>>>>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> Since this commit, it's impossible to connect to AP and AF
>>>>> applications !
>>>>
>>>> The test cases worked for this, which is bad since they didn't detect
>>>> a problem.
>>>>
>>>> Please give me an *exact* series of steps to reproduce this.  I don't
>>>> know anything about those apps.
>>>>
>>> Same for me ! I just tried to connect
>>>>
>>> Steps to reproduce :
>>>
>>> update your OFBiz instance to any version after the 912645, compile and
>>> just try to login to
>>> https://localhost:8443/ap/control/main or
>>> https://localhost:8443/ar/control/main
>>>
>>> The page will not be displayed, and the only thing you will see is this
>>> message
>>>  ERROR rendering error page [/error/error.jsp], but here is the error
>>> text: org.ofbiz.widget.screen.ScreenRenderException: Error rendering
>>> screen [component://accounting/widget/ar/CommonScreens.xml#main]:
>>> org.ofbiz.base.util.GeneralException: Error running Groovy script at
>>> location
>>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>>> (The current transaction is marked for rollback, not beginning a new
>>> transaction and aborting current operation; the rollbackOnly was caused
>>> by: Service [getPartyAccountingPreferences] threw an unexpected
>>> exception/errororg.ofbiz.service.ServiceValidationException: The
>>> following required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId] (The following
>>> required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId])) (Error running
>>> Groovy script at location
>>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>>> (The current transaction is marked for rollback, not beginning a new
>>> transaction and aborting current operation; the rollbackOnly was caused
>>> by: Service [getPartyAccountingPreferences] threw an unexpected
>>> exception/errororg.ofbiz.service.ServiceValidationException: The
>>> following required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId] (The following
>>> required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId])))
>>
>> I reverted this change in 915650, until I can look into it more.
>>
>
> 



Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Scott Gray <sc...@hotwaxmedia.com>.
On 3/03/2010, at 4:35 PM, Adam Heath wrote:

> Scott Gray wrote:
>> On 3/03/2010, at 2:23 PM, Adam Heath wrote:
>> 
>>> Jacques Le Roux wrote:
>>>> Thanks Erwan,
>>>> 
>>>> Looks like we are really building something more robust...
>>>> 
>>>> Jacques
>>>> 
>>>> From: "Erwan de FERRIERES" <er...@nereide.fr>
>>>>> Le 03/03/2010 13:36, Jacques Le Roux a écrit :
>>>>>> Hi Erwan,
>>>>>> 
>>>>>> Did you get a chance to have a try before I commit?
>>>>>> 
>>>>>> Thanks
>>>>>> 
>>>>>> Jacques
>>>>>> 
>>>>> Hi Jacques,
>>>>> 
>>>>> just come back from trying r917244 and it's good.
>>>>> 
>>>>> BTW, I have added some selenium tests to the OFBIZ-3511 jira.
>>>>> In those, there is one called NavigateAllApplications which connects
>>>>> and disconnects the admin user from all the OFBiz apps.
>>>>> 
>>>>> http://issues.apache.org/jira/browse/OFBIZ-3511
>>> Sorry, but not good enough.  We developers need to be able to run such
>>> tests when we change something, not wait until after we have committed it.
>>> 
>>> I've been thinking about the ap/ar issue, and using httpunit to test
>>> it(this particular problem doesn't require actually running from a
>>> browser).  I've just been too busy the last few days to implement
>>> anything.
>>> 
>> 
>> Discussion is king, at some point someone decided that selenium was the way to go and now that is what we have in the project.  If we want something else to go in, lets discuss it before we throw in any more tools.
> 
> Ooooh!  I didn't know we had a king.  I thought we were an autonomous
> collective.
> 
> If it is in, is there some ant target I can run?

You're fooling yourself.  We're living in a dictatorship.

I have no idea about ant off the top of my head, there is certainly plenty of setup involved and I'm not entirely convinced that we've gone down the best road.

Regards
Scott

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adam Heath <do...@brainfood.com>.
Scott Gray wrote:
> On 3/03/2010, at 2:23 PM, Adam Heath wrote:
> 
>> Jacques Le Roux wrote:
>>> Thanks Erwan,
>>>
>>> Looks like we are really building something more robust...
>>>
>>> Jacques
>>>
>>> From: "Erwan de FERRIERES" <er...@nereide.fr>
>>>> Le 03/03/2010 13:36, Jacques Le Roux a écrit :
>>>>> Hi Erwan,
>>>>>
>>>>> Did you get a chance to have a try before I commit?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>> Hi Jacques,
>>>>
>>>> just come back from trying r917244 and it's good.
>>>>
>>>> BTW, I have added some selenium tests to the OFBIZ-3511 jira.
>>>> In those, there is one called NavigateAllApplications which connects
>>>> and disconnects the admin user from all the OFBiz apps.
>>>>
>>>> http://issues.apache.org/jira/browse/OFBIZ-3511
>> Sorry, but not good enough.  We developers need to be able to run such
>> tests when we change something, not wait until after we have committed it.
>>
>> I've been thinking about the ap/ar issue, and using httpunit to test
>> it(this particular problem doesn't require actually running from a
>> browser).  I've just been too busy the last few days to implement
>> anything.
>>
> 
> Discussion is king, at some point someone decided that selenium was the way to go and now that is what we have in the project.  If we want something else to go in, lets discuss it before we throw in any more tools.

Ooooh!  I didn't know we had a king.  I thought we were an autonomous
collective.

If it is in, is there some ant target I can run?


Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Scott Gray <sc...@hotwaxmedia.com>.
On 3/03/2010, at 2:23 PM, Adam Heath wrote:

> Jacques Le Roux wrote:
>> Thanks Erwan,
>> 
>> Looks like we are really building something more robust...
>> 
>> Jacques
>> 
>> From: "Erwan de FERRIERES" <er...@nereide.fr>
>>> Le 03/03/2010 13:36, Jacques Le Roux a écrit :
>>>> Hi Erwan,
>>>> 
>>>> Did you get a chance to have a try before I commit?
>>>> 
>>>> Thanks
>>>> 
>>>> Jacques
>>>> 
>>> Hi Jacques,
>>> 
>>> just come back from trying r917244 and it's good.
>>> 
>>> BTW, I have added some selenium tests to the OFBIZ-3511 jira.
>>> In those, there is one called NavigateAllApplications which connects
>>> and disconnects the admin user from all the OFBiz apps.
>>> 
>>> http://issues.apache.org/jira/browse/OFBIZ-3511
> 
> Sorry, but not good enough.  We developers need to be able to run such
> tests when we change something, not wait until after we have committed it.
> 
> I've been thinking about the ap/ar issue, and using httpunit to test
> it(this particular problem doesn't require actually running from a
> browser).  I've just been too busy the last few days to implement
> anything.
> 

Discussion is king, at some point someone decided that selenium was the way to go and now that is what we have in the project.  If we want something else to go in, lets discuss it before we throw in any more tools.

Regards
Scott

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Erwan de FERRIERES <er...@nereide.fr>.
On 03/03/2010 22:23, Adam Heath wrote:
> Jacques Le Roux wrote:
>> Thanks Erwan,
>>
>> Looks like we are really building something more robust...
>>
>> Jacques
>>
>> From: "Erwan de FERRIERES"<er...@nereide.fr>
>>> Le 03/03/2010 13:36, Jacques Le Roux a écrit :
>>>> Hi Erwan,
>>>>
>>>> Did you get a chance to have a try before I commit?
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>> Hi Jacques,
>>>
>>> just come back from trying r917244 and it's good.
>>>
>>> BTW, I have added some selenium tests to the OFBIZ-3511 jira.
>>> In those, there is one called NavigateAllApplications which connects
>>> and disconnects the admin user from all the OFBiz apps.
>>>
>>> http://issues.apache.org/jira/browse/OFBIZ-3511
>
> Sorry, but not good enough.  We developers need to be able to run such
> tests when we change something, not wait until after we have committed it.
>
maybe not good enough but a start... and better than nothing !

Those tests can be run before committing to the trunk, you just have to 
install to your firefox the selenium IDE extension, load the testsuite 
and then click on "run all".

What can be done is a better integration as an ant task.

It will be the same thing with htmlunit, you always need to launch an 
OFBiz instance and then run the tests.

-- 
Erwan de FERRIERES
www.nereide.biz

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "Adam Heath" <do...@brainfood.com>
> Jacques Le Roux wrote:
>> Thanks Erwan,
>>
>> Looks like we are really building something more robust...
>>
>> Jacques
>>
>> From: "Erwan de FERRIERES" <er...@nereide.fr>
>>> Le 03/03/2010 13:36, Jacques Le Roux a écrit :
>>>> Hi Erwan,
>>>>
>>>> Did you get a chance to have a try before I commit?
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>> Hi Jacques,
>>>
>>> just come back from trying r917244 and it's good.
>>>
>>> BTW, I have added some selenium tests to the OFBIZ-3511 jira.
>>> In those, there is one called NavigateAllApplications which connects
>>> and disconnects the admin user from all the OFBiz apps.
>>>
>>> http://issues.apache.org/jira/browse/OFBIZ-3511
>
> Sorry, but not good enough.  We developers need to be able to run such
> tests when we change something, not wait until after we have committed it.
>
> I've been thinking about the ap/ar issue, and using httpunit to test
> it(this particular problem doesn't require actually running from a
> browser).  I've just been too busy the last few days to implement
> anything.

Next step..

Jacques



Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adam Heath <do...@brainfood.com>.
Jacques Le Roux wrote:
> Thanks Erwan,
> 
> Looks like we are really building something more robust...
> 
> Jacques
> 
> From: "Erwan de FERRIERES" <er...@nereide.fr>
>> Le 03/03/2010 13:36, Jacques Le Roux a écrit :
>>> Hi Erwan,
>>>
>>> Did you get a chance to have a try before I commit?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>> Hi Jacques,
>>
>> just come back from trying r917244 and it's good.
>>
>> BTW, I have added some selenium tests to the OFBIZ-3511 jira.
>> In those, there is one called NavigateAllApplications which connects
>> and disconnects the admin user from all the OFBiz apps.
>>
>> http://issues.apache.org/jira/browse/OFBIZ-3511

Sorry, but not good enough.  We developers need to be able to run such
tests when we change something, not wait until after we have committed it.

I've been thinking about the ap/ar issue, and using httpunit to test
it(this particular problem doesn't require actually running from a
browser).  I've just been too busy the last few days to implement
anything.


Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Erwan,

Looks like we are really building something more robust...

Jacques

From: "Erwan de FERRIERES" <er...@nereide.fr>
> Le 03/03/2010 13:36, Jacques Le Roux a écrit :
>> Hi Erwan,
>>
>> Did you get a chance to have a try before I commit?
>>
>> Thanks
>>
>> Jacques
>>
> Hi Jacques,
>
> just come back from trying r917244 and it's good.
>
> BTW, I have added some selenium tests to the OFBIZ-3511 jira.
> In those, there is one called NavigateAllApplications which connects and disconnects the admin user from all the OFBiz apps.
>
> http://issues.apache.org/jira/browse/OFBIZ-3511
>
> So, please proceed !
>
> -- 
> Erwan de FERRIERES
> www.nereide.biz
> 



Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Erwan de FERRIERES <er...@nereide.fr>.
Le 03/03/2010 13:36, Jacques Le Roux a écrit :
> Hi Erwan,
>
> Did you get a chance to have a try before I commit?
>
> Thanks
>
> Jacques
>
Hi Jacques,

just come back from trying r917244 and it's good.

BTW, I have added some selenium tests to the OFBIZ-3511 jira.
In those, there is one called NavigateAllApplications which connects and 
disconnects the admin user from all the OFBiz apps.

http://issues.apache.org/jira/browse/OFBIZ-3511

So, please proceed !

-- 
Erwan de FERRIERES
www.nereide.biz

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Erwan,

Did you get a chance to have a try before I commit?

Thanks

Jacques

From: "Jacques Le Roux" <ja...@les7arts.com>
> Hi devs,
>
> I'm using these changes in a custom application based from the trunk at r917244 with almost no other modifications (custom theme 
> and
> locales.available in general.properrties and postgres in entityengine.xml) but a specific component in hot-deploy and I don't have
> issues connecting to
>
> https://localhost:8443/ap/control/main nor
> https://localhost:8443/ar/control/main
>
> And no issues using them forward. So I wonder now if this was actually not another issue which has been resolved since.
>
> If nobody see a problem with that, I will commit these changes again. If you have the time to test it, please do.
>
> Jacques
>
> From: "Adam Heath" <do...@brainfood.com>
>> Erwan de FERRIERES wrote:
>>> Le 23/02/2010 17:46, Adam Heath a écrit :
>>>> Erwan de FERRIERES wrote:
>>>>> Le 22/02/2010 17:34, doogie@apache.org a écrit :
>>>>>> Author: doogie
>>>>>> Date: Mon Feb 22 16:34:47 2010
>>>>>> New Revision: 912645
>>>>>>
>>>>>> URL: http://svn.apache.org/viewvc?rev=912645&view=rev
>>>>>> Log:
>>>>>> Make use of FSE.expand(), instead of expandString, to provide support
>>>>>> for direct setting of values in widgets.  This closes OFBIZ-3486.
>>>>>>
>>>>>> Modified:
>>>>>>
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>>
>>>>>>
>>>>>>
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>
>>>>>>
>>>>>>
>>>>>> Modified:
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>>
>>>>>>
>>>>>> URL:
>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>>>>
>>>>>>
>>>>>> ==============================================================================
>>>>>>
>>>>>>
>>>>>> ---
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>>
>>>>>> (original)
>>>>>> +++
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>>
>>>>>> Mon Feb 22 16:34:47 2010
>>>>>> @@ -136,12 +136,12 @@
>>>>>>                    newValue = this.fromField.get(context);
>>>>>>                    if (Debug.verboseOn()) Debug.logVerbose("In screen
>>>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>>>> "]: " + newValue, module);
>>>>>>                } else if (!this.valueExdr.isEmpty()) {
>>>>>> -                newValue = this.valueExdr.expandString(context);
>>>>>> +                newValue = this.valueExdr.expand(context);
>>>>>>                }
>>>>>>
>>>>>>                // If newValue is still empty, use the default value
>>>>>>                if (ObjectType.isEmpty(newValue)&&
>>>>>> !this.defaultExdr.isEmpty()) {
>>>>>> -                newValue = this.defaultExdr.expandString(context);
>>>>>> +                newValue = this.defaultExdr.expand(context);
>>>>>>                }
>>>>>>
>>>>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>>>>
>>>>>> Modified:
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>
>>>>>>
>>>>>> URL:
>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>>>>
>>>>>>
>>>>>> ==============================================================================
>>>>>>
>>>>>>
>>>>>> ---
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>
>>>>>> (original)
>>>>>> +++
>>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>>
>>>>>> Mon Feb 22 16:34:47 2010
>>>>>> @@ -157,7 +157,7 @@
>>>>>>                        newValue =
>>>>>> getInMemoryPersistedFromField(session, context);
>>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In user
>>>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>>>> "]: " + newValue, module);
>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>                    }
>>>>>>                } else if (this.fromScope != null&&
>>>>>> this.fromScope.equals("application")) {
>>>>>>                    if (!this.fromField.isEmpty()) {
>>>>>> @@ -165,20 +165,20 @@
>>>>>>                        newValue =
>>>>>> getInMemoryPersistedFromField(servletContext, context);
>>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>>>> application getting value for field from [" +
>>>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>                    }
>>>>>>                } else {
>>>>>>                    if (!this.fromField.isEmpty()) {
>>>>>>                        newValue = this.fromField.get(context);
>>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>>>> screen getting value for field from [" +
>>>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>>                    }
>>>>>>                }
>>>>>>
>>>>>>                // If newValue is still empty, use the default value
>>>>>>                if (ObjectType.isEmpty(newValue)&&
>>>>>> !this.defaultExdr.isEmpty()) {
>>>>>> -                newValue = this.defaultExdr.expandString(context);
>>>>>> +                newValue = this.defaultExdr.expand(context);
>>>>>>                }
>>>>>>
>>>>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> Since this commit, it's impossible to connect to AP and AF
>>>>> applications !
>>>>
>>>> The test cases worked for this, which is bad since they didn't detect
>>>> a problem.
>>>>
>>>> Please give me an *exact* series of steps to reproduce this.  I don't
>>>> know anything about those apps.
>>>>
>>> Same for me ! I just tried to connect
>>>>
>>> Steps to reproduce :
>>>
>>> update your OFBiz instance to any version after the 912645, compile and
>>> just try to login to
>>> https://localhost:8443/ap/control/main or
>>> https://localhost:8443/ar/control/main
>>>
>>> The page will not be displayed, and the only thing you will see is this
>>> message
>>>  ERROR rendering error page [/error/error.jsp], but here is the error
>>> text: org.ofbiz.widget.screen.ScreenRenderException: Error rendering
>>> screen [component://accounting/widget/ar/CommonScreens.xml#main]:
>>> org.ofbiz.base.util.GeneralException: Error running Groovy script at
>>> location
>>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>>> (The current transaction is marked for rollback, not beginning a new
>>> transaction and aborting current operation; the rollbackOnly was caused
>>> by: Service [getPartyAccountingPreferences] threw an unexpected
>>> exception/errororg.ofbiz.service.ServiceValidationException: The
>>> following required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId] (The following
>>> required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId])) (Error running
>>> Groovy script at location
>>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>>> (The current transaction is marked for rollback, not beginning a new
>>> transaction and aborting current operation; the rollbackOnly was caused
>>> by: Service [getPartyAccountingPreferences] threw an unexpected
>>> exception/errororg.ofbiz.service.ServiceValidationException: The
>>> following required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId] (The following
>>> required parameter is missing:
>>> [getPartyAccountingPreferences.organizationPartyId])))
>>
>> I reverted this change in 915650, until I can look into it more.
>>
>
> 



Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi devs,

I'm using these changes in a custom application based from the trunk at r917244 with almost no other modifications (custom theme and
locales.available in general.properrties and postgres in entityengine.xml) but a specific component in hot-deploy and I don't have
issues connecting to

https://localhost:8443/ap/control/main nor
https://localhost:8443/ar/control/main

And no issues using them forward. So I wonder now if this was actually not another issue which has been resolved since.

If nobody see a problem with that, I will commit these changes again. If you have the time to test it, please do.

Jacques

From: "Adam Heath" <do...@brainfood.com>
> Erwan de FERRIERES wrote:
>> Le 23/02/2010 17:46, Adam Heath a écrit :
>>> Erwan de FERRIERES wrote:
>>>> Le 22/02/2010 17:34, doogie@apache.org a écrit :
>>>>> Author: doogie
>>>>> Date: Mon Feb 22 16:34:47 2010
>>>>> New Revision: 912645
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=912645&view=rev
>>>>> Log:
>>>>> Make use of FSE.expand(), instead of expandString, to provide support
>>>>> for direct setting of values in widgets.  This closes OFBIZ-3486.
>>>>>
>>>>> Modified:
>>>>>
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>
>>>>>
>>>>>
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>
>>>>>
>>>>>
>>>>> Modified:
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>
>>>>>
>>>>> URL:
>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>>>
>>>>>
>>>>> ==============================================================================
>>>>>
>>>>>
>>>>> ---
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>
>>>>> (original)
>>>>> +++
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>>
>>>>> Mon Feb 22 16:34:47 2010
>>>>> @@ -136,12 +136,12 @@
>>>>>                    newValue = this.fromField.get(context);
>>>>>                    if (Debug.verboseOn()) Debug.logVerbose("In screen
>>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>>> "]: " + newValue, module);
>>>>>                } else if (!this.valueExdr.isEmpty()) {
>>>>> -                newValue = this.valueExdr.expandString(context);
>>>>> +                newValue = this.valueExdr.expand(context);
>>>>>                }
>>>>>
>>>>>                // If newValue is still empty, use the default value
>>>>>                if (ObjectType.isEmpty(newValue)&&
>>>>> !this.defaultExdr.isEmpty()) {
>>>>> -                newValue = this.defaultExdr.expandString(context);
>>>>> +                newValue = this.defaultExdr.expand(context);
>>>>>                }
>>>>>
>>>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>>>
>>>>> Modified:
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>
>>>>>
>>>>> URL:
>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>>>
>>>>>
>>>>> ==============================================================================
>>>>>
>>>>>
>>>>> ---
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>
>>>>> (original)
>>>>> +++
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>>
>>>>> Mon Feb 22 16:34:47 2010
>>>>> @@ -157,7 +157,7 @@
>>>>>                        newValue =
>>>>> getInMemoryPersistedFromField(session, context);
>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In user
>>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>>> "]: " + newValue, module);
>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>                    }
>>>>>                } else if (this.fromScope != null&&
>>>>> this.fromScope.equals("application")) {
>>>>>                    if (!this.fromField.isEmpty()) {
>>>>> @@ -165,20 +165,20 @@
>>>>>                        newValue =
>>>>> getInMemoryPersistedFromField(servletContext, context);
>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>>> application getting value for field from [" +
>>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>                    }
>>>>>                } else {
>>>>>                    if (!this.fromField.isEmpty()) {
>>>>>                        newValue = this.fromField.get(context);
>>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>>> screen getting value for field from [" +
>>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>>> -                    newValue = this.valueExdr.expandString(context);
>>>>> +                    newValue = this.valueExdr.expand(context);
>>>>>                    }
>>>>>                }
>>>>>
>>>>>                // If newValue is still empty, use the default value
>>>>>                if (ObjectType.isEmpty(newValue)&&
>>>>> !this.defaultExdr.isEmpty()) {
>>>>> -                newValue = this.defaultExdr.expandString(context);
>>>>> +                newValue = this.defaultExdr.expand(context);
>>>>>                }
>>>>>
>>>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>>>
>>>>>
>>>>>
>>>>
>>>> Since this commit, it's impossible to connect to AP and AF
>>>> applications !
>>>
>>> The test cases worked for this, which is bad since they didn't detect
>>> a problem.
>>>
>>> Please give me an *exact* series of steps to reproduce this.  I don't
>>> know anything about those apps.
>>>
>> Same for me ! I just tried to connect
>>>
>> Steps to reproduce :
>>
>> update your OFBiz instance to any version after the 912645, compile and
>> just try to login to
>> https://localhost:8443/ap/control/main or
>> https://localhost:8443/ar/control/main
>>
>> The page will not be displayed, and the only thing you will see is this
>> message
>>  ERROR rendering error page [/error/error.jsp], but here is the error
>> text: org.ofbiz.widget.screen.ScreenRenderException: Error rendering
>> screen [component://accounting/widget/ar/CommonScreens.xml#main]:
>> org.ofbiz.base.util.GeneralException: Error running Groovy script at
>> location
>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>> (The current transaction is marked for rollback, not beginning a new
>> transaction and aborting current operation; the rollbackOnly was caused
>> by: Service [getPartyAccountingPreferences] threw an unexpected
>> exception/errororg.ofbiz.service.ServiceValidationException: The
>> following required parameter is missing:
>> [getPartyAccountingPreferences.organizationPartyId] (The following
>> required parameter is missing:
>> [getPartyAccountingPreferences.organizationPartyId])) (Error running
>> Groovy script at location
>> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
>> (The current transaction is marked for rollback, not beginning a new
>> transaction and aborting current operation; the rollbackOnly was caused
>> by: Service [getPartyAccountingPreferences] threw an unexpected
>> exception/errororg.ofbiz.service.ServiceValidationException: The
>> following required parameter is missing:
>> [getPartyAccountingPreferences.organizationPartyId] (The following
>> required parameter is missing:
>> [getPartyAccountingPreferences.organizationPartyId])))
>
> I reverted this change in 915650, until I can look into it more.
>



Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adam Heath <do...@brainfood.com>.
Erwan de FERRIERES wrote:
> Le 23/02/2010 17:46, Adam Heath a écrit :
>> Erwan de FERRIERES wrote:
>>> Le 22/02/2010 17:34, doogie@apache.org a écrit :
>>>> Author: doogie
>>>> Date: Mon Feb 22 16:34:47 2010
>>>> New Revision: 912645
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=912645&view=rev
>>>> Log:
>>>> Make use of FSE.expand(), instead of expandString, to provide support
>>>> for direct setting of values in widgets.  This closes OFBIZ-3486.
>>>>
>>>> Modified:
>>>>
>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>
>>>>
>>>>
>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>
>>>>
>>>>
>>>> Modified:
>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>
>>>>
>>>> URL:
>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>>
>>>>
>>>> ==============================================================================
>>>>
>>>>
>>>> ---
>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>
>>>> (original)
>>>> +++
>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>>
>>>> Mon Feb 22 16:34:47 2010
>>>> @@ -136,12 +136,12 @@
>>>>                    newValue = this.fromField.get(context);
>>>>                    if (Debug.verboseOn()) Debug.logVerbose("In screen
>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>> "]: " + newValue, module);
>>>>                } else if (!this.valueExdr.isEmpty()) {
>>>> -                newValue = this.valueExdr.expandString(context);
>>>> +                newValue = this.valueExdr.expand(context);
>>>>                }
>>>>
>>>>                // If newValue is still empty, use the default value
>>>>                if (ObjectType.isEmpty(newValue)&&
>>>> !this.defaultExdr.isEmpty()) {
>>>> -                newValue = this.defaultExdr.expandString(context);
>>>> +                newValue = this.defaultExdr.expand(context);
>>>>                }
>>>>
>>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>>
>>>> Modified:
>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>
>>>>
>>>> URL:
>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>>
>>>>
>>>> ==============================================================================
>>>>
>>>>
>>>> ---
>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>
>>>> (original)
>>>> +++
>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>>
>>>> Mon Feb 22 16:34:47 2010
>>>> @@ -157,7 +157,7 @@
>>>>                        newValue =
>>>> getInMemoryPersistedFromField(session, context);
>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In user
>>>> getting value for field from [" + this.fromField.getOriginalName() +
>>>> "]: " + newValue, module);
>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>> -                    newValue = this.valueExdr.expandString(context);
>>>> +                    newValue = this.valueExdr.expand(context);
>>>>                    }
>>>>                } else if (this.fromScope != null&&
>>>> this.fromScope.equals("application")) {
>>>>                    if (!this.fromField.isEmpty()) {
>>>> @@ -165,20 +165,20 @@
>>>>                        newValue =
>>>> getInMemoryPersistedFromField(servletContext, context);
>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>> application getting value for field from [" +
>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>> -                    newValue = this.valueExdr.expandString(context);
>>>> +                    newValue = this.valueExdr.expand(context);
>>>>                    }
>>>>                } else {
>>>>                    if (!this.fromField.isEmpty()) {
>>>>                        newValue = this.fromField.get(context);
>>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>>> screen getting value for field from [" +
>>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>>                    } else if (!this.valueExdr.isEmpty()) {
>>>> -                    newValue = this.valueExdr.expandString(context);
>>>> +                    newValue = this.valueExdr.expand(context);
>>>>                    }
>>>>                }
>>>>
>>>>                // If newValue is still empty, use the default value
>>>>                if (ObjectType.isEmpty(newValue)&&
>>>> !this.defaultExdr.isEmpty()) {
>>>> -                newValue = this.defaultExdr.expandString(context);
>>>> +                newValue = this.defaultExdr.expand(context);
>>>>                }
>>>>
>>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>>
>>>>
>>>>
>>>
>>> Since this commit, it's impossible to connect to AP and AF
>>> applications !
>>
>> The test cases worked for this, which is bad since they didn't detect
>> a problem.
>>
>> Please give me an *exact* series of steps to reproduce this.  I don't
>> know anything about those apps.
>>
> Same for me ! I just tried to connect
>>
> Steps to reproduce :
> 
> update your OFBiz instance to any version after the 912645, compile and
> just try to login to
> https://localhost:8443/ap/control/main or
> https://localhost:8443/ar/control/main
> 
> The page will not be displayed, and the only thing you will see is this
> message
>  ERROR rendering error page [/error/error.jsp], but here is the error
> text: org.ofbiz.widget.screen.ScreenRenderException: Error rendering
> screen [component://accounting/widget/ar/CommonScreens.xml#main]:
> org.ofbiz.base.util.GeneralException: Error running Groovy script at
> location
> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
> (The current transaction is marked for rollback, not beginning a new
> transaction and aborting current operation; the rollbackOnly was caused
> by: Service [getPartyAccountingPreferences] threw an unexpected
> exception/errororg.ofbiz.service.ServiceValidationException: The
> following required parameter is missing:
> [getPartyAccountingPreferences.organizationPartyId] (The following
> required parameter is missing:
> [getPartyAccountingPreferences.organizationPartyId])) (Error running
> Groovy script at location
> [component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy]
> (The current transaction is marked for rollback, not beginning a new
> transaction and aborting current operation; the rollbackOnly was caused
> by: Service [getPartyAccountingPreferences] threw an unexpected
> exception/errororg.ofbiz.service.ServiceValidationException: The
> following required parameter is missing:
> [getPartyAccountingPreferences.organizationPartyId] (The following
> required parameter is missing:
> [getPartyAccountingPreferences.organizationPartyId])))

I reverted this change in 915650, until I can look into it more.


Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Erwan de FERRIERES <er...@nereide.fr>.
Le 23/02/2010 17:46, Adam Heath a écrit :
> Erwan de FERRIERES wrote:
>> Le 22/02/2010 17:34, doogie@apache.org a écrit :
>>> Author: doogie
>>> Date: Mon Feb 22 16:34:47 2010
>>> New Revision: 912645
>>>
>>> URL: http://svn.apache.org/viewvc?rev=912645&view=rev
>>> Log:
>>> Make use of FSE.expand(), instead of expandString, to provide support
>>> for direct setting of values in widgets.  This closes OFBIZ-3486.
>>>
>>> Modified:
>>>
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>
>>>
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>
>>>
>>> Modified:
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>>
>>> URL:
>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>
>>> ==============================================================================
>>>
>>> ---
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>> (original)
>>> +++
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>> Mon Feb 22 16:34:47 2010
>>> @@ -136,12 +136,12 @@
>>>                    newValue = this.fromField.get(context);
>>>                    if (Debug.verboseOn()) Debug.logVerbose("In screen
>>> getting value for field from [" + this.fromField.getOriginalName() +
>>> "]: " + newValue, module);
>>>                } else if (!this.valueExdr.isEmpty()) {
>>> -                newValue = this.valueExdr.expandString(context);
>>> +                newValue = this.valueExdr.expand(context);
>>>                }
>>>
>>>                // If newValue is still empty, use the default value
>>>                if (ObjectType.isEmpty(newValue)&&
>>> !this.defaultExdr.isEmpty()) {
>>> -                newValue = this.defaultExdr.expandString(context);
>>> +                newValue = this.defaultExdr.expand(context);
>>>                }
>>>
>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>
>>> Modified:
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>>
>>> URL:
>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>>
>>> ==============================================================================
>>>
>>> ---
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>> (original)
>>> +++
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>> Mon Feb 22 16:34:47 2010
>>> @@ -157,7 +157,7 @@
>>>                        newValue =
>>> getInMemoryPersistedFromField(session, context);
>>>                        if (Debug.verboseOn()) Debug.logVerbose("In user
>>> getting value for field from [" + this.fromField.getOriginalName() +
>>> "]: " + newValue, module);
>>>                    } else if (!this.valueExdr.isEmpty()) {
>>> -                    newValue = this.valueExdr.expandString(context);
>>> +                    newValue = this.valueExdr.expand(context);
>>>                    }
>>>                } else if (this.fromScope != null&&
>>> this.fromScope.equals("application")) {
>>>                    if (!this.fromField.isEmpty()) {
>>> @@ -165,20 +165,20 @@
>>>                        newValue =
>>> getInMemoryPersistedFromField(servletContext, context);
>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>> application getting value for field from [" +
>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>                    } else if (!this.valueExdr.isEmpty()) {
>>> -                    newValue = this.valueExdr.expandString(context);
>>> +                    newValue = this.valueExdr.expand(context);
>>>                    }
>>>                } else {
>>>                    if (!this.fromField.isEmpty()) {
>>>                        newValue = this.fromField.get(context);
>>>                        if (Debug.verboseOn()) Debug.logVerbose("In
>>> screen getting value for field from [" +
>>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>>                    } else if (!this.valueExdr.isEmpty()) {
>>> -                    newValue = this.valueExdr.expandString(context);
>>> +                    newValue = this.valueExdr.expand(context);
>>>                    }
>>>                }
>>>
>>>                // If newValue is still empty, use the default value
>>>                if (ObjectType.isEmpty(newValue)&&
>>> !this.defaultExdr.isEmpty()) {
>>> -                newValue = this.defaultExdr.expandString(context);
>>> +                newValue = this.defaultExdr.expand(context);
>>>                }
>>>
>>>                if (UtilValidate.isNotEmpty(this.type)) {
>>>
>>>
>>>
>>
>> Since this commit, it's impossible to connect to AP and AF applications !
>
> The test cases worked for this, which is bad since they didn't detect
> a problem.
>
> Please give me an *exact* series of steps to reproduce this.  I don't
> know anything about those apps.
>
Same for me ! I just tried to connect
>
Steps to reproduce :

update your OFBiz instance to any version after the 912645, compile and 
just try to login to
https://localhost:8443/ap/control/main or 
https://localhost:8443/ar/control/main

The page will not be displayed, and the only thing you will see is this 
message
  ERROR rendering error page [/error/error.jsp], but here is the error 
text: org.ofbiz.widget.screen.ScreenRenderException: Error rendering 
screen [component://accounting/widget/ar/CommonScreens.xml#main]: 
org.ofbiz.base.util.GeneralException: Error running Groovy script at 
location 
[component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy] 
(The current transaction is marked for rollback, not beginning a new 
transaction and aborting current operation; the rollbackOnly was caused 
by: Service [getPartyAccountingPreferences] threw an unexpected 
exception/errororg.ofbiz.service.ServiceValidationException: The 
following required parameter is missing: 
[getPartyAccountingPreferences.organizationPartyId] (The following 
required parameter is missing: 
[getPartyAccountingPreferences.organizationPartyId])) (Error running 
Groovy script at location 
[component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy] 
(The current transaction is marked for rollback, not beginning a new 
transaction and aborting current operation; the rollbackOnly was caused 
by: Service [getPartyAccountingPreferences] threw an unexpected 
exception/errororg.ofbiz.service.ServiceValidationException: The 
following required parameter is missing: 
[getPartyAccountingPreferences.organizationPartyId] (The following 
required parameter is missing: 
[getPartyAccountingPreferences.organizationPartyId])))



-- 
Erwan de FERRIERES
www.nereide.biz

Re: svn commit: r912645 - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormAction.java screen/ModelScreenAction.java

Posted by Adam Heath <do...@brainfood.com>.
Erwan de FERRIERES wrote:
> Le 22/02/2010 17:34, doogie@apache.org a écrit :
>> Author: doogie
>> Date: Mon Feb 22 16:34:47 2010
>> New Revision: 912645
>>
>> URL: http://svn.apache.org/viewvc?rev=912645&view=rev
>> Log:
>> Make use of FSE.expand(), instead of expandString, to provide support
>> for direct setting of values in widgets.  This closes OFBIZ-3486.
>>
>> Modified:
>>     
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>
>>     
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>
>>
>> Modified:
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>>
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>
>> ==============================================================================
>>
>> ---
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>> (original)
>> +++
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
>> Mon Feb 22 16:34:47 2010
>> @@ -136,12 +136,12 @@
>>                   newValue = this.fromField.get(context);
>>                   if (Debug.verboseOn()) Debug.logVerbose("In screen
>> getting value for field from [" + this.fromField.getOriginalName() +
>> "]: " + newValue, module);
>>               } else if (!this.valueExdr.isEmpty()) {
>> -                newValue = this.valueExdr.expandString(context);
>> +                newValue = this.valueExdr.expand(context);
>>               }
>>
>>               // If newValue is still empty, use the default value
>>               if (ObjectType.isEmpty(newValue)&& 
>> !this.defaultExdr.isEmpty()) {
>> -                newValue = this.defaultExdr.expandString(context);
>> +                newValue = this.defaultExdr.expand(context);
>>               }
>>
>>               if (UtilValidate.isNotEmpty(this.type)) {
>>
>> Modified:
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>>
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=912645&r1=912644&r2=912645&view=diff
>>
>> ==============================================================================
>>
>> ---
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>> (original)
>> +++
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
>> Mon Feb 22 16:34:47 2010
>> @@ -157,7 +157,7 @@
>>                       newValue =
>> getInMemoryPersistedFromField(session, context);
>>                       if (Debug.verboseOn()) Debug.logVerbose("In user
>> getting value for field from [" + this.fromField.getOriginalName() +
>> "]: " + newValue, module);
>>                   } else if (!this.valueExdr.isEmpty()) {
>> -                    newValue = this.valueExdr.expandString(context);
>> +                    newValue = this.valueExdr.expand(context);
>>                   }
>>               } else if (this.fromScope != null&& 
>> this.fromScope.equals("application")) {
>>                   if (!this.fromField.isEmpty()) {
>> @@ -165,20 +165,20 @@
>>                       newValue =
>> getInMemoryPersistedFromField(servletContext, context);
>>                       if (Debug.verboseOn()) Debug.logVerbose("In
>> application getting value for field from [" +
>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>                   } else if (!this.valueExdr.isEmpty()) {
>> -                    newValue = this.valueExdr.expandString(context);
>> +                    newValue = this.valueExdr.expand(context);
>>                   }
>>               } else {
>>                   if (!this.fromField.isEmpty()) {
>>                       newValue = this.fromField.get(context);
>>                       if (Debug.verboseOn()) Debug.logVerbose("In
>> screen getting value for field from [" +
>> this.fromField.getOriginalName() + "]: " + newValue, module);
>>                   } else if (!this.valueExdr.isEmpty()) {
>> -                    newValue = this.valueExdr.expandString(context);
>> +                    newValue = this.valueExdr.expand(context);
>>                   }
>>               }
>>
>>               // If newValue is still empty, use the default value
>>               if (ObjectType.isEmpty(newValue)&& 
>> !this.defaultExdr.isEmpty()) {
>> -                newValue = this.defaultExdr.expandString(context);
>> +                newValue = this.defaultExdr.expand(context);
>>               }
>>
>>               if (UtilValidate.isNotEmpty(this.type)) {
>>
>>
>>
> 
> Since this commit, it's impossible to connect to AP and AF applications !

The test cases worked for this, which is bad since they didn't detect
a problem.

Please give me an *exact* series of steps to reproduce this.  I don't
know anything about those apps.

>