How can I output the values of env variables from within forms to help
me debug them? Many thanks ... |
Administrator
|
Use something like <log level="verbose" message="${env}"/>
Jacques ----- Original Message ----- From: "Christopher Snow" <[hidden email]> To: <[hidden email]> 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 ... |
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" <[hidden email]> > To: <[hidden email]> > 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 ... |
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" <[hidden email]> >> To: <[hidden email]> >> 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 ... smime.p7s (3K) Download Attachment |
In reply to this post by Jacques Le Roux
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 <[hidden email]> wrote: > Use something like <log level="verbose" message="${env}"/> > > Jacques > > ----- Original Message ----- > From: "Christopher Snow" <[hidden email]> > To: <[hidden email]> > 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 ... > |
Administrator
|
In reply to this post by David E Jones
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" <[hidden email]> > >> To: <[hidden email]> > >> 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 ... > > |
In reply to this post by cjhowe
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 <[hidden email]> wrote: > > > Use something like <log level="verbose" message="${env}"/> > > > > Jacques > > > > ----- Original Message ----- > > From: "Christopher Snow" <[hidden email]> > > To: <[hidden email]> > > 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 ... > > > |
In reply to this post by Jacques Le Roux
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" <[hidden email]> > > >> To: <[hidden email]> > > >> 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 ... > > > > |
Administrator
|
In reply to this post by cjhowe
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" <[hidden email]> To: <[hidden email]>; "Jacques Le Roux" <[hidden email]> 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 <[hidden email]> wrote: > > > Use something like <log level="verbose" message="${env}"/> > > > > Jacques > > > > ----- Original Message ----- > > From: "Christopher Snow" <[hidden email]> > > To: <[hidden email]> > > 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 ... > > |
Administrator
|
In reply to this post by snowch
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" <[hidden email]> To: <[hidden email]> 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 <[hidden email]> wrote: > > > > > Use something like <log level="verbose" message="${env}"/> > > > > > > Jacques > > > > > > ----- Original Message ----- > > > From: "Christopher Snow" <[hidden email]> > > > To: <[hidden email]> > > > 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 ... > > > > > |
In reply to this post by snowch
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 <[hidden email]> 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 <[hidden email]> wrote: > > > > > Use something like <log level="verbose" message="${env}"/> > > > > > > Jacques > > > > > > ----- Original Message ----- > > > From: "Christopher Snow" <[hidden email]> > > > To: <[hidden email]> > > > 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 ... > > > > > > |
In reply to this post by Jacques Le Roux
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" <[hidden email]> > To: <[hidden email]> > 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 <[hidden email]> wrote: > > > > > > > Use something like <log level="verbose" message="${env}"/> > > > > > > > > Jacques > > > > > > > > ----- Original Message ----- > > > > From: "Christopher Snow" <[hidden email]> > > > > To: <[hidden email]> > > > > 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 ... > > > > > > > > |
Free forum by Nabble | Edit this page |