Future date incoming inventory committed by Supplier

2010-02-13 Thread advait75

Hi,

How do I enter inventory that has been committed by the supplier to come in
on a future date? Also, once I do so, which tables do I need to look in to
see this info?

Thanks,
Advait
-- 
View this message in context: 
http://n4.nabble.com/Future-date-incoming-inventory-committed-by-Supplier-tp1554955p1554955.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Issue with create category : Raising Jira issue

2010-02-13 Thread Babu Sreekanth
Hello,
  
  I found an issue with create category. The screen shot is attached. The 
scenario is.
1. Through the setup application (ofbiz setup), created an organization
2. Added Facility, Product store etc. and came to the last section 'First 
product"
3. Created a product catalog , then tried to create a category. It throws the 
below exception.

A TRUNCATION ERROR WAS ENCOUNTERED TRYING TO SHRINK VARCHAR 
'ABJ_CATALOG_PROMOTIONS' TO LENGTH 20.
CALLING SERVICE CREATEPRODUCTCATEGORY IN 
CREATEPRODUCTCATEGORYANDADDTOPRODCATALOG

The issue was on SVN trun, retrieved on 02/12/2010 (Yesterday). 

Well the error seems to occur when it try to shrink to fit into the 20 char 
table name. In the setup UI, there is no place to give the name for catalog 
promotion table.

Do you think I should raise a Jira issue. I just created one related to 
ofbizsetup --> update contact .  
https://issues.apache.org/jira/browse/OFBIZ-3477 . I wanted to make sure I am 
following the practice to raise a bug. Do I need to discuss it in the group 
prior to create a JIRA ticket?

Thanks,
Babu.


  

Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Jacques Le Roux

From: "BJ Freeman" 

thats a lot of book marks for 10,000 to 100,000 products
plus trying to figure it out.

seems a link like we have would be the simplest for workers that only
knowledge is entering information for a product.

many web store owners higher a group that only enters product info and
know minimal of the application.

I go under the rule to make the UI simple for the user not the developer.


True, I was thinking they could tweak the URL as soon as they are aware (after all they have the information). It's all about 
information, make me think of REST, which these URLs are really. But a button is certainly easier for a lambda user, I agree.


Jacques


Jacques Le Roux sent the following on 2/13/2010 2:14 PM:

The std URLs are like this one
http://ofbiz-vm.apache.org/ecommerce/products/200/202/p_WG-9943

So when you know the category (sub if necessary, etc.) and the product
Ids you know the URL

Jacques

From: "BJ Freeman" 

how would one get the url to bookmark when in the catalog manager.
If you just added product and wanted to view the finished page.


Jacques Le Roux sent the following on 2/13/2010 11:15 AM:

Yes right, I see your point and the issue of course
We could be pragmatic also and simply C/P the URL or even better put it
in bookmarks/favorite/etc. somewhere. That  could be enough IMO, and
then the issue removed.

Jacques

From: "Ruth Hoffman" 

Hi Jacques:
It is really nice to be able to view the full product page as it
should be rendered in-situ.  What I mean is, the person who is
entering in the product information should have full visibility into
how the product will look on the website before it is published.
Sort-of a "draft" view. It's not a good idea to wait until the catalog
gets published on the web site to find problems with the display.

How that preview is accomplished - that is a different store. I would
expect that it shouldn't depend on the ecommerce store at all but
rather a template used to create the catalog/category totally
independent of the store.

Just my 2 cents.

Regards,
Ruth

Jacques Le Roux wrote:

Hi Ruth,

Yes, this functionnality

Jacques

From: "Ruth Hoffman" 

Hi Jacques:
Need what? The original "Product Page" button?
TIA
Ruth

Jacques Le Roux wrote:

Do we really need this?

Jacques

From: "Ashish Vijaywargiya" 

Hello,

On the backend catalog application we have a link "Product Page"
button for navigating to the Product Detail page in Ecommerce
Component.
http://img714.imageshack.us/img714/9707/productpage.png

https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644


The value for ecommerce component is hardcoded on the link.


   


So if we create custom application then this page redirect to the
ecommerce application, which is not correct IMO. If we talk about
single custom application then we can maintain a patch and can fix
this line of code.
But how should we handle the case when we have multiple custom
component and we may need to redirect to the custom ecommerce
component that doesn't have ecommerce as a mount point and that
contains this specific product that we are editing.

How can we handle this scenario?
Do we have any settings in OFBiz that can be used to handle this
case?

Any help on this would be greatly appreciated.

--
Ashish Vijaywargiya
http://www.saveourtigers.com/



























Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread BJ Freeman
thats a lot of book marks for 10,000 to 100,000 products
plus trying to figure it out.

seems a link like we have would be the simplest for workers that only
knowledge is entering information for a product.

 many web store owners higher a group that only enters product info and
know minimal of the application.

I go under the rule to make the UI simple for the user not the developer.

Jacques Le Roux sent the following on 2/13/2010 2:14 PM:
> The std URLs are like this one
> http://ofbiz-vm.apache.org/ecommerce/products/200/202/p_WG-9943
> 
> So when you know the category (sub if necessary, etc.) and the product
> Ids you know the URL
> 
> Jacques
> 
> From: "BJ Freeman" 
>> how would one get the url to bookmark when in the catalog manager.
>> If you just added product and wanted to view the finished page.
>>
>>
>> Jacques Le Roux sent the following on 2/13/2010 11:15 AM:
>>> Yes right, I see your point and the issue of course
>>> We could be pragmatic also and simply C/P the URL or even better put it
>>> in bookmarks/favorite/etc. somewhere. That  could be enough IMO, and
>>> then the issue removed.
>>>
>>> Jacques
>>>
>>> From: "Ruth Hoffman" 
 Hi Jacques:
 It is really nice to be able to view the full product page as it
 should be rendered in-situ.  What I mean is, the person who is
 entering in the product information should have full visibility into
 how the product will look on the website before it is published.
 Sort-of a "draft" view. It's not a good idea to wait until the catalog
 gets published on the web site to find problems with the display.

 How that preview is accomplished - that is a different store. I would
 expect that it shouldn't depend on the ecommerce store at all but
 rather a template used to create the catalog/category totally
 independent of the store.

 Just my 2 cents.

 Regards,
 Ruth

 Jacques Le Roux wrote:
> Hi Ruth,
>
> Yes, this functionnality
>
> Jacques
>
> From: "Ruth Hoffman" 
>> Hi Jacques:
>> Need what? The original "Product Page" button?
>> TIA
>> Ruth
>>
>> Jacques Le Roux wrote:
>>> Do we really need this?
>>>
>>> Jacques
>>>
>>> From: "Ashish Vijaywargiya" 
 Hello,

 On the backend catalog application we have a link "Product Page"
 button for navigating to the Product Detail page in Ecommerce
 Component.
 http://img714.imageshack.us/img714/9707/productpage.png

 https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644


 The value for ecommerce component is hardcoded on the link.

 >>> text="${uiLabelMap.ProductProductPage}" style="buttontext">

 

 So if we create custom application then this page redirect to the
 ecommerce application, which is not correct IMO. If we talk about
 single custom application then we can maintain a patch and can fix
 this line of code.
 But how should we handle the case when we have multiple custom
 component and we may need to redirect to the custom ecommerce
 component that doesn't have ecommerce as a mount point and that
 contains this specific product that we are editing.

 How can we handle this scenario?
 Do we have any settings in OFBiz that can be used to handle this
 case?

 Any help on this would be greatly appreciated.

 -- 
 Ashish Vijaywargiya
 http://www.saveourtigers.com/

>>>
>>>
>>
>
>

>>>
>>>
>>>
>>
> 
> 



Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Jacques Le Roux

The std URLs are like this one 
http://ofbiz-vm.apache.org/ecommerce/products/200/202/p_WG-9943

So when you know the category (sub if necessary, etc.) and the product Ids you 
know the URL

Jacques

From: "BJ Freeman" 

how would one get the url to bookmark when in the catalog manager.
If you just added product and wanted to view the finished page.


Jacques Le Roux sent the following on 2/13/2010 11:15 AM:

Yes right, I see your point and the issue of course
We could be pragmatic also and simply C/P the URL or even better put it
in bookmarks/favorite/etc. somewhere. That  could be enough IMO, and
then the issue removed.

Jacques

From: "Ruth Hoffman" 

Hi Jacques:
It is really nice to be able to view the full product page as it
should be rendered in-situ.  What I mean is, the person who is
entering in the product information should have full visibility into
how the product will look on the website before it is published.
Sort-of a "draft" view. It's not a good idea to wait until the catalog
gets published on the web site to find problems with the display.

How that preview is accomplished - that is a different store. I would
expect that it shouldn't depend on the ecommerce store at all but
rather a template used to create the catalog/category totally
independent of the store.

Just my 2 cents.

Regards,
Ruth

Jacques Le Roux wrote:

Hi Ruth,

Yes, this functionnality

Jacques

From: "Ruth Hoffman" 

Hi Jacques:
Need what? The original "Product Page" button?
TIA
Ruth

Jacques Le Roux wrote:

Do we really need this?

Jacques

From: "Ashish Vijaywargiya" 

Hello,

On the backend catalog application we have a link "Product Page"
button for navigating to the Product Detail page in Ecommerce
Component.
http://img714.imageshack.us/img714/9707/productpage.png

https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644

The value for ecommerce component is hardcoded on the link.


   


So if we create custom application then this page redirect to the
ecommerce application, which is not correct IMO. If we talk about
single custom application then we can maintain a patch and can fix
this line of code.
But how should we handle the case when we have multiple custom
component and we may need to redirect to the custom ecommerce
component that doesn't have ecommerce as a mount point and that
contains this specific product that we are editing.

How can we handle this scenario?
Do we have any settings in OFBiz that can be used to handle this
case?

Any help on this would be greatly appreciated.

--
Ashish Vijaywargiya
http://www.saveourtigers.com/





















Re: cascade deletes

2010-02-13 Thread Ruth Hoffman

Hi Bilgin:
Thanks.
Could you maybe explain the reason why this was done?
Ruth

Bilgin Ibryam wrote:

Ruth Hoffman wrote:

Hi Bilgin:
I'm sure this is a really stupid question, but that has never stopped 
me before :-)

I'm wonder how this compiles:
   Delegator delegator = dctx.getDelegator();
Shouldn't that be GenericDelegator ? What have I overlooked?
TIA
Ruth


Ruth,

there was some refactoring of delagator class in ofbiz trunk 
introduced few months ago by Adrian.
Now there is an Delegator interface which should be used instead of 
the implementing GenericDelegator class.


Bilgin



Re: Party ID during creation

2010-02-13 Thread Babu Sreekanth
One additional detail. It is possible to specify Party ID through "Create 
organization" section of ofbizsetup app. But, then why it should not be the 
case through Party manager?




From: bsreekanth 
To: user@ofbiz.apache.org
Sent: Sat, February 13, 2010 4:46:13 PM
Subject: Party ID during creation


Hello,
  It is not possible to specify the party id through GUI while creating a
Party (Person or Party Group). It gets the id through a sequence. At the
same time, a meaningful name is used as id through seed data in all the demo
purpose. So, what is the intention? Is it to prevent the user not to enter
the PK field with random text? 
thanks,
Babu.
-- 
View this message in context: 
http://n4.nabble.com/Party-ID-during-creation-tp1554713p1554713.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



  

Re: cascade deletes

2010-02-13 Thread Bilgin Ibryam

Ruth Hoffman wrote:

Hi Bilgin:
I'm sure this is a really stupid question, but that has never stopped 
me before :-)

I'm wonder how this compiles:
   Delegator delegator = dctx.getDelegator();
Shouldn't that be GenericDelegator ? What have I overlooked?
TIA
Ruth


Ruth,

there was some refactoring of delagator class in ofbiz trunk introduced 
few months ago by Adrian.
Now there is an Delegator interface which should be used instead of the 
implementing GenericDelegator class.


Bilgin


Party ID during creation

2010-02-13 Thread bsreekanth

Hello,
  It is not possible to specify the party id through GUI while creating a
Party (Person or Party Group). It gets the id through a sequence. At the
same time, a meaningful name is used as id through seed data in all the demo
purpose. So, what is the intention? Is it to prevent the user not to enter
the PK field with random text? 
thanks,
Babu.
-- 
View this message in context: 
http://n4.nabble.com/Party-ID-during-creation-tp1554713p1554713.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: cascade deletes

2010-02-13 Thread Ruth Hoffman

Hi Bilgin:
I'm sure this is a really stupid question, but that has never stopped me 
before :-)

I'm wonder how this compiles:
   Delegator delegator = dctx.getDelegator();
Shouldn't that be GenericDelegator ? What have I overlooked?
TIA
Ruth
Bilgin Ibryam wrote:

Christopher Snow wrote:

Is it possible to do a cascade delete in an ofbiz service?

Many thanks in advance,

Chris

Hi Chris,

I also have to do cascade deleting data. For this purpose I created a 
generic service which accepts the entity name and primary key fields 
and delete the entry and all the related data entries.
I tried it with few entities (workeffort, orderheader, invoice) and it 
works correct. Could you try it tell us if it  worked also for your 
case. Here is the patch


Bilgin

Index: framework/common/servicedef/services_test.xml
===
--- framework/common/servicedef/services_test.xml(revision 909781)
+++ framework/common/servicedef/services_test.xml(working copy)
@@ -210,4 +210,11 @@
Test Ping Service
optional="true"/>


+
++location="org.ofbiz.common.CommonServices" 
invoke="cascadeDelete">
+Remove generic value and its related 
values

+
+
+   
Index: framework/common/src/org/ofbiz/common/CommonServices.java
===
--- framework/common/src/org/ofbiz/common/CommonServices.java
(revision 909781)
+++ framework/common/src/org/ofbiz/common/CommonServices.java
(working copy)

@@ -45,6 +45,7 @@
import org.apache.log4j.Logger;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.base.util.UtilValidate;

import static org.ofbiz.base.util.UtilGenerics.checkList;
@@ -54,6 +55,8 @@
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.model.ModelEntity;
+import org.ofbiz.entity.model.ModelRelation;
+import org.ofbiz.entity.model.ModelViewEntity;
import org.ofbiz.entity.transaction.TransactionUtil;
import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.GenericServiceException;
@@ -534,5 +537,39 @@
return ServiceUtil.returnError("Invalid count returned 
from database");

}
}
+   +public static Map 
cascadeDelete(DispatchContext dctx, Map context) {

+Delegator delegator = dctx.getDelegator();
+String entityName = (String) context.get("entityName");
+Map pkFields = 
UtilGenerics.checkMap(context.get("pkFields"));

+   +try {
+GenericValue value = 
delegator.findByPrimaryKey(entityName, pkFields);
+ModelEntity modelEntity = 
delegator.getModelEntity(entityName);
+List relations = 
modelEntity.getRelationsManyList();
+   +if (value == null || modelEntity instanceof 
ModelViewEntity) {+return 
ServiceUtil.returnSuccess();

+}
+   +for (ModelRelation relation : relations) {
+String combinedName = relation.getCombinedName();
+List relatedValues = 
value.getRelated(combinedName);

+for (GenericValue relatedValue : relatedValues) {
+pkFields = 
relatedValue.getPrimaryKey().getAllFields();

+entityName = relatedValue.getEntityName();
+Map newContext = 
UtilMisc.toMap("entityName", entityName, "pkFields", pkFields);

+CommonServices.cascadeDelete(dctx, newContext);
+}
+}
+   +Debug.logInfo("Removing value: " + value , 
module);

+delegator.removeValue(value);
+} catch (GenericEntityException e) {
+return ServiceUtil.returnError(e.getMessage());
+}
+
+return ServiceUtil.returnSuccess();
+}  
}





Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread BJ Freeman
how would one get the url to bookmark when in the catalog manager.
If you just added product and wanted to view the finished page.


Jacques Le Roux sent the following on 2/13/2010 11:15 AM:
> Yes right, I see your point and the issue of course
> We could be pragmatic also and simply C/P the URL or even better put it
> in bookmarks/favorite/etc. somewhere. That  could be enough IMO, and
> then the issue removed.
> 
> Jacques
> 
> From: "Ruth Hoffman" 
>> Hi Jacques:
>> It is really nice to be able to view the full product page as it
>> should be rendered in-situ.  What I mean is, the person who is
>> entering in the product information should have full visibility into
>> how the product will look on the website before it is published.
>> Sort-of a "draft" view. It's not a good idea to wait until the catalog
>> gets published on the web site to find problems with the display.
>>
>> How that preview is accomplished - that is a different store. I would
>> expect that it shouldn't depend on the ecommerce store at all but
>> rather a template used to create the catalog/category totally
>> independent of the store.
>>
>> Just my 2 cents.
>>
>> Regards,
>> Ruth
>>
>> Jacques Le Roux wrote:
>>> Hi Ruth,
>>>
>>> Yes, this functionnality
>>>
>>> Jacques
>>>
>>> From: "Ruth Hoffman" 
 Hi Jacques:
 Need what? The original "Product Page" button?
 TIA
 Ruth

 Jacques Le Roux wrote:
> Do we really need this?
>
> Jacques
>
> From: "Ashish Vijaywargiya" 
>> Hello,
>>
>> On the backend catalog application we have a link "Product Page"
>> button for navigating to the Product Detail page in Ecommerce
>> Component.
>> http://img714.imageshack.us/img714/9707/productpage.png
>>
>> https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644
>>
>> The value for ecommerce component is hardcoded on the link.
>>
>> > text="${uiLabelMap.ProductProductPage}" style="buttontext">
>>
>> 
>>
>> So if we create custom application then this page redirect to the
>> ecommerce application, which is not correct IMO. If we talk about
>> single custom application then we can maintain a patch and can fix
>> this line of code.
>> But how should we handle the case when we have multiple custom
>> component and we may need to redirect to the custom ecommerce
>> component that doesn't have ecommerce as a mount point and that
>> contains this specific product that we are editing.
>>
>> How can we handle this scenario?
>> Do we have any settings in OFBiz that can be used to handle this
>> case?
>>
>> Any help on this would be greatly appreciated.
>>
>> -- 
>> Ashish Vijaywargiya
>> http://www.saveourtigers.com/
>>
>
>

>>>
>>>
>>
> 
> 
> 



Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Jacques Le Roux

Yes right, I see your point and the issue of course
We could be pragmatic also and simply C/P the URL or even better put it in bookmarks/favorite/etc. somewhere. That  could be enough 
IMO, and then the issue removed.


Jacques

From: "Ruth Hoffman" 

Hi Jacques:
It is really nice to be able to view the full product page as it should be rendered in-situ.  What I mean is, the person who is 
entering in the product information should have full visibility into how the product will look on the website before it is 
published. Sort-of a "draft" view. It's not a good idea to wait until the catalog gets published on the web site to find problems 
with the display.


How that preview is accomplished - that is a different store. I would expect that it shouldn't depend on the ecommerce store at 
all but rather a template used to create the catalog/category totally independent of the store.


Just my 2 cents.

Regards,
Ruth

Jacques Le Roux wrote:

Hi Ruth,

Yes, this functionnality

Jacques

From: "Ruth Hoffman" 

Hi Jacques:
Need what? The original "Product Page" button?
TIA
Ruth

Jacques Le Roux wrote:

Do we really need this?

Jacques

From: "Ashish Vijaywargiya" 

Hello,

On the backend catalog application we have a link "Product Page"
button for navigating to the Product Detail page in Ecommerce
Component.
http://img714.imageshack.us/img714/9707/productpage.png

https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644

The value for ecommerce component is hardcoded on the link.


   


So if we create custom application then this page redirect to the
ecommerce application, which is not correct IMO. If we talk about
single custom application then we can maintain a patch and can fix
this line of code.
But how should we handle the case when we have multiple custom
component and we may need to redirect to the custom ecommerce
component that doesn't have ecommerce as a mount point and that
contains this specific product that we are editing.

How can we handle this scenario?
Do we have any settings in OFBiz that can be used to handle this case?

Any help on this would be greatly appreciated.

--
Ashish Vijaywargiya
http://www.saveourtigers.com/
















Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Ruth Hoffman

Hi Jacques:
It is really nice to be able to view the full product page as it should 
be rendered in-situ.  What I mean is, the person who is entering in the 
product information should have full visibility into how the product 
will look on the website before it is published. Sort-of a "draft" view. 
It's not a good idea to wait until the catalog gets published on the web 
site to find problems with the display.


How that preview is accomplished - that is a different store. I would 
expect that it shouldn't depend on the ecommerce store at all but rather 
a template used to create the catalog/category totally independent of 
the store.


Just my 2 cents.

Regards,
Ruth

Jacques Le Roux wrote:

Hi Ruth,

Yes, this functionnality

Jacques

From: "Ruth Hoffman" 

Hi Jacques:
Need what? The original "Product Page" button?
TIA
Ruth

Jacques Le Roux wrote:

Do we really need this?

Jacques

From: "Ashish Vijaywargiya" 

Hello,

On the backend catalog application we have a link "Product Page"
button for navigating to the Product Detail page in Ecommerce
Component.
http://img714.imageshack.us/img714/9707/productpage.png

https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644

The value for ecommerce component is hardcoded on the link.


   


So if we create custom application then this page redirect to the
ecommerce application, which is not correct IMO. If we talk about
single custom application then we can maintain a patch and can fix
this line of code.
But how should we handle the case when we have multiple custom
component and we may need to redirect to the custom ecommerce
component that doesn't have ecommerce as a mount point and that
contains this specific product that we are editing.

How can we handle this scenario?
Do we have any settings in OFBiz that can be used to handle this case?

Any help on this would be greatly appreciated.

--
Ashish Vijaywargiya
http://www.saveourtigers.com/











Re: cascade deletes

2010-02-13 Thread Bilgin Ibryam

Christopher Snow wrote:

Is it possible to do a cascade delete in an ofbiz service?

Many thanks in advance,

Chris

Hi Chris,

I also have to do cascade deleting data. For this purpose I created a 
generic service which accepts the entity name and primary key fields and 
delete the entry and all the related data entries.
I tried it with few entities (workeffort, orderheader, invoice) and it 
works correct. Could you try it tell us if it  worked also for your 
case. Here is the patch


Bilgin

Index: framework/common/servicedef/services_test.xml
===
--- framework/common/servicedef/services_test.xml(revision 909781)
+++ framework/common/servicedef/services_test.xml(working copy)
@@ -210,4 +210,11 @@
Test Ping Service
optional="true"/>


+
+
+Remove generic value and its related 
values

+
+
+   


Index: framework/common/src/org/ofbiz/common/CommonServices.java
===
--- framework/common/src/org/ofbiz/common/CommonServices.java
(revision 909781)
+++ framework/common/src/org/ofbiz/common/CommonServices.java
(working copy)

@@ -45,6 +45,7 @@
import org.apache.log4j.Logger;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.base.util.UtilValidate;

import static org.ofbiz.base.util.UtilGenerics.checkList;
@@ -54,6 +55,8 @@
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.model.ModelEntity;
+import org.ofbiz.entity.model.ModelRelation;
+import org.ofbiz.entity.model.ModelViewEntity;
import org.ofbiz.entity.transaction.TransactionUtil;
import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.GenericServiceException;
@@ -534,5 +537,39 @@
return ServiceUtil.returnError("Invalid count returned from 
database");

}
}
+   
+public static Map cascadeDelete(DispatchContext 
dctx, Map context) {

+Delegator delegator = dctx.getDelegator();
+String entityName = (String) context.get("entityName");
+Map pkFields = 
UtilGenerics.checkMap(context.get("pkFields"));
+   
+try {
+GenericValue value = delegator.findByPrimaryKey(entityName, 
pkFields);

+ModelEntity modelEntity = delegator.getModelEntity(entityName);
+List relations = 
modelEntity.getRelationsManyList();
+   
+if (value == null || modelEntity instanceof 
ModelViewEntity) {
+return ServiceUtil.returnSuccess();

+}
+   
+for (ModelRelation relation : relations) {

+String combinedName = relation.getCombinedName();
+List relatedValues = 
value.getRelated(combinedName);

+for (GenericValue relatedValue : relatedValues) {
+pkFields = relatedValue.getPrimaryKey().getAllFields();
+entityName = relatedValue.getEntityName();
+Map newContext = 
UtilMisc.toMap("entityName", entityName, "pkFields", pkFields);

+CommonServices.cascadeDelete(dctx, newContext);
+}
+}
+   
+Debug.logInfo("Removing value: " + value , module);

+delegator.removeValue(value);
+} catch (GenericEntityException e) {
+return ServiceUtil.returnError(e.getMessage());
+}
+
+return ServiceUtil.returnSuccess();
+}   


}



Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Jacques Le Roux

Hi Ruth,

Yes, this functionnality

Jacques

From: "Ruth Hoffman" 

Hi Jacques:
Need what? The original "Product Page" button?
TIA
Ruth

Jacques Le Roux wrote:

Do we really need this?

Jacques

From: "Ashish Vijaywargiya" 

Hello,

On the backend catalog application we have a link "Product Page"
button for navigating to the Product Detail page in Ecommerce
Component.
http://img714.imageshack.us/img714/9707/productpage.png

https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644

The value for ecommerce component is hardcoded on the link.


   


So if we create custom application then this page redirect to the
ecommerce application, which is not correct IMO. If we talk about
single custom application then we can maintain a patch and can fix
this line of code.
But how should we handle the case when we have multiple custom
component and we may need to redirect to the custom ecommerce
component that doesn't have ecommerce as a mount point and that
contains this specific product that we are editing.

How can we handle this scenario?
Do we have any settings in OFBiz that can be used to handle this case?

Any help on this would be greatly appreciated.

--
Ashish Vijaywargiya
http://www.saveourtigers.com/










Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Bruno Busco
A long time ago I did report this here:
https://issues.apache.org/jira/browse/OFBIZ-1803

-Bruno

2010/2/13 BJ Freeman :
> Some I know use it as a preview.
> However as we move more to the cms oriented products data
> maybe need to think if there is a way to accomplish this with the CMS
> component.
>
>
>
> Jacques Le Roux sent the following on 2/13/2010 8:09 AM:
>> Do we really need this?
>>
>> Jacques
>>
>> From: "Ashish Vijaywargiya" 
>>> Hello,
>>>
>>> On the backend catalog application we have a link "Product Page"
>>> button for navigating to the Product Detail page in Ecommerce
>>> Component.
>>> http://img714.imageshack.us/img714/9707/productpage.png
>>>
>>> https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644
>>>
>>> The value for ecommerce component is hardcoded on the link.
>>>
>>> >> text="${uiLabelMap.ProductProductPage}" style="buttontext">
>>>    
>>> 
>>>
>>> So if we create custom application then this page redirect to the
>>> ecommerce application, which is not correct IMO. If we talk about
>>> single custom application then we can maintain a patch and can fix
>>> this line of code.
>>> But how should we handle the case when we have multiple custom
>>> component and we may need to redirect to the custom ecommerce
>>> component that doesn't have ecommerce as a mount point and that
>>> contains this specific product that we are editing.
>>>
>>> How can we handle this scenario?
>>> Do we have any settings in OFBiz that can be used to handle this case?
>>>
>>> Any help on this would be greatly appreciated.
>>>
>>> --
>>> Ashish Vijaywargiya
>>> http://www.saveourtigers.com/
>>>
>>
>>
>
>


Re: svn hangs

2010-02-13 Thread BJ Freeman
RA layer request failed
svn: REPORT of '/repos/asf/!svn/vcc/default': Could not read response
body: connection timed out (http://svn.apache.org)


BJ Freeman sent the following on 2/13/2010 8:34 AM:
> using eclipse to access SVN
> is seems to go so far then stop.
> it shows 100% but I have figured out that is probably evaluation not
> downloaded.
> I left it there overnight and it has not budged.
> has anyone else experienced this lately?
> 
> 



svn hangs

2010-02-13 Thread BJ Freeman
using eclipse to access SVN
is seems to go so far then stop.
it shows 100% but I have figured out that is probably evaluation not
downloaded.
I left it there overnight and it has not budged.
has anyone else experienced this lately?



Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread BJ Freeman
Some I know use it as a preview.
However as we move more to the cms oriented products data
maybe need to think if there is a way to accomplish this with the CMS
component.



Jacques Le Roux sent the following on 2/13/2010 8:09 AM:
> Do we really need this?
> 
> Jacques
> 
> From: "Ashish Vijaywargiya" 
>> Hello,
>>
>> On the backend catalog application we have a link "Product Page"
>> button for navigating to the Product Detail page in Ecommerce
>> Component.
>> http://img714.imageshack.us/img714/9707/productpage.png
>>
>> https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644
>>
>> The value for ecommerce component is hardcoded on the link.
>>
>> > text="${uiLabelMap.ProductProductPage}" style="buttontext">
>>
>> 
>>
>> So if we create custom application then this page redirect to the
>> ecommerce application, which is not correct IMO. If we talk about
>> single custom application then we can maintain a patch and can fix
>> this line of code.
>> But how should we handle the case when we have multiple custom
>> component and we may need to redirect to the custom ecommerce
>> component that doesn't have ecommerce as a mount point and that
>> contains this specific product that we are editing.
>>
>> How can we handle this scenario?
>> Do we have any settings in OFBiz that can be used to handle this case?
>>
>> Any help on this would be greatly appreciated.
>>
>> -- 
>> Ashish Vijaywargiya
>> http://www.saveourtigers.com/
>>
> 
> 



Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread BJ Freeman
I have not thought this through all the way yet.
Plus David is working on a Multiple hosting solution so his approach may
not be the same.
First consideration is do you want the catalog to be independent of the
product store, say like for just a user login.
Not sure of the best practices about where to place actual links
Each Ecommerce has a web.xml and ofbiz-component.xml
The Web.xml lets you define parameters to be used in that specific
component. so you can use a parameter there.
you could consider taking data from the webapp in the ofbiz-component.xml.

it also has productstore entity and Website Entity.
if all your catalogs will be tied to a product store, you might use the
website entity as a source.

my 2cents



Ashish Vijaywargiya sent the following on 2/13/2010 7:16 AM:
> Hello,
> 
> On the backend catalog application we have a link "Product Page"
> button for navigating to the Product Detail page in Ecommerce
> Component.
> http://img714.imageshack.us/img714/9707/productpage.png
> 
> https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644
> 
> The value for ecommerce component is hardcoded on the link.
> 
>  text="${uiLabelMap.ProductProductPage}" style="buttontext">
> 
> 
> 
> So if we create custom application then this page redirect to the
> ecommerce application, which is not correct IMO. If we talk about
> single custom application then we can maintain a patch and can fix
> this line of code.
> But how should we handle the case when we have multiple custom
> component and we may need to redirect to the custom ecommerce
> component that doesn't have ecommerce as a mount point and that
> contains this specific product that we are editing.
> 
> How can we handle this scenario?
> Do we have any settings in OFBiz that can be used to handle this case?
> 
> Any help on this would be greatly appreciated.
> 
> --
> Ashish Vijaywargiya
> http://www.saveourtigers.com/
> 



Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Ruth Hoffman

Hi Jacques:
Need what? The original "Product Page" button?
TIA
Ruth

Jacques Le Roux wrote:

Do we really need this?

Jacques

From: "Ashish Vijaywargiya" 

Hello,

On the backend catalog application we have a link "Product Page"
button for navigating to the Product Detail page in Ecommerce
Component.
http://img714.imageshack.us/img714/9707/productpage.png

https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644

The value for ecommerce component is hardcoded on the link.


   


So if we create custom application then this page redirect to the
ecommerce application, which is not correct IMO. If we talk about
single custom application then we can maintain a patch and can fix
this line of code.
But how should we handle the case when we have multiple custom
component and we may need to redirect to the custom ecommerce
component that doesn't have ecommerce as a mount point and that
contains this specific product that we are editing.

How can we handle this scenario?
Do we have any settings in OFBiz that can be used to handle this case?

Any help on this would be greatly appreciated.

--
Ashish Vijaywargiya
http://www.saveourtigers.com/






Re: Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Jacques Le Roux

Do we really need this?

Jacques

From: "Ashish Vijaywargiya" 

Hello,

On the backend catalog application we have a link "Product Page"
button for navigating to the Product Detail page in Ecommerce
Component.
http://img714.imageshack.us/img714/9707/productpage.png

https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644

The value for ecommerce component is hardcoded on the link.


   


So if we create custom application then this page redirect to the
ecommerce application, which is not correct IMO. If we talk about
single custom application then we can maintain a patch and can fix
this line of code.
But how should we handle the case when we have multiple custom
component and we may need to redirect to the custom ecommerce
component that doesn't have ecommerce as a mount point and that
contains this specific product that we are editing.

How can we handle this scenario?
Do we have any settings in OFBiz that can be used to handle this case?

Any help on this would be greatly appreciated.

--
Ashish Vijaywargiya
http://www.saveourtigers.com/





Product Page redirects to Ecommerce component because value is hardcoded - what should be the case with Multiple Custom ecommerce component?

2010-02-13 Thread Ashish Vijaywargiya
Hello,

On the backend catalog application we have a link "Product Page"
button for navigating to the Product Detail page in Ecommerce
Component.
http://img714.imageshack.us/img714/9707/productpage.png

https://localhost:8443/catalog/control/EditProduct?productId=GZ-2644

The value for ecommerce component is hardcoded on the link.





So if we create custom application then this page redirect to the
ecommerce application, which is not correct IMO. If we talk about
single custom application then we can maintain a patch and can fix
this line of code.
But how should we handle the case when we have multiple custom
component and we may need to redirect to the custom ecommerce
component that doesn't have ecommerce as a mount point and that
contains this specific product that we are editing.

How can we handle this scenario?
Do we have any settings in OFBiz that can be used to handle this case?

Any help on this would be greatly appreciated.

--
Ashish Vijaywargiya
http://www.saveourtigers.com/