Re: Trunk demo error

2011-12-04 Thread Jacques Le Roux
Sorry we can't help much on this. It seems that at least upgrading Ubuntu has not effect, we use now kernel 2.6.32-36-server. Could 
you try another machine?


Jacques

From: "Tolu Williams" 

I am on Centos release 5.5 final
kernel is 2.6.18-xenU-ec2-v1.0
JDK is 1_6_29

Thanks!



I upgraded Ubuntu and the linux kernel and restarted trunk and branch
10.

Jacques, can you see if t helped?

Regards,
Hans


On 12/02/2011 12:55 PM, Jacques Le Roux wrote:


This is not related to Hans's change below. It's a known problem but I
only reproduced on trunk demo so far. So it can be due to your OS
or/and JDK versions.
I wanted to show those information from trunk demo, but unfortunately,
for unknow reason so far, I have no access to the demo server this
morning :/

Coud you please send your OS and JDK information (very precise
versions) ?

In the meantime you can revert r1202849

Jacques

From: "Tolu Williams" <[hidden email]>

It looks like this is still an issue, i am on r1209279, the trunk
will not
build, it fails with the exact same error.

The issue is the following error during run-install-seed

classes:
 [javac16] Compiling 20 source files to
/opt/ofbiz/ofbiz/framework/testtools/build/classes
 [javac16]
/opt/ofbiz/ofbiz/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java:101:

incompatible types
 [javac16] found   : org.apache.http.conn.scheme.PlainSocketFactory
 [javac16] required: org.apache.http.conn.scheme.SchemeSocketFactory
 [javac16] SchemeSocketFactory sf =
PlainSocketFactory.getSocketFactory();
 [javac16]
^
 [javac16]
/opt/ofbiz/ofbiz/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java:102:

cannot find symbol
 [javac16] symbol  : constructor
Scheme(java.lang.String,int,org.apache.http.conn.scheme.SchemeSocketFactory)

 [javac16] location: class org.apache.http.conn.scheme.Scheme
 [javac16] supportedSchemes.register(new Scheme("http", 80,
sf));
 [javac16]   ^
 [javac16]
/opt/ofbiz/ofbiz/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java:165:

cannot find symbol
 [javac16] symbol  : constructor
ThreadSafeClientConnManager(org.apache.http.conn.scheme.SchemeRegistry)
 [javac16] location: class
org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
 [javac16] ClientConnectionManager ccm = new
ThreadSafeClientConnManager(supportedSchemes);
 [javac16]   ^
 [javac16]
/opt/ofbiz/ofbiz/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java:245:

cannot find symbol
 [javac16] symbol  : method consume(org.apache.http.HttpEntity)
 [javac16] location: class org.apache.http.util.EntityUtils
 [javac16] EntityUtils.consume(entity); // release
connection gracefully
 [javac16]^
 [javac16] 4 errors

I am on JDK 1_6_29 which is the latest available

Thanks



Thanks Hans,

Works well now from here indeed :o)

The site is ok too. It takes 30 mins to updated once you have svn
updated

people.a.o

Cheers

Jacques

From: "Hans Bakker" <[hidden email]>


Hi Jaques,

remove the '/login' from:

https://demo-trunk.ofbiz.apache.org/catalog/control/login/main?USERNAME=admin&PASSWORD=ofbiz&JavaScriptEnabled=Y



I already did that in the website index.html and updated the site,
however the change does not come through

Regards,
Hans



On 11/20/2011 01:23 AM, Jacques Le Roux wrote:

On demo trunk server, I updated to HEAD and reproduced the same
compilation error. I reverted r1202849 and got rid of the error (not
sure it's safe for Selenium did not analysis).
I don't know from where it comes since locally ant clean-all
run-install run works like a charm. I can see only the JDK version
used: jdk1.6.0_23, but that sounds weird. I certainly miss something
but have not enough time to even think about it...

For now I will continue to stay at r1201941 for trunk demo, until this
issue is resolved.

There are also issues with the catalago/categories tree that I can't
reproduce locally. This seems to only appear when you enter
using parameters for credential and js state:
https://demo-trunk.ofbiz.apache.org/catalog/control/login/main?USERNAME=admin&PASSWORD=ofbiz&JavaScriptEnabled=Y


(then just try to click on  "Gizmos [BEST-SELL-1]" for instance)

It seems the tree problems are related to our demo instance since
nobody complains about them. So I think we can forget about them. On
the other hand, r1202849 is a blocker

HTH

Jacques


BTW I will make some tries on the trunk demo server right now. It
will be unavailable during them...

Jacques

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

HI Erwan,

I have just reviewed your recent changes and yes I can't see any
problems with them. I continue to investigate...

Jacques

From: "Erwan de FERRIERES" <[hidden email]>

Hi Jacques,

I've testing locally the modification, and there is no failed build
with it.
Even the buildbot is not reporting an error :
http://ci

Re: OfBiz - Fixed Asset Question

2011-12-04 Thread Bilgin Ibryam
Antonio,

also have a look at Asset Maintenance component in OFBiz

Bilgin

On 3 December 2011 18:33, Jacques Le Roux  wrote:
> Yes that's what I meant, thanks for clarification David
>
> Jacques
>
> From: "David E Jones" 
>
>> A quick note: the Fixed Asset functionality is part of the "accounting"
>> component of OFBiz, so in that way it is true that you must use the
>> accounting part of OFBiz.
>>
>> However, this does not mean that you have to the OFBiz General Ledger or
>> for accounting transactions in general. Those can easily be turned off.
>>
>> -David
>>
>>
>> Balasubramaniam Mohan wrote:
>>>
>>> Hi,
>>> I am also interested in this topic and would be of great help if you
>>> could
>>> point me to the right resource (wiki) to gain more insight into this
>>> option. Is it possible to do a complete CMMS / EAM ? (Computerised
>>> Maintenance Management System / Enterprise Asset Management).
>>> Regards
>>>
>>> On Sat, Dec 3, 2011 at 6:49 PM, Jacques Le Roux <
>>> jacques.le.r...@les7arts.com> wrote:
>>>
 It depends on what you want to do with fixed assets, but AFAIK basically
 no, you can use them without accounting

 Jacques
  - Original Message -
  From: Antonio Peña
  To: user@ofbiz.apache.org
  Sent: Thursday, December 01, 2011 3:14 PM
  Subject: OfBiz - Fixed Asset Question


  Hi,



  I am a consultant, researching various open source options for a
 customer
 looking into implement a Fixed Asset system.

  I am trying to obtain as much documentation or tutorials on how to
 implement Fixed Asset with OfBiz.

  ·         Does the client needs to configure the accounting
 functionality
 in order to implement fixed asset?







  Thanks,



  Antonio







                     Intelligent Solutions



      Antonio L. Peña Carrión

       Senior Technical Consultant

       O:787.782.7019

       C: 787.319.3452
       F: 787.782.2131

       www.intelutions.net















  CONFIDENTIALITY NOTICE

  Privileged/Confidential Information may be contained in this message.

  If you are not the addressee indicated in this message (or responsible
 for delivery of the message to such person), you may not copy or deliver
 this message to anyone. In such case, you should destroy this message
 and
 kindly notify the sender by reply email. Please advise immediately if
 you
 or your employer does not consent to Internet email for messages of this
 kind. Opinions, conclusions and other information in this message that
 do
 not relate to the official business of the firm, shall be understood as
 neither given nor endorsed by it.



>>>
>


Re: Tax calculation for all order adjustments

2011-12-04 Thread BJ Freeman
I am not familiar with VAT so I can not comment on the best way to
approach this for VAT.
For USA our Tax Authority is based on Government (IRS) which I guess is
similar to VAT But not on Items but gross profit at the end of the
fiscal year. In manufacturing you can not charge off the deduction of
the piece manufactured till the piece is sold. Under this scenario the
calculations are done during the manufacturing process and is additive,
then assigned to IRIS ledger..

The Tax authority for Sales is based on Geo with separate Tax
authorities. Like State, County, city. These are compounded So
Adjustments are complex in computations.

 I bring this up so that the model that is used will accommodate all Tax
Authority scenarios.

This was not a simple effort when we did it so I don't think a
discussion would be simple.
Maybe a Wiki page would be appropriate to come up with a viable design.



biletnikov sent the following on 12/4/2011 9:17 AM:
> In my opinion, TaxAuthorityRateAdjustment can not relate to
> TaxAuthorityRateProduct, because these entities are responsible for
> different taxing scopes :  Product and  Adjustment.
> 
> *TaxAuthorityRateAdjustment*  has relation to :
> 
>- 
> TAXAUTHORITY
>- 
> TAXAUTHORITYRATETYPE
>- 
> PRODUCTSTORE
> 
> 
> Product or adjustment can be items in each order and it is reasonable to
> have the ability for each item being taxed, as I said that is very actual
> for VAT style calculation.
> 
> These TaxAuthorityRateAdjustment and TaxAuthorityRateProduct  will exist in
> parallel, but TaxAuthorityRateProduct  is oriented on product store and
> product categories,  but TaxAuthorityRateAdjustment operates with product
> store and adjustment types!
> 
> The tax computation should be carried out in this order:
> 
>- Read the appropriate tax authority rates
>- Calculate product taxes
>- Calculate adjustment taxes
>- Sum these adjustments
> 
> 
> On Sat, Dec 3, 2011 at 8:57 PM, BJ Freeman [via OFBiz] <
> ml-node+s135035n4154077...@n4.nabble.com> wrote:
> 
>> how does this relate to
>>
>> https://demo-trunk.ofbiz.apache.org/webtools/control/ViewRelations?entityName=TaxAuthorityRateProduct
>> Order Adustements
>> an
>> return Adjustments
>>
>> biletnikov sent the following on 12/3/2011 1:26 AM:
>>
>>> In general, we manage tax calculation for products and adjustments (only
>> for
>>> shipping and promotions).
>>> As we have TaxAuthorityRateProduct in OFBiz to manage the taxing of
>>> products, so why not to have the same system for adjustments?
>>> I propose the solution to have the TaxAuthorityRateAdjustment entity,
>> who is
>>> related in similar order to TaxAuthority.
>>> TaxAuthorityRateAdjustment will have the following fields:
>>>
>>> *Tax type*   (Sales Tax, etc)
>>> *Store ID*
>>> *Catetgory*  (empty category means all categories)
>>> Title Transfer   ???  (I do not know, what can you suggest?)
>>> Min Item Pirce  ??? (I do not know, what can you suggest?)
>>> Min Purchase Price   (I do not know, what can you suggest?)
>>> *Tax Percentage *
>>> *From Date *
>>> *Thru Date*
>>> *Description*
>>>
>>> The settings will be placed in the separate tab near to "Product rates"
>> (Tax
>>> Authority settings).
>>> The UI is very similar!
>>>
>>> RE: TaxAuthorityRateAdjustment
>>> we should retire
>>> *Tax Shipping*
>>> *Tax Promotions*
>>> because they look more like a hack.
>>>
>>>
>>> The tax calculation service must be reworked,
>>>
>>> >> location="org.ofbiz.accounting.tax.TaxAuthorityServices"
>>> invoke="rateProductTaxCalc">
>>>Tax Authority Rate Product Calc
>> Service
>>>
>>> 
>>>
>>>>> invoke="">
>>>Tax Calc Service Interface
>>>>> optional="true">
>>>>> optional="true">
>>>>> optional="true"/>
>>>>> optional="true">
>>>>> optional="false">
>>>>> optional="false">
>>>>> optional="false">
>>>> mode="IN"
>>> optional="true">
>>>> mode="IN"
>>> optional="true">
>>> *   > mode="IN"
>>> optional="true"/>
>>>> mode="IN"
>>> optional="true"/>
>>> *   >> type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
>>>> mode="OUT"
>>> optional="false">
>>>> mode="OUT"
>>> optional="false">
>>>
>>>
>>> This interface must have /OrderAdjustment/ list as IN parameter.
>>>
>>> That is my draft solution.
>>> What do you think about this?
>>>
>>> --
>>> View this message in context:
>> http://ofbiz.135035.n4.nabble.com/Tax-calculation-for-all-order-adjustments-tp4119597p4152813.html
>>> Sent from the OFBiz - User mailing list archi

Re: Do Intersection TemporalExpressions work?

2011-12-04 Thread Craig Ambrose
Adrian, I really appreciate your help here. But I'm just not getting it to
work how I would expect. Here is my scenario. Given a date input by a user,
I want to find the next upcoming TE match. So, I would expect to be able to
do something like this (in pseudo-code)

Date input = UtilDateTime.toDate(parameters.inputDate);
cal.setTime(input);
return new Date(te.next(cal));

If I am using the INDEPENDENCE_DAY TE and I input the date "07/01/2011
00:00:00" I get "07/04/2012" as a result. I would expect "07/04/2011". If I
change the code to use te.first() instead of te.next() then I get unexpected
results when I input "07/10/2011". I get "07/04/2011" which in my opinion is
not the first date on or after 7/10/2011.

So, I can first run te.first() check to see if it is less than the input
date and then call te.next(). Is that the intended usage?

Furthermore, here is the XML definition of the TE I'm really trying to use.



























































I'm trying to model the second Sunday in every odd month (i.e. Jan, Mar,
May, etc.). The 2ND_SUNDAY_IN_MONTH TE works great until I use it in an
INTERSECTION or UNION.

The te.first() method gives me very strange results. Perhaps I am defining
the TE incorrectly, but it seems to give me any match in the union and not
the first occurrence after the provided date. For example, using my
BI_MONTHLY_ONE TemporalExpression I call the following pseudo code

function nextOcc(te, inputDate)
{
return te.next(inputDate);
}

And I get this

nextOcc(te, "06/01/2011") -> 11/13/2011

Where I would expect the next occurrence after 6/1/2011 would be 7/10/2011;
the second Sunday in July.

I'm sure I'm confusing something here. So, any guidance would be greatly
appreciated.

Thanks again

-craig

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Do-Intersection-TemporalExpressions-work-tp4155989p4157599.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Do Intersection TemporalExpressions work?

2011-12-04 Thread Adrian Crum
I believe the API documentation describes that as normal behavior. The 
first occurrence of July 4 on or after July 4 2011 is July 4 2011. If 
you want the next occurrence, then you need to call the next method.


-Adrian

On 12/4/2011 5:33 PM, Craig Ambrose wrote:

Thanks again Adrian. But when I call te.first() with an initial calendar of
"07/14/2011" it also returns "07/04/2011" not "07/04/2012" as I would
expect. That was what I was trying to expose with the for loop; What would
be the returned values for various input dates.

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Do-Intersection-TemporalExpressions-work-tp4155989p4157474.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Do Intersection TemporalExpressions work?

2011-12-04 Thread Craig Ambrose
Thanks again Adrian. But when I call te.first() with an initial calendar of
"07/14/2011" it also returns "07/04/2011" not "07/04/2012" as I would
expect. That was what I was trying to expose with the for loop; What would
be the returned values for various input dates.

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Do-Intersection-TemporalExpressions-work-tp4155989p4157474.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Tax calculation for all order adjustments

2011-12-04 Thread biletnikov
In my opinion, TaxAuthorityRateAdjustment can not relate to
TaxAuthorityRateProduct, because these entities are responsible for
different taxing scopes :  Product and  Adjustment.

*TaxAuthorityRateAdjustment*  has relation to :

   - 
TAXAUTHORITY
   - 
TAXAUTHORITYRATETYPE
   - 
PRODUCTSTORE


Product or adjustment can be items in each order and it is reasonable to
have the ability for each item being taxed, as I said that is very actual
for VAT style calculation.

These TaxAuthorityRateAdjustment and TaxAuthorityRateProduct  will exist in
parallel, but TaxAuthorityRateProduct  is oriented on product store and
product categories,  but TaxAuthorityRateAdjustment operates with product
store and adjustment types!

The tax computation should be carried out in this order:

   - Read the appropriate tax authority rates
   - Calculate product taxes
   - Calculate adjustment taxes
   - Sum these adjustments


On Sat, Dec 3, 2011 at 8:57 PM, BJ Freeman [via OFBiz] <
ml-node+s135035n4154077...@n4.nabble.com> wrote:

> how does this relate to
>
> https://demo-trunk.ofbiz.apache.org/webtools/control/ViewRelations?entityName=TaxAuthorityRateProduct
> Order Adustements
> an
> return Adjustments
>
> biletnikov sent the following on 12/3/2011 1:26 AM:
>
> > In general, we manage tax calculation for products and adjustments (only
> for
> > shipping and promotions).
> > As we have TaxAuthorityRateProduct in OFBiz to manage the taxing of
> > products, so why not to have the same system for adjustments?
> > I propose the solution to have the TaxAuthorityRateAdjustment entity,
> who is
> > related in similar order to TaxAuthority.
> > TaxAuthorityRateAdjustment will have the following fields:
> >
> > *Tax type*   (Sales Tax, etc)
> > *Store ID*
> > *Catetgory*  (empty category means all categories)
> > Title Transfer   ???  (I do not know, what can you suggest?)
> > Min Item Pirce  ??? (I do not know, what can you suggest?)
> > Min Purchase Price   (I do not know, what can you suggest?)
> > *Tax Percentage *
> > *From Date *
> > *Thru Date*
> > *Description*
> >
> > The settings will be placed in the separate tab near to "Product rates"
> (Tax
> > Authority settings).
> > The UI is very similar!
> >
> > RE: TaxAuthorityRateAdjustment
> > we should retire
> > *Tax Shipping*
> > *Tax Promotions*
> > because they look more like a hack.
> >
> >
> > The tax calculation service must be reworked,
> >
> >  > location="org.ofbiz.accounting.tax.TaxAuthorityServices"
> > invoke="rateProductTaxCalc">
> >Tax Authority Rate Product Calc
> Service
> >
> > 
> >
> > > invoke="">
> >Tax Calc Service Interface
> > > optional="true">
> > > optional="true">
> > > optional="true"/>
> > > optional="true">
> > > optional="false">
> > > optional="false">
> > > optional="false">
> > mode="IN"
> > optional="true">
> > mode="IN"
> > optional="true">
> > *mode="IN"
> > optional="true"/>
> > mode="IN"
> > optional="true"/>
> > *> type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
> > mode="OUT"
> > optional="false">
> > mode="OUT"
> > optional="false">
> >
> >
> > This interface must have /OrderAdjustment/ list as IN parameter.
> >
> > That is my draft solution.
> > What do you think about this?
> >
> > --
> > View this message in context:
> http://ofbiz.135035.n4.nabble.com/Tax-calculation-for-all-order-adjustments-tp4119597p4152813.html
> > Sent from the OFBiz - User mailing list archive at Nabble.com.
> >
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://ofbiz.135035.n4.nabble.com/Tax-calculation-for-all-order-adjustments-tp4119597p4154077.html
>  To unsubscribe from Tax calculation for all order adjustments, click 
> here
> .
> NAML
>



-- 
Best regards,
Sergei Biletnikov


--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Tax-calculation-for-all-order-adjustments-tp4119597p4157423.ht

Re: Do Intersection TemporalExpressions work?

2011-12-04 Thread Adrian Crum
I am not sure what you are trying to accomplish with your example code. 
If you want an event to repeat every Independence Day, then call the 
Independence Day temporal expression's first method, and then call the 
next method using the returned Calendar. You can call the next method 
for as many years as you like. There is no need to increment the date 
outside of the temporal expression.


So, calling the first method with a Calendar initialized to 06/01/2011 
will return 07/04/2011. Calling the next method with 07/04/2011 will 
return 07/04/2012, and so on...


In other words, the Calendar returned by the temporal expression is 
supposed to be used as a parameter for the expression's next method.


-Adrian

On 12/4/2011 4:17 PM, Craig Ambrose wrote:

Thanks Adrian. But that doesn't seem to give the expected results either.
Here is what I switched to:


com.ibm.icu.util.Calendar cal = new com.ibm.icu.util.GregorianCalendar();
java.util.Date start = UtilDateTime.toDate("06/01/2011 00:00:00");
cal.setTime(start);

GenericValue temporalExpression = delegator.findOne("TemporalExpression",
UtilMisc.toMap("tempExprId", "INDEPENDENCE_DAY"), true);
TemporalExpression selectionDeadline =
TemporalExpressionWorker.makeTemporalExpression(delegator,
temporalExpression);

for (int index = 0; index<  60; index++)
{
com.ibm.icu.util.Calendar first = selectionDeadline.first(cal);
Date nextDate = new 
Date(selectionDeadline.next(first).getTimeInMillis());
Debug.logInfo(String.format("%s ->  %s ->  %s",

UtilDateTime.toDateString(new Date(cal.getTimeInMillis())),

UtilDateTime.toDateString(new Date(first.getTimeInMillis())),

UtilDateTime.toDateString(nextDate)),
  "Groovy");

cal.add(com.ibm.icu.util.Calendar.DATE, 1);
}

With calling te.first() and passing the result to te.next(). It always
outputs 7/4/2012.

Perhaps I need to check the result of te.first() first? Like this:


for (int index = 0; index<  60; index++)
{
com.ibm.icu.util.Calendar first = selectionDeadline.first(cal);
com.ibm.icu.util.Calendar nextCal;
if (first>  cal)
{
nextCal = first
}
else
{
nextCal = selectionDeadline.next(first);
}
Debug.logInfo(String.format("%s ->  %s ->  %s",

UtilDateTime.toDateString(new Date(cal.getTimeInMillis())),

UtilDateTime.toDateString(new Date(first.getTimeInMillis())),

UtilDateTime.toDateString(new Date(nextCal.getTimeInMillis(,
  "Groovy");

cal.add(com.ibm.icu.util.Calendar.DATE, 1);
}

Is that the intended use?

Thanks for your timely response.

-craig

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Do-Intersection-TemporalExpressions-work-tp4155989p4157247.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Do Intersection TemporalExpressions work?

2011-12-04 Thread Craig Ambrose
Thanks Adrian. But that doesn't seem to give the expected results either.
Here is what I switched to:


com.ibm.icu.util.Calendar cal = new com.ibm.icu.util.GregorianCalendar();
java.util.Date start = UtilDateTime.toDate("06/01/2011 00:00:00");
cal.setTime(start);

GenericValue temporalExpression = delegator.findOne("TemporalExpression",
UtilMisc.toMap("tempExprId", "INDEPENDENCE_DAY"), true);
TemporalExpression selectionDeadline =
TemporalExpressionWorker.makeTemporalExpression(delegator,
temporalExpression);

for (int index = 0; index < 60; index++)
{
com.ibm.icu.util.Calendar first = selectionDeadline.first(cal);
Date nextDate = new 
Date(selectionDeadline.next(first).getTimeInMillis());
Debug.logInfo(String.format("%s -> %s -> %s",

UtilDateTime.toDateString(new Date(cal.getTimeInMillis())),

UtilDateTime.toDateString(new Date(first.getTimeInMillis())),

UtilDateTime.toDateString(nextDate)),
  "Groovy");

cal.add(com.ibm.icu.util.Calendar.DATE, 1);
}

With calling te.first() and passing the result to te.next(). It always
outputs 7/4/2012.

Perhaps I need to check the result of te.first() first? Like this:


for (int index = 0; index < 60; index++)
{
com.ibm.icu.util.Calendar first = selectionDeadline.first(cal);
com.ibm.icu.util.Calendar nextCal;
if (first > cal)
{
nextCal = first
}
else
{
nextCal = selectionDeadline.next(first);
}
Debug.logInfo(String.format("%s -> %s -> %s",

UtilDateTime.toDateString(new Date(cal.getTimeInMillis())),

UtilDateTime.toDateString(new Date(first.getTimeInMillis())),

UtilDateTime.toDateString(new Date(nextCal.getTimeInMillis(,
  "Groovy");

cal.add(com.ibm.icu.util.Calendar.DATE, 1);
}

Is that the intended use?

Thanks for your timely response.

-craig

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Do-Intersection-TemporalExpressions-work-tp4155989p4157247.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


OFBiz Widgets: Was: Extending OFBiz: The BigFish eCommerce Project

2011-12-04 Thread Ruth Hoffman

All:

For more information about how to use OFBiz Screen, Menu, Tree and Form 
widgets, I did a concise write-up in the Apache OFBiz Cookbook available 
from PACKT Publishing:


[http://www.packtpub.com/apache-ofbiz-cookbook/book]

After re-reading this section (I did this over a year ago), I now recall 
why I said "lists". HTML lists (ul/ol) are created automatically by Menu 
and Tree widgets.


Regards,
Ruth Hoffman

On 12/3/11 3:51 PM, Ruth Hoffman wrote:

Hi Jacques:
Sorry, by "list" I really mean Screen widgets with entity-condition 
lists. Never meant to imply that I would not use a Screen widget. No, 
always I use Screen widgets with Freemarker templates and Groovy 
scripts (not XML conditional statements in the actions part of the 
Screen Widget.)


And yes, jQuery is a godsend. I've been using it now for some time and 
love it. Haven't had a chance to use it with a Form or Menu widget yet 
but who knows...


Agreed about the User ML.

Regards,
Ruth
http://www.myofbiz.com

On 12/3/11 2:23 PM, Jacques Le Roux wrote:
To simplify, I'd say; go with Form/Menu widgets  as long as you can 
and switch to Freemarkers templates when your needs go beyond what  
Form/Menu widgets can offer. BTW I don't know what List widgets stand 
for Ruth ;o). Alos you need screen widgets in all cases. Remember 
that you can use Jquery (and js by and large) also with Form/Menu 
widgets and sometimes it opens you awesome possiblities. You can find 
examples in OFBiz trunk and R11.04


I just wonder if this thread should not be in user ML rather...

Jacques

From: "Ruth Hoffman" 

Hi Gareth:
Can't help but add my 2 cents here...

First, I take issue with Han's statement: "...it is an 
implementation of a 'simple' OFBiz component all in a single 
webapp...". I would argue that there is no such thing as a "simple" 
OFBiz component. To my way of thinking, "simple" adds no value to 
the discussion. A component is a component.


Second, components are not implemented in webapps. User interfaces - 
built from one or more OFBiz webapps - which provide browser access 
to OFBiz features and functions, are implemented within a component. 
Not the other way around.


Third, after many years of using OFBiz and developing many new 
applications (and working with existing ones), IMHO the menu, form 
and list widgets are of limited value. Here is when I (sometimes) 
use them: If you need to build a quick webpage (HTML) view into a 
single database table, perhaps an entity you have added to implement 
some new business function, you may want to consider using these 
widgets. To add and remove data to a single table or list the 
contents of a table, widgets work just fine.


The problem arises in that most modern, web based user interface 
designs don't lend themselves to this very one-dimensional view of 
the data model.


It is extremely difficult (and IMHO a waste of time) to build an 
OFBiz user interface with these widgets when you have the best tool 
available (Freemarker) to do this. Use the right tool for the job 
and you will be rewarded handsomely!


Best of luck
Ruth
http://www.myofbiz.com

On 12/3/11 8:59 AM, Gareth O'Brien wrote:

Hans,

I'm new to ofbiz; also to the tools and components that it 
comprises having

come from a Windows .NET C# background.

I'm interested in your comment about it being a pity that only ftl 
is used.

Can you expand a bit on that?

What are the shortcomings of ftl?
What alternative(s) would you recommend and why?

The whole area of UI, especially simplified and deployed as an 
end-user

package will feature heavily in a project due to kick off in January.

Thanks,

Gareth.

-Original Message-
From: Hans Bakker [mailto:mailingl...@antwebsystems.com]
Sent: 02 December 2011 06:45
To: d...@ofbiz.apache.org
Cc: Len Shein
Subject: Re: Extending OFBiz: The BigFish eCommerce Project

I think this is pretty interesting, it is an implementation of a 
'simple'
OFBiz component all in a single webappa pity that only ftl is 
used, but

still..

A demo version would be helpfull.

what is the license of this contribution, is it a contribution?

Regards,
Hans

On 12/01/2011 01:06 AM, Len Shein wrote:

OFBiz Community:

We have developed an eCommerce specific solution, something like a
"Store In a Box". We call it BigFish.

Built on top of OFBiz; completely ready-to-go, with lots of
flexibility and configuration options. We are looking for 
adopters! We

are looking for the OFBiz community to download, support, critique,
suggest improvements, and validate our efforts.

To participate take a look at

http://www.salmonllc.com/website/downloads/bf_deploy.doc



* BigFish eCommerce

* A fully functional eCommerce implementation (a real working "Store
In A Box")
* Includes product categories, products, configurations, check-out
etc.
* BigFish eCommerce is a single framework that can be used to
implement any number of eCommerce stores, all with their own 

Re: Do Intersection TemporalExpressions work?

2011-12-04 Thread Adrian Crum
Technically, you are correct - the next date being returned is wrong, 
but partly because the class is being used incorrectly. If you provide a 
starting calendar to the expression's first method, and then pass the 
returned date to the next method, the dates returned will be correct.


The temporal expressions should provide an iterator instead of the 
having the first and next methods - that would eliminate the problem you 
encountered.


-Adrian


On 12/4/2011 3:24 AM, Craig Ambrose wrote:

Hello,

I seem to be having problems getting TemporalExpressions to work. They seem to 
work fine for some expressions. But not for INTERSECTION types. I am using the 
TE definition from the sample data in ServiceDemoData.xml for INDEPENDENCE_DAY, 
specifically this:

 
 
 

And I'm using the following code to iterate over a number of days to see when 
the next Independence Day will occur:

com.ibm.icu.util.Calendar cal = new com.ibm.icu.util.GregorianCalendar();
java.util.Date start = UtilDateTime.toDate("06/01/2011 00:00:00");
cal.setTime(start);

GenericValue temporalExpression = delegator.findOne("TemporalExpression", 
UtilMisc.toMap("tempExprId", "INDEPENDENCE_DAY"), true);
TemporalExpression selectionDeadline = 
TemporalExpressionWorker.makeTemporalExpression(delegator, temporalExpression);

for (int index = 0; index<  60; index++)
{
Date nextDate = new Date(selectionDeadline.next(cal).getTimeInMillis());
Debug.logInfo(String.format("%s ->  %s", new Date(cal.getTimeInMillis()), 
nextDate), "Groovy");

cal.add(com.ibm.icu.util.Calendar.DATE, 1);
}

It doesn't do the right thing for the first 4 days of July. It says for 
7/1/2011 that the next occurrence is 7/4/2012. Here is the output:

2011-12-03 19:14:52,254 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Wed Jun 01 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,256 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Thu Jun 02 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,256 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Fri Jun 03 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,256 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Sat Jun 04 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,257 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Sun Jun 05 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,257 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Mon Jun 06 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,257 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Tue Jun 07 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,258 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Wed Jun 08 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,258 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Thu Jun 09 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,259 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Fri Jun 10 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,260 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Sat Jun 11 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,260 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Sun Jun 12 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,260 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Mon Jun 13 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,260 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Tue Jun 14 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,261 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Wed Jun 15 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,261 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Thu Jun 16 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,261 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Fri Jun 17 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,262 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Sat Jun 18 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,262 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Sun Jun 19 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,262 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Mon Jun 20 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,263 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Tue Jun 21 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,263 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Wed Jun 22 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,263 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Thu Jun 23 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,264 (http-0.0.0.0-8080-1) [Test.groovy:23 :INFO ] Fri Jun 24 
00:00:00 PDT 2011 ->  Mon Jul 04 00:00:00 PDT 2011
2011-12-03 19:14:52,264 (http-0.0.0.0-8080-1) [Test.groovy:23