You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Walter Vaughan <wv...@steelerubber.com> on 2007/11/14 01:57:17 UTC

SQL help needed

Okay, I'll admit my SQL skill are pre-newbie, but I'm kinda at a loss.

I'm trying to build some reports, and I am begging for some direction.
The following query works, but I need to add more columns...

SELECT
      "party_group"."group_name" AS "Company_Name"
      max("party_classification"."party_classification_group_id") as "Discount 
Type",
      sum("order_item"."unit_price")as "Discounted Amount",
      sum("order_item"."unit_list_price")as "Retail Amount",
      count( distinct "order_header"."order_id")as "Number Of Orders"
FROM
      "party" INNER JOIN "party_classification" ON "party"."party_id" = 
"party_classification"."party_id"
      INNER JOIN "order_header" ON "party"."party_id" = 
"order_header"."bill_to_party_id"
      INNER JOIN "party_group" ON "party"."party_id" = "party_group"."party_id"
      INNER JOIN "order_item" ON "order_header"."order_id" = "order_item"."order_id"
WHERE
      party_classification_group_id LIKE 'DEALER%'
  AND "order_item"."status_id" = 'ITEM_COMPLETED'
GROUP BY
      "party_group"."group_name"
ORDER BY
      "party_group"."group_name" ASC

I need to add in columns like phone numbers and primary contact names, city 
states, etc...

So I guess I need subqueries or some sort of SQL pixie dust, cause I can't 
figure out how to query in two different directions (order info and customer info).

Help. Anyone got any example SQL scripts around? Or links to examples that 
emulate the ofbiz database layout?

--
Walter

Re: SQL help needed

Posted by iain <ia...@westnet.com.au>.
Walter,

Not entirely sure what the problem is. You can keep on JOINing extra 
tables (provided you join on appropriate columns - foreign keys, 
usually) until the cows come home. Bear in mind that since you are using 
GROUP BY, every "column" in the SELECT clause needs to be either column 
in the GROUP BY, or an aggregate function.

Not sure if this helps...

Cheers, Iain


Walter Vaughan wrote:
> Okay, I'll admit my SQL skill are pre-newbie, but I'm kinda at a loss.
>
> I'm trying to build some reports, and I am begging for some direction.
> The following query works, but I need to add more columns...
>
> SELECT
>      "party_group"."group_name" AS "Company_Name"
>      max("party_classification"."party_classification_group_id") as 
> "Discount Type",
>      sum("order_item"."unit_price")as "Discounted Amount",
>      sum("order_item"."unit_list_price")as "Retail Amount",
>      count( distinct "order_header"."order_id")as "Number Of Orders"
> FROM
>      "party" INNER JOIN "party_classification" ON "party"."party_id" = 
> "party_classification"."party_id"
>      INNER JOIN "order_header" ON "party"."party_id" = 
> "order_header"."bill_to_party_id"
>      INNER JOIN "party_group" ON "party"."party_id" = 
> "party_group"."party_id"
>      INNER JOIN "order_item" ON "order_header"."order_id" = 
> "order_item"."order_id"
> WHERE
>      party_classification_group_id LIKE 'DEALER%'
>  AND "order_item"."status_id" = 'ITEM_COMPLETED'
> GROUP BY
>      "party_group"."group_name"
> ORDER BY
>      "party_group"."group_name" ASC
>
> I need to add in columns like phone numbers and primary contact names, 
> city states, etc...
>
> So I guess I need subqueries or some sort of SQL pixie dust, cause I 
> can't figure out how to query in two different directions (order info 
> and customer info).
>
> Help. Anyone got any example SQL scripts around? Or links to examples 
> that emulate the ofbiz database layout?
>
> -- 
> Walter
>
>



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.31 - Release Date: 13/11/2007 12:00 AM


Re: SQL help needed

Posted by Adrian Crum <ad...@hlmksw.com>.
Maybe try to create SQL views that mimic the OFBiz view entities.


Walter Vaughan wrote:
> Okay, I'll admit my SQL skill are pre-newbie, but I'm kinda at a loss.
> 
> I'm trying to build some reports, and I am begging for some direction.
> The following query works, but I need to add more columns...
> 
> SELECT
>      "party_group"."group_name" AS "Company_Name"
>      max("party_classification"."party_classification_group_id") as 
> "Discount Type",
>      sum("order_item"."unit_price")as "Discounted Amount",
>      sum("order_item"."unit_list_price")as "Retail Amount",
>      count( distinct "order_header"."order_id")as "Number Of Orders"
> FROM
>      "party" INNER JOIN "party_classification" ON "party"."party_id" = 
> "party_classification"."party_id"
>      INNER JOIN "order_header" ON "party"."party_id" = 
> "order_header"."bill_to_party_id"
>      INNER JOIN "party_group" ON "party"."party_id" = 
> "party_group"."party_id"
>      INNER JOIN "order_item" ON "order_header"."order_id" = 
> "order_item"."order_id"
> WHERE
>      party_classification_group_id LIKE 'DEALER%'
>  AND "order_item"."status_id" = 'ITEM_COMPLETED'
> GROUP BY
>      "party_group"."group_name"
> ORDER BY
>      "party_group"."group_name" ASC
> 
> I need to add in columns like phone numbers and primary contact names, 
> city states, etc...
> 
> So I guess I need subqueries or some sort of SQL pixie dust, cause I 
> can't figure out how to query in two different directions (order info 
> and customer info).
> 
> Help. Anyone got any example SQL scripts around? Or links to examples 
> that emulate the ofbiz database layout?
> 
> -- 
> Walter
> 


Re: Difficult Question

Posted by Scott Gray <le...@gmail.com>.
Why don't you just check for billingAccountId in your bsh script, if it's
not there check for a partyId and look up the billing account again?

Regards
Scott

On 17/11/2007, skip@thedevers <sk...@thedevers.org> wrote:
>
> I have fooled with this all day now and I bet there is someone out there
> who
> knows exactly how to do this.
>
> I have a URL, showTransactions that is normally called like this:
>
> .../showTransactions?billingAccountId=xyz
>
> I have another url;
>
> .../findTransactions
>
> The user gets dispatched to .../findTransactions and enters a partyId is
> present with a list of billingAccounts for a customer and they click on
> the
> billing account and off they go they go to
> .../showTransactions?billingAccountId=xyz
>
> What I want to do is if there is only one billing account, I don't want
> them
> to have to click the link.  I want to take them right there.  So, I tried
> writing both a service and a servlet like this:
>
>     public static Map getBillingAccountCount(DispatchContext dctx, Map
> context) {
>
> and
>
>     public static String getBillingAccountCount(HttpServletRequest
> request,
> HttpServletResponse response) {
>
> In the first, I stuffed the billingAccountId in the context.  In the
> second,
> I stuffed it in an attribute (there is, unfortunately, no setParameter
> which
> is exactly what I wanted).
>
> Here is a sample of the dispatcher:
>
>     <request-map uri="findTransactions">
>         <security https="true" auth="true"/>
>    <!--     <event type="service" invoke="getBillingAccountCount"/> -->
>         <event type="java"
> path="org.ofbiz.accounting.ar.BillingAccountWorker"
> invoke="getBillingAccountCount"/>
>         <response name="fail" type="view" value="findTransactions"/>
>         <response name="success" type="view" value="showTransactions"/>
>     </request-map>
>
> When the bash script gets called for showTransactions using either method,
> billingAccountId is not there.
>
> Anyone have any ideas on how to do this redirection and add parameters to
> the request or context?  I can do this with a servlet and filters, but I
> don't understand how Ofbiz handles all that.
>
> Skip
>
>

Re: BigDecmial vs Double

Posted by Scott Gray <le...@gmail.com>.
Off the top of my head, I'm pretty sure you can put them in fine but you
will get warnings in the logs about it.  I think the only time you run into
trouble is when the java type and the db column type are incompatible.

Regards
Scott

On 23/11/2007, skip@thedevers <sk...@thedevers.org> wrote:
>
> My code is doing lots of conversions between BigDecimal to Double for
> GenericValue.put() on "currency-amount" fields.
>
> Can I just put() the BigDecimal instead?
>
> I know I can test this pretty quick, but I am betting someone knows what
> is
> the most efficient way.
>
> Skip
>
>

Re: Widgets, containers, etc

Posted by Jonathon -- Improov <jo...@improov.com>.
Skip,

A quick one here, since I'm currently writing on this privately.

A screen widget is your stackable building block. Use it everywhere.

Screen widgets can include other screen widgets.

For what you want, use <container>, which outputs a HTML <div>. Use CSS to float the <div>s left 
or right.

Sometimes, you might still wanna use FTL. See ${component:common}/webcommon/includes/header.ftl 
for an example where FTL couldn't be avoided. Component "common" is in the /framework folder.

You can wrap FTL fragments in screen widgets. Again, use screen widgets as your stackable building 
blocks.

Jonathon

skip@thedevers wrote:
> I still haven't got a good handle on what can be done with this widget
> stuff, so I am just going to plunge in based on the samples.  However, I
> have one question someone might know the answer to.
> 
> I want a screen like this:
> 
> 
> ----------------------------------------+
> --------------------Title----------------
> 
> Some ftl
> 
> ------------------------------------------
> --------------------Title----------------+
> 
> some ftl
> 
> +----Title1--------+--------Title2--------+
> 
>    some ftl        |    someother ftl     |
> 
> 
> My question concerns displaying containers side by side like the Titlt1 and
> Title2.  Can this be done with a widget property and if so, is there a
> sample somewhere.  I know how to do this in the ftl but I wanted to be able
> to use the widgets separately in other places.
> 
> Skip
> 
> 


Re: Widgets, containers, etc

Posted by BJ Freeman <bj...@free-man.net>.
look at the eccommerce widet it is by far the best example.
applications/ecommerce/widget/commonscreens.xml
callout for rightbar leftbar with style=right
then use the CSS to move them around.


skip@thedevers sent the following on 11/25/2007 1:38 PM:
> I still haven't got a good handle on what can be done with this widget
> stuff, so I am just going to plunge in based on the samples.  However, I
> have one question someone might know the answer to.
> 
> I want a screen like this:
> 
> 
> ----------------------------------------+
> --------------------Title----------------
> 
> Some ftl
> 
> ------------------------------------------
> --------------------Title----------------+
> 
> some ftl
> 
> +----Title1--------+--------Title2--------+
> 
>    some ftl        |    someother ftl     |
> 
> 
> My question concerns displaying containers side by side like the Titlt1 and
> Title2.  Can this be done with a widget property and if so, is there a
> sample somewhere.  I know how to do this in the ftl but I wanted to be able
> to use the widgets separately in other places.
> 
> Skip
> 
> 
> 
> 

Widgets, containers, etc

Posted by "skip@thedevers" <sk...@thedevers.org>.
I still haven't got a good handle on what can be done with this widget
stuff, so I am just going to plunge in based on the samples.  However, I
have one question someone might know the answer to.

I want a screen like this:


----------------------------------------+
--------------------Title----------------

Some ftl

------------------------------------------
--------------------Title----------------+

some ftl

+----Title1--------+--------Title2--------+

   some ftl        |    someother ftl     |


My question concerns displaying containers side by side like the Titlt1 and
Title2.  Can this be done with a widget property and if so, is there a
sample somewhere.  I know how to do this in the ftl but I wanted to be able
to use the widgets separately in other places.

Skip


Re: Difficult Question

Posted by Scott Gray <le...@gmail.com>.
On 17/11/2007, skip@thedevers <sk...@thedevers.org> wrote:
>
> if(billingAccountId == null || billingAccountId.length() < 1)
>

Use UtilValidate.isEmpty(billingAccountId) instead, saves a bit of typing


> Thanks for the help.


No worries

Scott

RE: Difficult Question

Posted by "skip@thedevers" <sk...@thedevers.org>.
Scott

You are 100% right.  My problem before was that request.getAttribute() for
the two variables (partyId and billingAccountId) were null.  I tried
request.getParameter() and that yielded the contents of the previous screen
which is exactly what I wanted.

So I now have a bash script that looks like this:

billingAccountId = parameters.get("billingAccountId");

if(billingAccountId == null || billingAccountId.length() < 1)
	billingAccountId = request.getAttribute("billingAccountId");

and a dispatcher that looks like this:
      <request-map uri="findTransactions">
          <security https="true" auth="true"/>
     <!--     <event type="service" invoke="getBillingAccountCount"/> -->
          <event type="java"
path="org.ofbiz.accounting.ar.BillingAccountWorker"
invoke="getBillingAccountCount"/>
          <response name="fail" type="view" value="findTransactions"/>
          <response name="success" type="view" value="showTransactions"/>
      </request-map>

That works a charm.  I can now call it either way.  The service based one
does not work in case anyone is interested.

Thanks for the help.

Skip

-----Original Message-----
From: Scott Gray [mailto:lektran@gmail.com]
Sent: Friday, November 16, 2007 10:12 PM
To: user@ofbiz.apache.org
Subject: Re: Difficult Question


request.setAttribute works I just tried it.

Regards
Scott

On 17/11/2007, skip@thedevers <sk...@thedevers.org> wrote:
>
> Thanks to all who replied on this, but I guess I didn't explain it
> well.  I
> have no problem dispatching to one URL or the other, I can return any
> response I want.  The problem is this:
>
>      <request-map uri="findTransactions">
>          <security https="true" auth="true"/>
>     <!--     <event type="service" invoke="getBillingAccountCount"/> -->
>          <event type="java"
> path="org.ofbiz.accounting.ar.BillingAccountWorker"
> invoke="getBillingAccountCount"/>
>          <response name="fail" type="view" value="findTransactions"/>
>          <response name="success" type="view" value="showTransactions"/>
>      </request-map>
>
> On pass one through this findTransactions, fail is returned because there
> are no entries (no customer or billing account entered) and
> findTransactions
> gets called.  This is correct.  On pass two, the user has entered either a
> customerId or a billingAccountId.  If there is only one,
> getBillingAccountCount returns success and showTransactions gets called.
> This is correct.  The problem is that the billingAccountId I stuffed in
> getBillingAccountCount is not available to the bash script associated with
> showTransactions.  And yes, this is all based on plainolde widgets.   I
> tried the following:
>
>            request.setAttribute("billingAccountId", billingAccountId);
>
> and for the service
>
>            context.put("billingAccountId", billingAccountId);
>
>
>
> Neither results in the bash script loaded by showTransactions having the
> billingAccountId available.
>
> To answer Scott, yes, I could take this cheating way out because I do have
> the customerId, but this was an excercise as well as the solution to a
> single problem.  I have other needs for a technique like this.  For
> example,
> the customer could enter a partial customer name or billingAccountId and I
> could still show the screen if only one result matched.
>
> The question is, how to get the data I find in getBillingAccountCount into
> the bash script in showTransactions.  I hate to stuff it in the session
> when
> it really belongs in the request.  I don't want to clutter up the session
> object like that.
>
> However, I read this in the Javadocs "Attributes are reset between
> requests".  So I guess that going from getBillingAccountCount to
> showTransactions means that it is a new request even though nothing has
> been
> emitted back to the browser?
>
>
> Skip
>
>
>
> -----Original Message-----
> From: BJ Freeman [mailto:bjfree@free-man.net]
> Sent: Friday, November 16, 2007 7:44 PM
> To: user@ofbiz.apache.org
> Subject: Re: Difficult Question
>
>
> are you using the controller and widgets.
> you can call bsh files from the action and make this one operation.
>
> have you looked at
>     <request-map uri="orderentry">
>         <security https="true" auth="true"/>
>         <event type="java"
> path="org.ofbiz.order.shoppingcart.ShoppingCartEvents"
> invoke="routeOrderEntry"/>
>         <response name="init" type="view" value="checkinits"/>
>         <response name="agreements" type="view" value="orderagreements"/>
>         <response name="cart" type="view" value="showcart"/>
>         <response name="error" type="view" value="checkinits"/>
>     </request-map>
>
>
>
>
>
> skip@thedevers sent the following on 11/16/2007 7:06 PM:
> > I have fooled with this all day now and I bet there is someone out there
> who
> > knows exactly how to do this.
> >
> > I have a URL, showTransactions that is normally called like this:
> >
> > .../showTransactions?billingAccountId=xyz
> >
> > I have another url;
> >
> > .../findTransactions
> >
> > The user gets dispatched to .../findTransactions and enters a partyId is
> > present with a list of billingAccounts for a customer and they click on
> the
> > billing account and off they go they go to
> > .../showTransactions?billingAccountId=xyz
> >
> > What I want to do is if there is only one billing account, I don't want
> them
> > to have to click the link.  I want to take them right there.  So, I
> tried
> > writing both a service and a servlet like this:
> >
> >     public static Map getBillingAccountCount(DispatchContext dctx, Map
> > context) {
> >
> > and
> >
> >     public static String getBillingAccountCount(HttpServletRequest
> request,
> > HttpServletResponse response) {
> >
> > In the first, I stuffed the billingAccountId in the context.  In the
> second,
> > I stuffed it in an attribute (there is, unfortunately, no setParameter
> which
> > is exactly what I wanted).
> >
> > Here is a sample of the dispatcher:
> >
> >     <request-map uri="findTransactions">
> >         <security https="true" auth="true"/>
> >    <!--     <event type="service" invoke="getBillingAccountCount"/> -->
> >         <event type="java"
> > path="org.ofbiz.accounting.ar.BillingAccountWorker"
> > invoke="getBillingAccountCount"/>
> >         <response name="fail" type="view" value="findTransactions"/>
> >         <response name="success" type="view" value="showTransactions"/>
> >     </request-map>
> >
> > When the bash script gets called for showTransactions using either
> method,
> > billingAccountId is not there.
> >
> > Anyone have any ideas on how to do this redirection and add parameters
> to
> > the request or context?  I can do this with a servlet and filters, but I
> > don't understand how Ofbiz handles all that.
> >
> > Skip
> >
> >
> >
> >
>
>


Re: Difficult Question

Posted by Scott Gray <le...@gmail.com>.
request.setAttribute works I just tried it.

Regards
Scott

On 17/11/2007, skip@thedevers <sk...@thedevers.org> wrote:
>
> Thanks to all who replied on this, but I guess I didn't explain it
> well.  I
> have no problem dispatching to one URL or the other, I can return any
> response I want.  The problem is this:
>
>      <request-map uri="findTransactions">
>          <security https="true" auth="true"/>
>     <!--     <event type="service" invoke="getBillingAccountCount"/> -->
>          <event type="java"
> path="org.ofbiz.accounting.ar.BillingAccountWorker"
> invoke="getBillingAccountCount"/>
>          <response name="fail" type="view" value="findTransactions"/>
>          <response name="success" type="view" value="showTransactions"/>
>      </request-map>
>
> On pass one through this findTransactions, fail is returned because there
> are no entries (no customer or billing account entered) and
> findTransactions
> gets called.  This is correct.  On pass two, the user has entered either a
> customerId or a billingAccountId.  If there is only one,
> getBillingAccountCount returns success and showTransactions gets called.
> This is correct.  The problem is that the billingAccountId I stuffed in
> getBillingAccountCount is not available to the bash script associated with
> showTransactions.  And yes, this is all based on plainolde widgets.   I
> tried the following:
>
>            request.setAttribute("billingAccountId", billingAccountId);
>
> and for the service
>
>            context.put("billingAccountId", billingAccountId);
>
>
>
> Neither results in the bash script loaded by showTransactions having the
> billingAccountId available.
>
> To answer Scott, yes, I could take this cheating way out because I do have
> the customerId, but this was an excercise as well as the solution to a
> single problem.  I have other needs for a technique like this.  For
> example,
> the customer could enter a partial customer name or billingAccountId and I
> could still show the screen if only one result matched.
>
> The question is, how to get the data I find in getBillingAccountCount into
> the bash script in showTransactions.  I hate to stuff it in the session
> when
> it really belongs in the request.  I don't want to clutter up the session
> object like that.
>
> However, I read this in the Javadocs "Attributes are reset between
> requests".  So I guess that going from getBillingAccountCount to
> showTransactions means that it is a new request even though nothing has
> been
> emitted back to the browser?
>
>
> Skip
>
>
>
> -----Original Message-----
> From: BJ Freeman [mailto:bjfree@free-man.net]
> Sent: Friday, November 16, 2007 7:44 PM
> To: user@ofbiz.apache.org
> Subject: Re: Difficult Question
>
>
> are you using the controller and widgets.
> you can call bsh files from the action and make this one operation.
>
> have you looked at
>     <request-map uri="orderentry">
>         <security https="true" auth="true"/>
>         <event type="java"
> path="org.ofbiz.order.shoppingcart.ShoppingCartEvents"
> invoke="routeOrderEntry"/>
>         <response name="init" type="view" value="checkinits"/>
>         <response name="agreements" type="view" value="orderagreements"/>
>         <response name="cart" type="view" value="showcart"/>
>         <response name="error" type="view" value="checkinits"/>
>     </request-map>
>
>
>
>
>
> skip@thedevers sent the following on 11/16/2007 7:06 PM:
> > I have fooled with this all day now and I bet there is someone out there
> who
> > knows exactly how to do this.
> >
> > I have a URL, showTransactions that is normally called like this:
> >
> > .../showTransactions?billingAccountId=xyz
> >
> > I have another url;
> >
> > .../findTransactions
> >
> > The user gets dispatched to .../findTransactions and enters a partyId is
> > present with a list of billingAccounts for a customer and they click on
> the
> > billing account and off they go they go to
> > .../showTransactions?billingAccountId=xyz
> >
> > What I want to do is if there is only one billing account, I don't want
> them
> > to have to click the link.  I want to take them right there.  So, I
> tried
> > writing both a service and a servlet like this:
> >
> >     public static Map getBillingAccountCount(DispatchContext dctx, Map
> > context) {
> >
> > and
> >
> >     public static String getBillingAccountCount(HttpServletRequest
> request,
> > HttpServletResponse response) {
> >
> > In the first, I stuffed the billingAccountId in the context.  In the
> second,
> > I stuffed it in an attribute (there is, unfortunately, no setParameter
> which
> > is exactly what I wanted).
> >
> > Here is a sample of the dispatcher:
> >
> >     <request-map uri="findTransactions">
> >         <security https="true" auth="true"/>
> >    <!--     <event type="service" invoke="getBillingAccountCount"/> -->
> >         <event type="java"
> > path="org.ofbiz.accounting.ar.BillingAccountWorker"
> > invoke="getBillingAccountCount"/>
> >         <response name="fail" type="view" value="findTransactions"/>
> >         <response name="success" type="view" value="showTransactions"/>
> >     </request-map>
> >
> > When the bash script gets called for showTransactions using either
> method,
> > billingAccountId is not there.
> >
> > Anyone have any ideas on how to do this redirection and add parameters
> to
> > the request or context?  I can do this with a servlet and filters, but I
> > don't understand how Ofbiz handles all that.
> >
> > Skip
> >
> >
> >
> >
>
>

RE: Difficult Question

Posted by "skip@thedevers" <sk...@thedevers.org>.
Thanks to all who replied on this, but I guess I didn't explain it well.  I
have no problem dispatching to one URL or the other, I can return any
response I want.  The problem is this:

     <request-map uri="findTransactions">
         <security https="true" auth="true"/>
    <!--     <event type="service" invoke="getBillingAccountCount"/> -->
         <event type="java"
path="org.ofbiz.accounting.ar.BillingAccountWorker"
invoke="getBillingAccountCount"/>
         <response name="fail" type="view" value="findTransactions"/>
         <response name="success" type="view" value="showTransactions"/>
     </request-map>

On pass one through this findTransactions, fail is returned because there
are no entries (no customer or billing account entered) and findTransactions
gets called.  This is correct.  On pass two, the user has entered either a
customerId or a billingAccountId.  If there is only one,
getBillingAccountCount returns success and showTransactions gets called.
This is correct.  The problem is that the billingAccountId I stuffed in
getBillingAccountCount is not available to the bash script associated with
showTransactions.  And yes, this is all based on plainolde widgets.   I
tried the following:

           request.setAttribute("billingAccountId", billingAccountId);

and for the service

           context.put("billingAccountId", billingAccountId);



Neither results in the bash script loaded by showTransactions having the
billingAccountId available.

To answer Scott, yes, I could take this cheating way out because I do have
the customerId, but this was an excercise as well as the solution to a
single problem.  I have other needs for a technique like this.  For example,
the customer could enter a partial customer name or billingAccountId and I
could still show the screen if only one result matched.

The question is, how to get the data I find in getBillingAccountCount into
the bash script in showTransactions.  I hate to stuff it in the session when
it really belongs in the request.  I don't want to clutter up the session
object like that.

However, I read this in the Javadocs "Attributes are reset between
requests".  So I guess that going from getBillingAccountCount to
showTransactions means that it is a new request even though nothing has been
emitted back to the browser?


Skip



-----Original Message-----
From: BJ Freeman [mailto:bjfree@free-man.net]
Sent: Friday, November 16, 2007 7:44 PM
To: user@ofbiz.apache.org
Subject: Re: Difficult Question


are you using the controller and widgets.
you can call bsh files from the action and make this one operation.

have you looked at
    <request-map uri="orderentry">
        <security https="true" auth="true"/>
        <event type="java"
path="org.ofbiz.order.shoppingcart.ShoppingCartEvents"
invoke="routeOrderEntry"/>
        <response name="init" type="view" value="checkinits"/>
        <response name="agreements" type="view" value="orderagreements"/>
        <response name="cart" type="view" value="showcart"/>
        <response name="error" type="view" value="checkinits"/>
    </request-map>





skip@thedevers sent the following on 11/16/2007 7:06 PM:
> I have fooled with this all day now and I bet there is someone out there
who
> knows exactly how to do this.
>
> I have a URL, showTransactions that is normally called like this:
>
> .../showTransactions?billingAccountId=xyz
>
> I have another url;
>
> .../findTransactions
>
> The user gets dispatched to .../findTransactions and enters a partyId is
> present with a list of billingAccounts for a customer and they click on
the
> billing account and off they go they go to
> .../showTransactions?billingAccountId=xyz
>
> What I want to do is if there is only one billing account, I don't want
them
> to have to click the link.  I want to take them right there.  So, I tried
> writing both a service and a servlet like this:
>
>     public static Map getBillingAccountCount(DispatchContext dctx, Map
> context) {
>
> and
>
>     public static String getBillingAccountCount(HttpServletRequest
request,
> HttpServletResponse response) {
>
> In the first, I stuffed the billingAccountId in the context.  In the
second,
> I stuffed it in an attribute (there is, unfortunately, no setParameter
which
> is exactly what I wanted).
>
> Here is a sample of the dispatcher:
>
>     <request-map uri="findTransactions">
>         <security https="true" auth="true"/>
>    <!--     <event type="service" invoke="getBillingAccountCount"/> -->
>         <event type="java"
> path="org.ofbiz.accounting.ar.BillingAccountWorker"
> invoke="getBillingAccountCount"/>
>         <response name="fail" type="view" value="findTransactions"/>
>         <response name="success" type="view" value="showTransactions"/>
>     </request-map>
>
> When the bash script gets called for showTransactions using either method,
> billingAccountId is not there.
>
> Anyone have any ideas on how to do this redirection and add parameters to
> the request or context?  I can do this with a servlet and filters, but I
> don't understand how Ofbiz handles all that.
>
> Skip
>
>
>
>


Re: Difficult Question

Posted by BJ Freeman <bj...@free-man.net>.
are you using the controller and widgets.
you can call bsh files from the action and make this one operation.

have you looked at
    <request-map uri="orderentry">
        <security https="true" auth="true"/>
        <event type="java"
path="org.ofbiz.order.shoppingcart.ShoppingCartEvents"
invoke="routeOrderEntry"/>
        <response name="init" type="view" value="checkinits"/>
        <response name="agreements" type="view" value="orderagreements"/>
        <response name="cart" type="view" value="showcart"/>
        <response name="error" type="view" value="checkinits"/>
    </request-map>





skip@thedevers sent the following on 11/16/2007 7:06 PM:
> I have fooled with this all day now and I bet there is someone out there who
> knows exactly how to do this.
> 
> I have a URL, showTransactions that is normally called like this:
> 
> .../showTransactions?billingAccountId=xyz
> 
> I have another url;
> 
> .../findTransactions
> 
> The user gets dispatched to .../findTransactions and enters a partyId is
> present with a list of billingAccounts for a customer and they click on the
> billing account and off they go they go to
> .../showTransactions?billingAccountId=xyz
> 
> What I want to do is if there is only one billing account, I don't want them
> to have to click the link.  I want to take them right there.  So, I tried
> writing both a service and a servlet like this:
> 
>     public static Map getBillingAccountCount(DispatchContext dctx, Map
> context) {
> 
> and
> 
>     public static String getBillingAccountCount(HttpServletRequest request,
> HttpServletResponse response) {
> 
> In the first, I stuffed the billingAccountId in the context.  In the second,
> I stuffed it in an attribute (there is, unfortunately, no setParameter which
> is exactly what I wanted).
> 
> Here is a sample of the dispatcher:
> 
>     <request-map uri="findTransactions">
>         <security https="true" auth="true"/>
>    <!--     <event type="service" invoke="getBillingAccountCount"/> -->
>         <event type="java"
> path="org.ofbiz.accounting.ar.BillingAccountWorker"
> invoke="getBillingAccountCount"/>
>         <response name="fail" type="view" value="findTransactions"/>
>         <response name="success" type="view" value="showTransactions"/>
>     </request-map>
> 
> When the bash script gets called for showTransactions using either method,
> billingAccountId is not there.
> 
> Anyone have any ideas on how to do this redirection and add parameters to
> the request or context?  I can do this with a servlet and filters, but I
> don't understand how Ofbiz handles all that.
> 
> Skip
> 
> 
> 
> 

Re: Difficult Question

Posted by Jonathon -- Improov <jo...@improov.com>.
Not too difficult.

In your controller.xml and in the "findTransaction" request map, have 2 "success" responses, 1 
named "success" and the other named "onlyOne". In the <event>, do your finding of transactions, 
and redirect to the proper response path depending on whether there is only one transaction found 
or not.

Jonathon

skip@thedevers wrote:
> I have fooled with this all day now and I bet there is someone out there who
> knows exactly how to do this.
> 
> I have a URL, showTransactions that is normally called like this:
> 
> .../showTransactions?billingAccountId=xyz
> 
> I have another url;
> 
> .../findTransactions
> 
> The user gets dispatched to .../findTransactions and enters a partyId is
> present with a list of billingAccounts for a customer and they click on the
> billing account and off they go they go to
> .../showTransactions?billingAccountId=xyz
> 
> What I want to do is if there is only one billing account, I don't want them
> to have to click the link.  I want to take them right there.  So, I tried
> writing both a service and a servlet like this:
> 
>     public static Map getBillingAccountCount(DispatchContext dctx, Map
> context) {
> 
> and
> 
>     public static String getBillingAccountCount(HttpServletRequest request,
> HttpServletResponse response) {
> 
> In the first, I stuffed the billingAccountId in the context.  In the second,
> I stuffed it in an attribute (there is, unfortunately, no setParameter which
> is exactly what I wanted).
> 
> Here is a sample of the dispatcher:
> 
>     <request-map uri="findTransactions">
>         <security https="true" auth="true"/>
>    <!--     <event type="service" invoke="getBillingAccountCount"/> -->
>         <event type="java"
> path="org.ofbiz.accounting.ar.BillingAccountWorker"
> invoke="getBillingAccountCount"/>
>         <response name="fail" type="view" value="findTransactions"/>
>         <response name="success" type="view" value="showTransactions"/>
>     </request-map>
> 
> When the bash script gets called for showTransactions using either method,
> billingAccountId is not there.
> 
> Anyone have any ideas on how to do this redirection and add parameters to
> the request or context?  I can do this with a servlet and filters, but I
> don't understand how Ofbiz handles all that.
> 
> Skip
> 
> 


Difficult Question

Posted by "skip@thedevers" <sk...@thedevers.org>.
I have fooled with this all day now and I bet there is someone out there who
knows exactly how to do this.

I have a URL, showTransactions that is normally called like this:

.../showTransactions?billingAccountId=xyz

I have another url;

.../findTransactions

The user gets dispatched to .../findTransactions and enters a partyId is
present with a list of billingAccounts for a customer and they click on the
billing account and off they go they go to
.../showTransactions?billingAccountId=xyz

What I want to do is if there is only one billing account, I don't want them
to have to click the link.  I want to take them right there.  So, I tried
writing both a service and a servlet like this:

    public static Map getBillingAccountCount(DispatchContext dctx, Map
context) {

and

    public static String getBillingAccountCount(HttpServletRequest request,
HttpServletResponse response) {

In the first, I stuffed the billingAccountId in the context.  In the second,
I stuffed it in an attribute (there is, unfortunately, no setParameter which
is exactly what I wanted).

Here is a sample of the dispatcher:

    <request-map uri="findTransactions">
        <security https="true" auth="true"/>
   <!--     <event type="service" invoke="getBillingAccountCount"/> -->
        <event type="java"
path="org.ofbiz.accounting.ar.BillingAccountWorker"
invoke="getBillingAccountCount"/>
        <response name="fail" type="view" value="findTransactions"/>
        <response name="success" type="view" value="showTransactions"/>
    </request-map>

When the bash script gets called for showTransactions using either method,
billingAccountId is not there.

Anyone have any ideas on how to do this redirection and add parameters to
the request or context?  I can do this with a servlet and filters, but I
don't understand how Ofbiz handles all that.

Skip


RE: Widgets, Forms, Containers, etc

Posted by "skip@thedevers" <sk...@thedevers.org>.
Thanks BJ, I already looked at all these, guess I'll have to follow in your
footsteps and slog throught it.

Skip

-----Original Message-----
From: BJ Freeman [mailto:bjfree@free-man.net]
Sent: Saturday, November 24, 2007 5:49 PM
To: user@ofbiz.apache.org
Subject: Re: Widgets, Forms, Containers, etc


http://www.opensourcestrategies.com/ofbiz/tutorials.php
but I just dug thru the code.
also using a xml editor that reads the schema helps.


skip@thedevers sent the following on 11/24/2007 5:40 PM:
> Is there any good documentatin of what these tags represent?
>
> I looked at :
> http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
>
> Which was great, but died right when it was getting into the meat of the
> question.  Are there any similiar documents?
>
> I did a search on the Wiki for "widget" but found nothing good but the
> above.  I found a "cookbook" on the opentaps site but it was answering
> questions that were to advanced for me.
>
> Anybody know of anything else?
>
>
>
>
>


Re: Widgets, Forms, Containers, etc

Posted by David E Jones <jo...@hotwaxmedia.com>.
Or just use the existing stuff, starting here (and buy the complete  
version if needed/desired):

http://docs.ofbiz.org/display/OFBTECH/Framework+Introduction+Videos+and+Diagrams

Of course, it would be great to see free documentation for all of  
this, but so far no one has really taken that on (a month without pay  
to create such a thing isn't easy I suppose...).

-David


On Nov 25, 2007, at 8:32 PM, Jonathon -- Improov wrote:

> Coming soon, soon. :)
>
> I'm currently ripping through the framework codes to write docs for  
> framework usage and behavior. Quirks and all.
>
> Jonathon
>
> skip@thedevers wrote:
>> Well Jonathon, here a topic ripe for the author just breaking to  
>> get out.
>> BTW, the author of the mention document,  Torsten Schlabach, is a  
>> great
>> technical writer.  Even with only three hours sleep, I read the  
>> thing twice
>> and got something out of it in spite of my fog shrouded neurons.
>> Skip
>> -----Original Message-----
>> From: BJ Freeman [mailto:bjfree@free-man.net]
>> Sent: Saturday, November 24, 2007 5:49 PM
>> To: user@ofbiz.apache.org
>> Subject: Re: Widgets, Forms, Containers, etc
>> http://www.opensourcestrategies.com/ofbiz/tutorials.php
>> but I just dug thru the code.
>> also using a xml editor that reads the schema helps.
>> skip@thedevers sent the following on 11/24/2007 5:40 PM:
>>> Is there any good documentatin of what these tags represent?
>>>
>>> I looked at :
>>> http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
>>>
>>> Which was great, but died right when it was getting into the meat  
>>> of the
>>> question.  Are there any similiar documents?
>>>
>>> I did a search on the Wiki for "widget" but found nothing good but  
>>> the
>>> above.  I found a "cookbook" on the opentaps site but it was  
>>> answering
>>> questions that were to advanced for me.
>>>
>>> Anybody know of anything else?
>>>
>>>
>>>
>>>
>>>
>


RE: Widgets, Forms, Containers, etc

Posted by "skip@thedevers" <sk...@thedevers.org>.
Lol "I'm facilitating the efficient exercise of your smarts."

Gotta remember that.

Skip

-----Original Message-----
From: Jonathon -- Improov [mailto:jonw@improov.com]
Sent: Sunday, November 25, 2007 8:00 PM
To: user@ofbiz.apache.org
Subject: Re: Widgets, Forms, Containers, etc


Ok, boss, will let you know when it's ready (in a couple of months or
earlier).

As is usually the fate of me, I don't own this documentation. I'm seldom the
boss. Maybe if I get
dumber, I can be promoted, and can tell my former bosses "I'm the boss of
you now, because you're
smarter than me!". Heh. Kidding. Busy and stressed now.

Why do bosses always expect me to be smarter than them and yet serve them?
No, they tell me
they're serving me. "I'm facilitating the efficient exercise of your
smarts." Right.

Jonathon

skip@thedevers wrote:
> I'd be happy to buy the first copy!  Count me in for a paid subscription.
>
>
>
> -----Original Message-----
> From: Jonathon -- Improov [mailto:jonw@improov.com]
> Sent: Sunday, November 25, 2007 7:32 PM
> To: user@ofbiz.apache.org
> Subject: Re: Widgets, Forms, Containers, etc
>
>
> Coming soon, soon. :)
>
> I'm currently ripping through the framework codes to write docs for
> framework usage and behavior.
> Quirks and all.
>
> Jonathon
>
> skip@thedevers wrote:
>> Well Jonathon, here a topic ripe for the author just breaking to get out.
>>
>> BTW, the author of the mention document,  Torsten Schlabach, is a great
>> technical writer.  Even with only three hours sleep, I read the thing
> twice
>> and got something out of it in spite of my fog shrouded neurons.
>>
>> Skip
>>
>> -----Original Message-----
>> From: BJ Freeman [mailto:bjfree@free-man.net]
>> Sent: Saturday, November 24, 2007 5:49 PM
>> To: user@ofbiz.apache.org
>> Subject: Re: Widgets, Forms, Containers, etc
>>
>>
>> http://www.opensourcestrategies.com/ofbiz/tutorials.php
>> but I just dug thru the code.
>> also using a xml editor that reads the schema helps.
>>
>>
>> skip@thedevers sent the following on 11/24/2007 5:40 PM:
>>> Is there any good documentatin of what these tags represent?
>>>
>>> I looked at :
>>>
> http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
>>> Which was great, but died right when it was getting into the meat of the
>>> question.  Are there any similiar documents?
>>>
>>> I did a search on the Wiki for "widget" but found nothing good but the
>>> above.  I found a "cookbook" on the opentaps site but it was answering
>>> questions that were to advanced for me.
>>>
>>> Anybody know of anything else?
>>>
>>>
>>>
>>>
>>>
>>
>
>
>



Re: Widgets, Forms, Containers, etc

Posted by Jonathon -- Improov <jo...@improov.com>.
Ok, boss, will let you know when it's ready (in a couple of months or earlier).

As is usually the fate of me, I don't own this documentation. I'm seldom the boss. Maybe if I get 
dumber, I can be promoted, and can tell my former bosses "I'm the boss of you now, because you're 
smarter than me!". Heh. Kidding. Busy and stressed now.

Why do bosses always expect me to be smarter than them and yet serve them? No, they tell me 
they're serving me. "I'm facilitating the efficient exercise of your smarts." Right.

Jonathon

skip@thedevers wrote:
> I'd be happy to buy the first copy!  Count me in for a paid subscription.
> 
> 
> 
> -----Original Message-----
> From: Jonathon -- Improov [mailto:jonw@improov.com]
> Sent: Sunday, November 25, 2007 7:32 PM
> To: user@ofbiz.apache.org
> Subject: Re: Widgets, Forms, Containers, etc
> 
> 
> Coming soon, soon. :)
> 
> I'm currently ripping through the framework codes to write docs for
> framework usage and behavior.
> Quirks and all.
> 
> Jonathon
> 
> skip@thedevers wrote:
>> Well Jonathon, here a topic ripe for the author just breaking to get out.
>>
>> BTW, the author of the mention document,  Torsten Schlabach, is a great
>> technical writer.  Even with only three hours sleep, I read the thing
> twice
>> and got something out of it in spite of my fog shrouded neurons.
>>
>> Skip
>>
>> -----Original Message-----
>> From: BJ Freeman [mailto:bjfree@free-man.net]
>> Sent: Saturday, November 24, 2007 5:49 PM
>> To: user@ofbiz.apache.org
>> Subject: Re: Widgets, Forms, Containers, etc
>>
>>
>> http://www.opensourcestrategies.com/ofbiz/tutorials.php
>> but I just dug thru the code.
>> also using a xml editor that reads the schema helps.
>>
>>
>> skip@thedevers sent the following on 11/24/2007 5:40 PM:
>>> Is there any good documentatin of what these tags represent?
>>>
>>> I looked at :
>>>
> http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
>>> Which was great, but died right when it was getting into the meat of the
>>> question.  Are there any similiar documents?
>>>
>>> I did a search on the Wiki for "widget" but found nothing good but the
>>> above.  I found a "cookbook" on the opentaps site but it was answering
>>> questions that were to advanced for me.
>>>
>>> Anybody know of anything else?
>>>
>>>
>>>
>>>
>>>
>>
> 
> 
> 


RE: Widgets, Forms, Containers, etc

Posted by "skip@thedevers" <sk...@thedevers.org>.
I'd be happy to buy the first copy!  Count me in for a paid subscription.



-----Original Message-----
From: Jonathon -- Improov [mailto:jonw@improov.com]
Sent: Sunday, November 25, 2007 7:32 PM
To: user@ofbiz.apache.org
Subject: Re: Widgets, Forms, Containers, etc


Coming soon, soon. :)

I'm currently ripping through the framework codes to write docs for
framework usage and behavior.
Quirks and all.

Jonathon

skip@thedevers wrote:
> Well Jonathon, here a topic ripe for the author just breaking to get out.
>
> BTW, the author of the mention document,  Torsten Schlabach, is a great
> technical writer.  Even with only three hours sleep, I read the thing
twice
> and got something out of it in spite of my fog shrouded neurons.
>
> Skip
>
> -----Original Message-----
> From: BJ Freeman [mailto:bjfree@free-man.net]
> Sent: Saturday, November 24, 2007 5:49 PM
> To: user@ofbiz.apache.org
> Subject: Re: Widgets, Forms, Containers, etc
>
>
> http://www.opensourcestrategies.com/ofbiz/tutorials.php
> but I just dug thru the code.
> also using a xml editor that reads the schema helps.
>
>
> skip@thedevers sent the following on 11/24/2007 5:40 PM:
>> Is there any good documentatin of what these tags represent?
>>
>> I looked at :
>>
http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
>>
>> Which was great, but died right when it was getting into the meat of the
>> question.  Are there any similiar documents?
>>
>> I did a search on the Wiki for "widget" but found nothing good but the
>> above.  I found a "cookbook" on the opentaps site but it was answering
>> questions that were to advanced for me.
>>
>> Anybody know of anything else?
>>
>>
>>
>>
>>
>
>



Re: Widgets, Forms, Containers, etc

Posted by Jonathon -- Improov <jo...@improov.com>.
Coming soon, soon. :)

I'm currently ripping through the framework codes to write docs for framework usage and behavior. 
Quirks and all.

Jonathon

skip@thedevers wrote:
> Well Jonathon, here a topic ripe for the author just breaking to get out.
> 
> BTW, the author of the mention document,  Torsten Schlabach, is a great
> technical writer.  Even with only three hours sleep, I read the thing twice
> and got something out of it in spite of my fog shrouded neurons.
> 
> Skip
> 
> -----Original Message-----
> From: BJ Freeman [mailto:bjfree@free-man.net]
> Sent: Saturday, November 24, 2007 5:49 PM
> To: user@ofbiz.apache.org
> Subject: Re: Widgets, Forms, Containers, etc
> 
> 
> http://www.opensourcestrategies.com/ofbiz/tutorials.php
> but I just dug thru the code.
> also using a xml editor that reads the schema helps.
> 
> 
> skip@thedevers sent the following on 11/24/2007 5:40 PM:
>> Is there any good documentatin of what these tags represent?
>>
>> I looked at :
>> http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
>>
>> Which was great, but died right when it was getting into the meat of the
>> question.  Are there any similiar documents?
>>
>> I did a search on the Wiki for "widget" but found nothing good but the
>> above.  I found a "cookbook" on the opentaps site but it was answering
>> questions that were to advanced for me.
>>
>> Anybody know of anything else?
>>
>>
>>
>>
>>
> 
> 


RE: Widgets, Forms, Containers, etc

Posted by "skip@thedevers" <sk...@thedevers.org>.
Well Jonathon, here a topic ripe for the author just breaking to get out.

BTW, the author of the mention document,  Torsten Schlabach, is a great
technical writer.  Even with only three hours sleep, I read the thing twice
and got something out of it in spite of my fog shrouded neurons.

Skip

-----Original Message-----
From: BJ Freeman [mailto:bjfree@free-man.net]
Sent: Saturday, November 24, 2007 5:49 PM
To: user@ofbiz.apache.org
Subject: Re: Widgets, Forms, Containers, etc


http://www.opensourcestrategies.com/ofbiz/tutorials.php
but I just dug thru the code.
also using a xml editor that reads the schema helps.


skip@thedevers sent the following on 11/24/2007 5:40 PM:
> Is there any good documentatin of what these tags represent?
>
> I looked at :
> http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
>
> Which was great, but died right when it was getting into the meat of the
> question.  Are there any similiar documents?
>
> I did a search on the Wiki for "widget" but found nothing good but the
> above.  I found a "cookbook" on the opentaps site but it was answering
> questions that were to advanced for me.
>
> Anybody know of anything else?
>
>
>
>
>


Re: Widgets, Forms, Containers, etc

Posted by BJ Freeman <bj...@free-man.net>.
http://www.opensourcestrategies.com/ofbiz/tutorials.php
but I just dug thru the code.
also using a xml editor that reads the schema helps.


skip@thedevers sent the following on 11/24/2007 5:40 PM:
> Is there any good documentatin of what these tags represent?
> 
> I looked at :
> http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
> 
> Which was great, but died right when it was getting into the meat of the
> question.  Are there any similiar documents?
> 
> I did a search on the Wiki for "widget" but found nothing good but the
> above.  I found a "cookbook" on the opentaps site but it was answering
> questions that were to advanced for me.
> 
> Anybody know of anything else?
> 
> 
> 
> 
> 

Re: Widgets, Forms, Containers, etc

Posted by David E Jones <jo...@hotwaxmedia.com>.
I'd recommend starting here:

http://docs.ofbiz.org/display/OFBTECH/Framework+Introduction+Videos+and+Diagrams

-David


On Nov 24, 2007, at 6:40 PM, skip@thedevers wrote:

> Is there any good documentatin of what these tags represent?
>
> I looked at :
> http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
>
> Which was great, but died right when it was getting into the meat of  
> the
> question.  Are there any similiar documents?
>
> I did a search on the Wiki for "widget" but found nothing good but the
> above.  I found a "cookbook" on the opentaps site but it was answering
> questions that were to advanced for me.
>
> Anybody know of anything else?
>
>


Widgets, Forms, Containers, etc

Posted by "skip@thedevers" <sk...@thedevers.org>.
Is there any good documentatin of what these tags represent?

I looked at :
http://docs.ofbiz.org/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit

Which was great, but died right when it was getting into the meat of the
question.  Are there any similiar documents?

I did a search on the Wiki for "widget" but found nothing good but the
above.  I found a "cookbook" on the opentaps site but it was answering
questions that were to advanced for me.

Anybody know of anything else?



Re: Unsubscribe

Posted by BJ Freeman <bj...@free-man.net>.
however if the user has closed the account or does not use it.
it will bounce from no such account or mailbox full.
this will handle the accounts that can not be sent from.


David E Jones sent the following on 11/23/2007 6:03 PM:
> 
> Except that junk mail filtered messages are often not bounced... so the
> server would never know, and the user either.
> 
> -David
> 
> 
> On Nov 23, 2007, at 4:20 PM, BJ Freeman wrote:
> 
>> one of the list servers I am on sends out a ping message, something
>> similar to the ezmlm warning on our ml
>> it if bounces it tries one more time then removes the email from the
>> list.
>> this would take care of emails that can not be accessed by the user.
>>
>> Jacques Le Roux sent the following on 11/23/2007 2:24 PM:
>>> Gavin,
>>>
>>> Thanks for suggestion, I added your comment. I'm a moderator of those
>>> lists (or I was since I did not see a message to moderat since
>>> 09/14/07. BTW is that normal, even if I prefer it ? ;o) but I don't
>>> know (or have the rights) to remove Cahn from the list.
>>>
>>> And like David said already many times.Two common problems people run
>>> into:
>>> 1. sending the message from an email address different from the one
>>> subscribed
>>> 2. receiving the reply, but having it caught by a junk mail filter
>>>
>>> BTW I think it would be fair to actualise the content of
>>> http://lists.ofbiz.org/mailman/listinfo
>>>
>>> Jacques
>>>
>>> De : "Gavin Bee" <ga...@gwenandgavin.ca>
>>>> Could an admin please remove cxphan@yahoo.com manually?
>>>>
>>>> In general pointing to the documentation works.  However, in this
>>>> case it
>>>> seems that Cahn is unable to follow the directions on the Mailing Lists
>>>> page.
>>>>
>>>> Additionally, the following explicit instructions could be added to the
>>>> Mailing Lists page ... "To unsubscribe from any of the following
>>>> lists, you
>>>> need to send an empty, subjectless email to unsubscribe address listed
>>>> below.  In other words, click the appropriate unsubscribe link below
>>>> and
>>>> press send."
>>>>
>>>> -----Original Message-----
>>>> From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com]
>>>> Sent: November 23, 2007 9:03 AM
>>>> To: user@ofbiz.apache.org
>>>> Subject: Re: Unsubscribe
>>>>
>>>> De : "Canh Phan" <cx...@yahoo.com>
>>>>> Should there be a way to unsubscribe an email address
>>>>> from the list. It's been requested many times.
>>>>>
>>>>> Thanks.
>>>> http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists
>>>>
>>>
>>>
>>>
>>>
> 

Re: Unsubscribe

Posted by Michael Jensen <mi...@millcreeksys.com>.
I'm not sure what kind of mail list software apache uses on their 
backend, but it sounds like they need to implement a feature equivalent 
to one that mailman has:
----
(Administrivia filter) Check postings and intercept ones that seem to be 
administrative requests? - If you activate this feature Mailman will 
check traffic for administrative requests that have inadvertently been 
sent to the list. This will prevent the classic case of a user sending a 
note to the entire list membership saying "unsubscribe."
----

Mike


David E Jones wrote:
> 
> Except that junk mail filtered messages are often not bounced... so the 
> server would never know, and the user either.
> 
> -David
> 
> 
> On Nov 23, 2007, at 4:20 PM, BJ Freeman wrote:
> 
>> one of the list servers I am on sends out a ping message, something
>> similar to the ezmlm warning on our ml
>> it if bounces it tries one more time then removes the email from the 
>> list.
>> this would take care of emails that can not be accessed by the user.
>>
>> Jacques Le Roux sent the following on 11/23/2007 2:24 PM:
>>> Gavin,
>>>
>>> Thanks for suggestion, I added your comment. I'm a moderator of those 
>>> lists (or I was since I did not see a message to moderat since
>>> 09/14/07. BTW is that normal, even if I prefer it ? ;o) but I don't 
>>> know (or have the rights) to remove Cahn from the list.
>>>
>>> And like David said already many times.Two common problems people run 
>>> into:
>>> 1. sending the message from an email address different from the one 
>>> subscribed
>>> 2. receiving the reply, but having it caught by a junk mail filter
>>>
>>> BTW I think it would be fair to actualise the content of 
>>> http://lists.ofbiz.org/mailman/listinfo
>>>
>>> Jacques
>>>
>>> De : "Gavin Bee" <ga...@gwenandgavin.ca>
>>>> Could an admin please remove cxphan@yahoo.com manually?
>>>>
>>>> In general pointing to the documentation works.  However, in this 
>>>> case it
>>>> seems that Cahn is unable to follow the directions on the Mailing Lists
>>>> page.
>>>>
>>>> Additionally, the following explicit instructions could be added to the
>>>> Mailing Lists page ... "To unsubscribe from any of the following 
>>>> lists, you
>>>> need to send an empty, subjectless email to unsubscribe address listed
>>>> below.  In other words, click the appropriate unsubscribe link below 
>>>> and
>>>> press send."
>>>>
>>>> -----Original Message-----
>>>> From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com]
>>>> Sent: November 23, 2007 9:03 AM
>>>> To: user@ofbiz.apache.org
>>>> Subject: Re: Unsubscribe
>>>>
>>>> De : "Canh Phan" <cx...@yahoo.com>
>>>>> Should there be a way to unsubscribe an email address
>>>>> from the list. It's been requested many times.
>>>>>
>>>>> Thanks.
>>>> http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists
>>>>
>>>
>>>
>>>
>>>
> 

Re: Unsubscribe

Posted by David E Jones <jo...@hotwaxmedia.com>.
Except that junk mail filtered messages are often not bounced... so  
the server would never know, and the user either.

-David


On Nov 23, 2007, at 4:20 PM, BJ Freeman wrote:

> one of the list servers I am on sends out a ping message, something
> similar to the ezmlm warning on our ml
> it if bounces it tries one more time then removes the email from the  
> list.
> this would take care of emails that can not be accessed by the user.
>
> Jacques Le Roux sent the following on 11/23/2007 2:24 PM:
>> Gavin,
>>
>> Thanks for suggestion, I added your comment. I'm a moderator of  
>> those lists (or I was since I did not see a message to moderat since
>> 09/14/07. BTW is that normal, even if I prefer it ? ;o) but I don't  
>> know (or have the rights) to remove Cahn from the list.
>>
>> And like David said already many times.Two common problems people  
>> run into:
>> 1. sending the message from an email address different from the one  
>> subscribed
>> 2. receiving the reply, but having it caught by a junk mail filter
>>
>> BTW I think it would be fair to actualise the content of http://lists.ofbiz.org/mailman/listinfo
>>
>> Jacques
>>
>> De : "Gavin Bee" <ga...@gwenandgavin.ca>
>>> Could an admin please remove cxphan@yahoo.com manually?
>>>
>>> In general pointing to the documentation works.  However, in this  
>>> case it
>>> seems that Cahn is unable to follow the directions on the Mailing  
>>> Lists
>>> page.
>>>
>>> Additionally, the following explicit instructions could be added  
>>> to the
>>> Mailing Lists page ... "To unsubscribe from any of the following  
>>> lists, you
>>> need to send an empty, subjectless email to unsubscribe address  
>>> listed
>>> below.  In other words, click the appropriate unsubscribe link  
>>> below and
>>> press send."
>>>
>>> -----Original Message-----
>>> From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com]
>>> Sent: November 23, 2007 9:03 AM
>>> To: user@ofbiz.apache.org
>>> Subject: Re: Unsubscribe
>>>
>>> De : "Canh Phan" <cx...@yahoo.com>
>>>> Should there be a way to unsubscribe an email address
>>>> from the list. It's been requested many times.
>>>>
>>>> Thanks.
>>> http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists
>>>
>>
>>
>>
>>


Re: Unsubscribe

Posted by BJ Freeman <bj...@free-man.net>.
one of the list servers I am on sends out a ping message, something
similar to the ezmlm warning on our ml
it if bounces it tries one more time then removes the email from the list.
this would take care of emails that can not be accessed by the user.

Jacques Le Roux sent the following on 11/23/2007 2:24 PM:
> Gavin,
> 
> Thanks for suggestion, I added your comment. I'm a moderator of those lists (or I was since I did not see a message to moderat since
> 09/14/07. BTW is that normal, even if I prefer it ? ;o) but I don't know (or have the rights) to remove Cahn from the list.
> 
> And like David said already many times.Two common problems people run into:
> 1. sending the message from an email address different from the one subscribed
> 2. receiving the reply, but having it caught by a junk mail filter
> 
> BTW I think it would be fair to actualise the content of http://lists.ofbiz.org/mailman/listinfo
> 
> Jacques
> 
> De : "Gavin Bee" <ga...@gwenandgavin.ca>
>> Could an admin please remove cxphan@yahoo.com manually?
>>
>> In general pointing to the documentation works.  However, in this case it
>> seems that Cahn is unable to follow the directions on the Mailing Lists
>> page.
>>
>> Additionally, the following explicit instructions could be added to the
>> Mailing Lists page ... "To unsubscribe from any of the following lists, you
>> need to send an empty, subjectless email to unsubscribe address listed
>> below.  In other words, click the appropriate unsubscribe link below and
>> press send."
>>
>> -----Original Message-----
>> From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com]
>> Sent: November 23, 2007 9:03 AM
>> To: user@ofbiz.apache.org
>> Subject: Re: Unsubscribe
>>
>> De : "Canh Phan" <cx...@yahoo.com>
>>> Should there be a way to unsubscribe an email address
>>> from the list. It's been requested many times.
>>>
>>> Thanks.
>> http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists
>>
> 
> 
> 
> 

Re: Unsubscribe

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

Thanks for suggestion, I added your comment. I'm a moderator of those lists (or I was since I did not see a message to moderat since
09/14/07. BTW is that normal, even if I prefer it ? ;o) but I don't know (or have the rights) to remove Cahn from the list.

And like David said already many times.Two common problems people run into:
1. sending the message from an email address different from the one subscribed
2. receiving the reply, but having it caught by a junk mail filter

BTW I think it would be fair to actualise the content of http://lists.ofbiz.org/mailman/listinfo

Jacques

De : "Gavin Bee" <ga...@gwenandgavin.ca>
> Could an admin please remove cxphan@yahoo.com manually?
>
> In general pointing to the documentation works.  However, in this case it
> seems that Cahn is unable to follow the directions on the Mailing Lists
> page.
>
> Additionally, the following explicit instructions could be added to the
> Mailing Lists page ... "To unsubscribe from any of the following lists, you
> need to send an empty, subjectless email to unsubscribe address listed
> below.  In other words, click the appropriate unsubscribe link below and
> press send."
>
> -----Original Message-----
> From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com]
> Sent: November 23, 2007 9:03 AM
> To: user@ofbiz.apache.org
> Subject: Re: Unsubscribe
>
> De : "Canh Phan" <cx...@yahoo.com>
> > Should there be a way to unsubscribe an email address
> > from the list. It's been requested many times.
> >
> > Thanks.
>
> http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists
>


RE: Unsubscribe

Posted by Gavin Bee <ga...@gwenandgavin.ca>.
Could an admin please remove cxphan@yahoo.com manually?

In general pointing to the documentation works.  However, in this case it
seems that Cahn is unable to follow the directions on the Mailing Lists
page.

Additionally, the following explicit instructions could be added to the
Mailing Lists page ... "To unsubscribe from any of the following lists, you
need to send an empty, subjectless email to unsubscribe address listed
below.  In other words, click the appropriate unsubscribe link below and
press send."

-----Original Message-----
From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com] 
Sent: November 23, 2007 9:03 AM
To: user@ofbiz.apache.org
Subject: Re: Unsubscribe

De : "Canh Phan" <cx...@yahoo.com>
> Should there be a way to unsubscribe an email address
> from the list. It's been requested many times. 
> 
> Thanks.

http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists


Re: Unsubscribe

Posted by Jacques Le Roux <ja...@les7arts.com>.
De : "Canh Phan" <cx...@yahoo.com>
> Should there be a way to unsubscribe an email address
> from the list. It's been requested many times. 
> 
> Thanks.

http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists

Re: Unsubscribe

Posted by Canh Phan <cx...@yahoo.com>.
--- Canh Phan <cx...@yahoo.com> wrote:

> Should there be a way to unsubscribe an email
> address
> from the list. It's been requested many times. 
> 
> Thanks.
>  
> 
> 
>      
>
____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page. 
> http://www.yahoo.com/r/hs
> 



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Unsubscribe

Posted by Canh Phan <cx...@yahoo.com>.
Should there be a way to unsubscribe an email address
from the list. It's been requested many times. 

Thanks.
 


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

BigDecmial vs Double

Posted by "skip@thedevers" <sk...@thedevers.org>.
My code is doing lots of conversions between BigDecimal to Double for
GenericValue.put() on "currency-amount" fields.

Can I just put() the BigDecimal instead?

I know I can test this pretty quick, but I am betting someone knows what is
the most efficient way.

Skip


Re: SQL help needed

Posted by Jonathon -- Improov <jo...@improov.com>.
Walter,

SQL cross-products are quite simple, actually, although not immediately obvious to start with.

Consider that every join you make is for a specific purpose.

Here's a quick contrived example, for illustration only, not congruent with OFBiz entities.

Say you join "Party.employees" to "Party", you'll name that join Employees. Your join will look like:

"Party P INNER JOIN Party P_EMPLOYEES USING employees". You'll have named your join "P_EMPLOYEES".

Say you then join "Party.relatives" to "Party", you'll name that join Relatives.

In that way, all fields in P will be the person's particulars. Fields in P_EMPLOYEES will be an 
employee's particulars. And P_RELATIVES will be a relative's particulars. Yes, a single P row can 
be listed several times, especially when that paticular person has more than 1 employee or 
relative. That's how a cross-product looks like, the bread and butter of RDBMS.

It's as simple as that! I used a single table "Party" multiple times, so that it's a more complex 
example that clearly illustrates the concept of "join purposes".

As for translating that into DynamicViewEntity or <view-entity>, that's a whole tutorial 
altogether (tired now :P).

Note that "conditional joins" (beyond the key-to-key links) is not possible in OFBiz yet. I raised 
this issue for possible enhancement some time back, and someone actually submitted a patch. Not 
sure if that got committed.

Jonathhon

Walter Vaughan wrote:
> Okay, I'll admit my SQL skill are pre-newbie, but I'm kinda at a loss.
> 
> I'm trying to build some reports, and I am begging for some direction.
> The following query works, but I need to add more columns...
> 
> SELECT
>      "party_group"."group_name" AS "Company_Name"
>      max("party_classification"."party_classification_group_id") as 
> "Discount Type",
>      sum("order_item"."unit_price")as "Discounted Amount",
>      sum("order_item"."unit_list_price")as "Retail Amount",
>      count( distinct "order_header"."order_id")as "Number Of Orders"
> FROM
>      "party" INNER JOIN "party_classification" ON "party"."party_id" = 
> "party_classification"."party_id"
>      INNER JOIN "order_header" ON "party"."party_id" = 
> "order_header"."bill_to_party_id"
>      INNER JOIN "party_group" ON "party"."party_id" = 
> "party_group"."party_id"
>      INNER JOIN "order_item" ON "order_header"."order_id" = 
> "order_item"."order_id"
> WHERE
>      party_classification_group_id LIKE 'DEALER%'
>  AND "order_item"."status_id" = 'ITEM_COMPLETED'
> GROUP BY
>      "party_group"."group_name"
> ORDER BY
>      "party_group"."group_name" ASC
> 
> I need to add in columns like phone numbers and primary contact names, 
> city states, etc...
> 
> So I guess I need subqueries or some sort of SQL pixie dust, cause I 
> can't figure out how to query in two different directions (order info 
> and customer info).
> 
> Help. Anyone got any example SQL scripts around? Or links to examples 
> that emulate the ofbiz database layout?
> 
> -- 
> Walter
> 
>