You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Christopher Snow <sn...@coralms.com> on 2007/02/04 22:14:23 UTC

form-widgets debugging

How can I output the values of env variables from within forms to help
me debug them?

Many thanks ...

Re: form-widgets debugging

Posted by Christopher Snow <sn...@coralms.com>.
No problem.


On Sun, 2007-02-04 at 23:17 +0100, Jacques Le Roux wrote:
> Yes, sorry the <log tag is  only available in simple-method :/
> 
> Jacques
> 
> 
> > 
> > Just add a "display" field for it.
> > 
> > -David
> > 
> > 
> > On Feb 4, 2007, at 2:49 PM, Christopher Snow wrote:
> > 
> > > Jacques,
> > >
> > > Where should I put the <log ...> element?  The form doesn't allow it.
> > >
> > > Many thanks,
> > >
> > > Chris
> > >
> > >
> > >
> > > On Sun, 2007-02-04 at 22:41 +0100, Jacques Le Roux wrote:
> > >> Use  something like <log level="verbose" message="${env}"/>
> > >>
> > >> Jacques
> > >>
> > >> ----- Original Message -----
> > >> From: "Christopher Snow" <sn...@coralms.com>
> > >> To: <us...@ofbiz.apache.org>
> > >> Sent: Sunday, February 04, 2007 10:14 PM
> > >> Subject: form-widgets debugging
> > >>
> > >>
> > >>> How can I output the values of env variables from within forms to  
> > >>> help
> > >>> me debug them?
> > >>>
> > >>> Many thanks ...
> > 
> > 

Re: form-widgets debugging

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes, sorry the <log tag is  only available in simple-method :/

Jacques


> 
> Just add a "display" field for it.
> 
> -David
> 
> 
> On Feb 4, 2007, at 2:49 PM, Christopher Snow wrote:
> 
> > Jacques,
> >
> > Where should I put the <log ...> element?  The form doesn't allow it.
> >
> > Many thanks,
> >
> > Chris
> >
> >
> >
> > On Sun, 2007-02-04 at 22:41 +0100, Jacques Le Roux wrote:
> >> Use  something like <log level="verbose" message="${env}"/>
> >>
> >> Jacques
> >>
> >> ----- Original Message -----
> >> From: "Christopher Snow" <sn...@coralms.com>
> >> To: <us...@ofbiz.apache.org>
> >> Sent: Sunday, February 04, 2007 10:14 PM
> >> Subject: form-widgets debugging
> >>
> >>
> >>> How can I output the values of env variables from within forms to  
> >>> help
> >>> me debug them?
> >>>
> >>> Many thanks ...
> 
> 

Re: form-widgets debugging

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
Just add a "display" field for it.

-David


On Feb 4, 2007, at 2:49 PM, Christopher Snow wrote:

> Jacques,
>
> Where should I put the <log ...> element?  The form doesn't allow it.
>
> Many thanks,
>
> Chris
>
>
>
> On Sun, 2007-02-04 at 22:41 +0100, Jacques Le Roux wrote:
>> Use  something like <log level="verbose" message="${env}"/>
>>
>> Jacques
>>
>> ----- Original Message -----
>> From: "Christopher Snow" <sn...@coralms.com>
>> To: <us...@ofbiz.apache.org>
>> Sent: Sunday, February 04, 2007 10:14 PM
>> Subject: form-widgets debugging
>>
>>
>>> How can I output the values of env variables from within forms to  
>>> help
>>> me debug them?
>>>
>>> Many thanks ...


Re: form-widgets debugging

Posted by Christopher Snow <sn...@coralms.com>.
Jacques,

Where should I put the <log ...> element?  The form doesn't allow it.

Many thanks,

Chris



On Sun, 2007-02-04 at 22:41 +0100, Jacques Le Roux wrote:
> Use  something like <log level="verbose" message="${env}"/>
> 
> Jacques
> 
> ----- Original Message ----- 
> From: "Christopher Snow" <sn...@coralms.com>
> To: <us...@ofbiz.apache.org>
> Sent: Sunday, February 04, 2007 10:14 PM
> Subject: form-widgets debugging
> 
> 
> > How can I output the values of env variables from within forms to help
> > me debug them?
> > 
> > Many thanks ...

Re: form-widgets debugging

Posted by Christopher Snow <sn...@coralms.com>.
Thanks Jacques.


On Sun, 2007-02-04 at 23:38 +0100, Jacques Le Roux wrote:
> In a 1st step this may help : http://www.opensourcestrategies.com/ofbiz/tutorials.php
> 
> If you want to go further, for the moment I guess the best is :
> http://www.undersunconsulting.com/ecommerce/control/product/~category_id=USC_PROMO/~product_id=OFBADVFWKPKG
> 
> Jacques
> 
> ----- Original Message ----- 
> From: "Christopher Snow" <sn...@coralms.com>
> To: <us...@ofbiz.apache.org>
> Sent: Sunday, February 04, 2007 11:17 PM
> Subject: Re: form-widgets debugging
> 
> 
> > Ok, thanks.
> >
> > I think the 'real' problem is that I'm getting myself tied in knots
> > without having any documentation for form-widgets.  I'm confused with
> > the flow of variables, there seems to be a lot hidden behind the scenes.
> > With JSP's, it's possible to work out what parameters are being set.
> >
> > Is there any documentation on what happening behind the scenes when for
> > example pressing submit of a form-field of a form-widget to controller
> > to service, back to controller then to screens and back to form
> > widget?
> >
> > It seams like I'm having to drop into the debugger for the
> > ControlServlet to try and figure out what's getting passed around each
> > time and form is submitted ...
> >
> > I've been through the intro videos (although it was some time ago), but
> > they just seemed to scratch at the surface.
> >
> >
> > Thanks,
> >
> > Chris
> >
> >
> > On Sun, 2007-02-04 at 13:55 -0800, Chris Howe wrote:
> > > David beat me to it on the showing your variable
> > >
> > > To clarify what Jacques was suggesting,
> > > print your variable of interest to the log from the action that is
> > > gathering it.
> > >
> > > If your action to populate your form is:
> > >
> > > a service that calls a simple method:
> > > in the simple method us <log level="info" message=${env}/> I use info
> > > instead of verbose because I don't like wading through the verbose
> > > messages of things I'm not interested in, then go back and remove the
> > > log message when everything works, or set it to verbose if it's
> > > important
> > >
> > > a service that calls a java method:
> > > in the java method place Debug.Info(env, module);
> > >
> > > a bsh call
> > > in the bsh script place Debug.Info(env, null);
> > > the bsh script also needs to have
> > > import org.ofbiz.base.util.*;
> > >
> > > --- Jacques Le Roux <ja...@les7arts.com> wrote:
> > >
> > > > Use  something like <log level="verbose" message="${env}"/>
> > > >
> > > > Jacques
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Christopher Snow" <sn...@coralms.com>
> > > > To: <us...@ofbiz.apache.org>
> > > > Sent: Sunday, February 04, 2007 10:14 PM
> > > > Subject: form-widgets debugging
> > > >
> > > >
> > > > > How can I output the values of env variables from within forms to
> > > > help
> > > > > me debug them?
> > > > >
> > > > > Many thanks ...
> > > >
> > >
> 

Re: form-widgets debugging

Posted by Jacques Le Roux <ja...@les7arts.com>.
In a 1st step this may help : http://www.opensourcestrategies.com/ofbiz/tutorials.php

If you want to go further, for the moment I guess the best is :
http://www.undersunconsulting.com/ecommerce/control/product/~category_id=USC_PROMO/~product_id=OFBADVFWKPKG

Jacques

----- Original Message ----- 
From: "Christopher Snow" <sn...@coralms.com>
To: <us...@ofbiz.apache.org>
Sent: Sunday, February 04, 2007 11:17 PM
Subject: Re: form-widgets debugging


> Ok, thanks.
>
> I think the 'real' problem is that I'm getting myself tied in knots
> without having any documentation for form-widgets.  I'm confused with
> the flow of variables, there seems to be a lot hidden behind the scenes.
> With JSP's, it's possible to work out what parameters are being set.
>
> Is there any documentation on what happening behind the scenes when for
> example pressing submit of a form-field of a form-widget to controller
> to service, back to controller then to screens and back to form
> widget?
>
> It seams like I'm having to drop into the debugger for the
> ControlServlet to try and figure out what's getting passed around each
> time and form is submitted ...
>
> I've been through the intro videos (although it was some time ago), but
> they just seemed to scratch at the surface.
>
>
> Thanks,
>
> Chris
>
>
> On Sun, 2007-02-04 at 13:55 -0800, Chris Howe wrote:
> > David beat me to it on the showing your variable
> >
> > To clarify what Jacques was suggesting,
> > print your variable of interest to the log from the action that is
> > gathering it.
> >
> > If your action to populate your form is:
> >
> > a service that calls a simple method:
> > in the simple method us <log level="info" message=${env}/> I use info
> > instead of verbose because I don't like wading through the verbose
> > messages of things I'm not interested in, then go back and remove the
> > log message when everything works, or set it to verbose if it's
> > important
> >
> > a service that calls a java method:
> > in the java method place Debug.Info(env, module);
> >
> > a bsh call
> > in the bsh script place Debug.Info(env, null);
> > the bsh script also needs to have
> > import org.ofbiz.base.util.*;
> >
> > --- Jacques Le Roux <ja...@les7arts.com> wrote:
> >
> > > Use  something like <log level="verbose" message="${env}"/>
> > >
> > > Jacques
> > >
> > > ----- Original Message ----- 
> > > From: "Christopher Snow" <sn...@coralms.com>
> > > To: <us...@ofbiz.apache.org>
> > > Sent: Sunday, February 04, 2007 10:14 PM
> > > Subject: form-widgets debugging
> > >
> > >
> > > > How can I output the values of env variables from within forms to
> > > help
> > > > me debug them?
> > > >
> > > > Many thanks ...
> > >
> >


Re: form-widgets debugging

Posted by Chris Howe <cj...@yahoo.com>.
you can almost always regain your bearings by printing the context in
most of the screen/form widgets.  If what ever element you're using
wants a value use ${context}, if it's wanting a field just use
"context".  It spits out a lot, but you can usually follow that pretty
easily.


--- Christopher Snow <sn...@coralms.com> wrote:

> Ok, thanks.
> 
> I think the 'real' problem is that I'm getting myself tied in knots
> without having any documentation for form-widgets.  I'm confused with
> the flow of variables, there seems to be a lot hidden behind the
> scenes.
> With JSP's, it's possible to work out what parameters are being set. 
> 
> 
> Is there any documentation on what happening behind the scenes when
> for
> example pressing submit of a form-field of a form-widget to
> controller
> to service, back to controller then to screens and back to form
> widget?  
> 
> It seams like I'm having to drop into the debugger for the
> ControlServlet to try and figure out what's getting passed around
> each
> time and form is submitted ...
> 
> I've been through the intro videos (although it was some time ago),
> but
> they just seemed to scratch at the surface.  
> 
> 
> Thanks,
> 
> Chris
> 
> 
> On Sun, 2007-02-04 at 13:55 -0800, Chris Howe wrote:
> > David beat me to it on the showing your variable
> > 
> > To clarify what Jacques was suggesting,
> > print your variable of interest to the log from the action that is
> > gathering it.
> > 
> > If your action to populate your form is:
> > 
> > a service that calls a simple method:
> > in the simple method us <log level="info" message=${env}/> I use
> info
> > instead of verbose because I don't like wading through the verbose
> > messages of things I'm not interested in, then go back and remove
> the
> > log message when everything works, or set it to verbose if it's
> > important
> > 
> > a service that calls a java method:
> > in the java method place Debug.Info(env, module);
> > 
> > a bsh call
> > in the bsh script place Debug.Info(env, null);  
> > the bsh script also needs to have 
> > import org.ofbiz.base.util.*;
> > 
> > --- Jacques Le Roux <ja...@les7arts.com> wrote:
> > 
> > > Use  something like <log level="verbose" message="${env}"/>
> > > 
> > > Jacques
> > > 
> > > ----- Original Message ----- 
> > > From: "Christopher Snow" <sn...@coralms.com>
> > > To: <us...@ofbiz.apache.org>
> > > Sent: Sunday, February 04, 2007 10:14 PM
> > > Subject: form-widgets debugging
> > > 
> > > 
> > > > How can I output the values of env variables from within forms
> to
> > > help
> > > > me debug them?
> > > > 
> > > > Many thanks ...
> > > 
> > 
> 


Re: form-widgets debugging

Posted by Christopher Snow <sn...@coralms.com>.
Ok, thanks.

I think the 'real' problem is that I'm getting myself tied in knots
without having any documentation for form-widgets.  I'm confused with
the flow of variables, there seems to be a lot hidden behind the scenes.
With JSP's, it's possible to work out what parameters are being set.  

Is there any documentation on what happening behind the scenes when for
example pressing submit of a form-field of a form-widget to controller
to service, back to controller then to screens and back to form
widget?  

It seams like I'm having to drop into the debugger for the
ControlServlet to try and figure out what's getting passed around each
time and form is submitted ...

I've been through the intro videos (although it was some time ago), but
they just seemed to scratch at the surface.  


Thanks,

Chris


On Sun, 2007-02-04 at 13:55 -0800, Chris Howe wrote:
> David beat me to it on the showing your variable
> 
> To clarify what Jacques was suggesting,
> print your variable of interest to the log from the action that is
> gathering it.
> 
> If your action to populate your form is:
> 
> a service that calls a simple method:
> in the simple method us <log level="info" message=${env}/> I use info
> instead of verbose because I don't like wading through the verbose
> messages of things I'm not interested in, then go back and remove the
> log message when everything works, or set it to verbose if it's
> important
> 
> a service that calls a java method:
> in the java method place Debug.Info(env, module);
> 
> a bsh call
> in the bsh script place Debug.Info(env, null);  
> the bsh script also needs to have 
> import org.ofbiz.base.util.*;
> 
> --- Jacques Le Roux <ja...@les7arts.com> wrote:
> 
> > Use  something like <log level="verbose" message="${env}"/>
> > 
> > Jacques
> > 
> > ----- Original Message ----- 
> > From: "Christopher Snow" <sn...@coralms.com>
> > To: <us...@ofbiz.apache.org>
> > Sent: Sunday, February 04, 2007 10:14 PM
> > Subject: form-widgets debugging
> > 
> > 
> > > How can I output the values of env variables from within forms to
> > help
> > > me debug them?
> > > 
> > > Many thanks ...
> > 
> 

Re: form-widgets debugging

Posted by Jacques Le Roux <ja...@les7arts.com>.
Rather complete doc about debug : http://www.opensourcestrategies.com/ofbiz/ofbiz_debugging.txt (Mmm, I should read it ;o)

BTW, Yes I use also info.

You may also use debug.log ("shorter") or even Print("even more shorter") in BSH and Java (but only for fast debugging that will no
stay : not std)

I use to add something like "==========================================" in the string to show : visible at 1st glance.

Jacques

----- Original Message ----- 
From: "Chris Howe" <cj...@yahoo.com>
To: <us...@ofbiz.apache.org>; "Jacques Le Roux" <ja...@les7arts.com>
Sent: Sunday, February 04, 2007 10:55 PM
Subject: Re: form-widgets debugging


> David beat me to it on the showing your variable
>
> To clarify what Jacques was suggesting,
> print your variable of interest to the log from the action that is
> gathering it.
>
> If your action to populate your form is:
>
> a service that calls a simple method:
> in the simple method us <log level="info" message=${env}/> I use info
> instead of verbose because I don't like wading through the verbose
> messages of things I'm not interested in, then go back and remove the
> log message when everything works, or set it to verbose if it's
> important
>
> a service that calls a java method:
> in the java method place Debug.Info(env, module);
>
> a bsh call
> in the bsh script place Debug.Info(env, null);
> the bsh script also needs to have
> import org.ofbiz.base.util.*;
>
> --- Jacques Le Roux <ja...@les7arts.com> wrote:
>
> > Use  something like <log level="verbose" message="${env}"/>
> >
> > Jacques
> >
> > ----- Original Message ----- 
> > From: "Christopher Snow" <sn...@coralms.com>
> > To: <us...@ofbiz.apache.org>
> > Sent: Sunday, February 04, 2007 10:14 PM
> > Subject: form-widgets debugging
> >
> >
> > > How can I output the values of env variables from within forms to
> > help
> > > me debug them?
> > >
> > > Many thanks ...
> >


Re: form-widgets debugging

Posted by Chris Howe <cj...@yahoo.com>.
David beat me to it on the showing your variable

To clarify what Jacques was suggesting,
print your variable of interest to the log from the action that is
gathering it.

If your action to populate your form is:

a service that calls a simple method:
in the simple method us <log level="info" message=${env}/> I use info
instead of verbose because I don't like wading through the verbose
messages of things I'm not interested in, then go back and remove the
log message when everything works, or set it to verbose if it's
important

a service that calls a java method:
in the java method place Debug.Info(env, module);

a bsh call
in the bsh script place Debug.Info(env, null);  
the bsh script also needs to have 
import org.ofbiz.base.util.*;

--- Jacques Le Roux <ja...@les7arts.com> wrote:

> Use  something like <log level="verbose" message="${env}"/>
> 
> Jacques
> 
> ----- Original Message ----- 
> From: "Christopher Snow" <sn...@coralms.com>
> To: <us...@ofbiz.apache.org>
> Sent: Sunday, February 04, 2007 10:14 PM
> Subject: form-widgets debugging
> 
> 
> > How can I output the values of env variables from within forms to
> help
> > me debug them?
> > 
> > Many thanks ...
> 


Re: form-widgets debugging

Posted by Jacques Le Roux <ja...@les7arts.com>.
Use  something like <log level="verbose" message="${env}"/>

Jacques

----- Original Message ----- 
From: "Christopher Snow" <sn...@coralms.com>
To: <us...@ofbiz.apache.org>
Sent: Sunday, February 04, 2007 10:14 PM
Subject: form-widgets debugging


> How can I output the values of env variables from within forms to help
> me debug them?
> 
> Many thanks ...