Hi R.S.,

using this method "getAssociatedStateList()" should be appropriate
from the "CommonWorkers.java"

but seem like there's no supporting data of German States is present either.

So, you will need to Edit ofbiz_trunk/framework/common/dataGeoData_DE.xml
and add entries like below for each State
    <GeoAssoc geoId="DE" geoIdTo="DE-BW" geoAssocTypeId="REGIONS"/>
    <GeoAssoc geoId="DE" geoIdTo="DE-BY" geoAssocTypeId="REGIONS"/>

--
Thanks & Regards
Atul Vani
Enterprise Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/
We are the Global Leaders in Apache OFBiz, Google 'ofbiz' and see for yourself.


R. S. wrote:
Hi,
I changed the method "getStateList" in the file "CommonWorkers.java"

from: EntityCondition condition = EntityCondition.makeCondition(EntityOperator.OR, EntityCondition.makeCondition("geoTypeId", "STATE"), EntityCondition.makeCondition("geoTypeId", "PROVINCE"),
               EntityCondition.makeCondition("geoTypeId", "TERRITORY"));

to: EntityCondition condition = EntityCondition.makeCondition(EntityOperator.AND, EntityCondition.makeCondition("geoTypeId", "STATE"), new EntityExpr("geoId", EntityOperator.LIKE, "DE-%"));

It works fine and shows me all the 16 German states. But during the build process I get a following warning:

classes:
[javac15] Compiling 1 source file to /home/.../ofbiz-9.04/framework/common/build/classes [javac15] /home/.../ofbiz-9.04/framework/common/src/org/ofbiz/common/CommonWorkers.java:72: warning: [deprecation] EntityExpr(java.lang.String,org.ofbiz.entity.condition.EntityComparisonOperator,java.lang.Object) in org.ofbiz.entity.condition.EntityExpr has been deprecated [javac15] EntityCondition.makeCondition("geoTypeId", "STATE"), new EntityExpr("geoId", EntityOperator.LIKE, "DE-%")); [javac15] ^
 [javac15] 1 warning

My question is, what is the best Method to search and present things like the 16 states to user. Like I did or to search for all states (there are approximately 170) and then to filter the things I need in the ftl?

Regards,
Rudolf

Reply via email to