Si, This is a great direction to go, but doing it universally like this is a bit much I think. In general doing anything globally like this and throwing out previous efforts is a bit of a dangerous thing (at best!). Many of these drop-downs have (or _had_...) conditions on them to limit the categories viewed, and losing those is no good. My thoughts on this are that the changes for these that have extra conditions should be reverted right away. For the long run we have 2 options, and these should be chosen on a case-by-case basis: 1. leave the drop-down 2. use a lookup window with parameters passed to it to have default constraints for the query Obviously #2 is a bit tougher and there isn't a lot of precedence for this, but after the initial curve it should be pretty trivial going forward. -David On Jan 9, 2007, at 11:43 AM, [hidden email] wrote: > Author: sichen > Date: Tue Jan 9 10:43:14 2007 > New Revision: 494515 > > URL: http://svn.apache.org/viewvc?view=rev&rev=494515 > Log: > Responding to a few comments on the list, we're changing all the > category lookups from dropdown to lookup, for users who have a lot > of categories this would be much more efficient > > Modified: > ofbiz/trunk/applications/accounting/widget/TaxAuthorityForms.xml > ofbiz/trunk/applications/product/webapp/catalog/catalog/ > ProdCatalogForms.xml > ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategory.ftl > ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategoryProducts.ftl > ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategoryRollup.ftl > ofbiz/trunk/applications/product/webapp/catalog/find/ > advancedsearch.ftl > ofbiz/trunk/applications/product/webapp/catalog/find/ > keywordsearch.ftl > ofbiz/trunk/applications/product/webapp/catalog/find/ > keywordsearchbox.ftl > ofbiz/trunk/applications/product/webapp/catalog/product/ > ProductForms.xml > ofbiz/trunk/applications/product/webapp/catalog/promo/ > EditProductPromoRules.ftl > ofbiz/trunk/applications/product/webapp/catalog/store/ > EditProductStoreSurveys.ftl > ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > controller.xml > ofbiz/trunk/applications/product/webapp/facility/facility/ > FacilityForms.xml > > Modified: ofbiz/trunk/applications/accounting/widget/ > TaxAuthorityForms.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ > accounting/widget/TaxAuthorityForms.xml? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/accounting/widget/ > TaxAuthorityForms.xml (original) > +++ ofbiz/trunk/applications/accounting/widget/ > TaxAuthorityForms.xml Tue Jan 9 10:43:14 2007 > @@ -218,15 +218,7 @@ > </drop-down> > </field> > <field name="productStoreId" title="$ > {uiLabelMap.ProductStoreId}"><lookup size="10" target-form- > name="LookupProductStore"/></field> > - <field name="productCategoryId" title="$ > {uiLabelMap.ProductCategory}"> > - <drop-down allow-empty="false"> > - <entity-options entity- > name="TaxAuthorityCategoryView" description="${description} [$ > {productCategoryId}]"> > - <entity-constraint name="taxAuthPartyId" env- > name="taxAuthPartyId"/> > - <entity-constraint name="taxAuthGeoId" env- > name="taxAuthGeoId"/> > - <entity-order-by field-name="description"/> > - </entity-options> > - </drop-down> > - </field> > + <field name="productCategoryId" title="$ > {uiLabelMap.ProductCategory}"><lookup target-form- > name="LookupProductCategory"></lookup></field> > <field name="titleTransferEnumId" title="$ > {uiLabelMap.AccountingTitleTransfer}"> > <drop-down allow-empty="true"> > <entity-options entity-name="Enumeration" key- > field-name="enumId" description="${description} [${enumCode}]"> > @@ -257,15 +249,7 @@ > </drop-down> > </field> > <field name="productStoreId" title="$ > {uiLabelMap.ProductStoreId}"><lookup size="10" target-form- > name="LookupProductStore"/></field> > - <field name="productCategoryId" title="$ > {uiLabelMap.ProductCategory}" tooltip="Use the Categories tab to > add other category options"> > - <drop-down allow-empty="false"> > - <entity-options entity- > name="TaxAuthorityCategoryView" description="${description} [$ > {productCategoryId}]"> > - <entity-constraint name="taxAuthPartyId" env- > name="taxAuthPartyId"/> > - <entity-constraint name="taxAuthGeoId" env- > name="taxAuthGeoId"/> > - <entity-order-by field-name="description"/> > - </entity-options> > - </drop-down> > - </field> > + <field name="productCategoryId" title="$ > {uiLabelMap.ProductCategory}"><lookup target-form- > name="LookupProductCategory"></lookup></field> > <field name="titleTransferEnumId" title="$ > {uiLabelMap.AccountingTitleTransfer}"> > <drop-down allow-empty="true"> > <entity-options entity-name="Enumeration" key- > field-name="enumId" description="${description} [${enumCode}]"> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/catalog/ > ProdCatalogForms.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/catalog/ProdCatalogForms.xml? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/catalog/ > ProdCatalogForms.xml (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/catalog/ > ProdCatalogForms.xml Tue Jan 9 10:43:14 2007 > @@ -140,13 +140,7 @@ > default-title-style="tableheadtext" default-widget- > style="inputBox" default-tooltip-style="tabletext"> > <auto-fields-service service- > name="addProductCategoryToProdCatalog"/> > <field name="prodCatalogId"><hidden/></field> > - <field name="productCategoryId" title="$ > {uiLabelMap.ProductCategoryId}" widget-style="selectBox"> > - <drop-down> > - <entity-options entity-name="ProductCategory" > description="${description} [${productCategoryId}]"> > - <entity-order-by field-name="description"/> > - </entity-options> > - </drop-down> > - </field> > + <field name="productCategoryId" title="$ > {uiLabelMap.ProductCategoryId}"><lookup target-form- > name="LookupProductCategory"></lookup></field> > <field name="prodCatalogCategoryTypeId" widget- > style="selectBox"> > <drop-down> > <entity-options entity- > name="ProdCatalogCategoryType" description="${description}"> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategory.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/category/EditCategory.ftl? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategory.ftl (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategory.ftl Tue Jan 9 10:43:14 2007 > @@ -172,17 +172,8 @@ > <td width="26%" align="right"><div class="tabletext">$ > {uiLabelMap.ProductPrimaryParentCategory}</div></td> > <td> </td> > <td width="74%"> > - <select name="primaryParentCategoryId" size="1" > class="selectbox"> > - <#if productCategory?has_content> > - <#if (productCategory.primaryParentCategoryId)?exists> > - <option value="$ > {productCategory.primaryParentCategoryId}">$ > {(primaryParentCategory.description)?if_exists} [${productCategory. > primaryParentCategoryId}]</option> > - </#if> > - </#if> > - <option value=""> </option> > - <#list categoryList as curProductCategory> > - <option value="${curProductCategory.productCategoryId}">$ > {curProductCategory.description?if_exists} [$ > {curProductCategory.productCategoryId}]</option> > - </#list> > - </select> > + <input type="text" class="inputBox" > name="primaryParentCategoryId" size="20" maxlength="20" value="$ > {requestParameters.SEARCH_CATEGORY_ID?if_exists}"/> > + <a href="javascript:call_fieldlookup2 > (document.productCategoryForm.primaryParentCategoryId,'LookupProductCa > tegory');"><img src='/images/fieldlookup.gif' width='15' > height='14' border='0' alt='Click here For Field Lookup'/></a> > </td> > </tr> > <tr> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategoryProducts.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/category/EditCategoryProducts.ftl? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategoryProducts.ftl (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategoryProducts.ftl Tue Jan 9 10:43:14 2007 > @@ -132,12 +132,8 @@ > <div class="head2">$ > {uiLabelMap.ProductCopyProductCategoryMembersToAnotherCategory}:</div> > <div class="tabletext"> > ${uiLabelMap.ProductTargetProductCategory}: > - <select name="productCategoryIdTo" class="selectBox"> > - <option value=""></option> > - <#list productCategories as productCategoryTo> > - <option value="$ > {(productCategoryTo.productCategoryId)?if_exists}">$ > {(productCategoryTo.description)?if_exists} [$ > {(productCategoryTo.productCategoryId)?if_exists}]</option> > - </#list> > - </select> > + <input type="text" class="inputBox" > name="productCategoryIdTo" size="20" maxlength="20"/> > + <a href="javascript:call_fieldlookup2 > (document.copyCategoryProductMembersForm.productCategoryIdTo,'LookupPr > oductCategory');"><img src='/images/fieldlookup.gif' width='15' > height='14' border='0' alt='Click here For Field Lookup'/></a> > <br/> > ${uiLabelMap.ProductOptionalFilterWithDate}: <input > type="text" size="20" name="validDate" class="inputBox"> > <a href="javascript:call_cal > (document.copyCategoryProductMembersForm.validDate, '${nowTimestamp? > string}');"><img src="/images/cal.gif" width="16" height="16" > border="0" alt="Calendar"></a> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategoryRollup.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/category/EditCategoryRollup.ftl? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategoryRollup.ftl (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/category/ > EditCategoryRollup.ftl Tue Jan 9 10:43:14 2007 > @@ -72,13 +72,8 @@ > <input type="hidden" name="productCategoryId" value="$ > {productCategoryId}"> > <input type="hidden" name="showProductCategoryId" value="$ > {productCategoryId}"> > <div class="tabletext">${uiLabelMap.CommonAddA} <b>$ > {uiLabelMap.ProductParent}</b> $ > {uiLabelMap.ProductCategorySelectCategoryAndEnterFromDate}:</div> > - <select name="parentProductCategoryId" class="selectBox"> > - <#list productCategoryCol as curCategory> > - <#if productCategoryId != curCategory.productCategoryId> > - <option value="${curCategory.productCategoryId}">$ > {curCategory.description?if_exists} [$ > {curCategory.productCategoryId}]</option> > - </#if> > - </#list> > - </select> > + <input type="text" class="inputBox" > name="parentProductCategoryId" size="20" maxlength="20" value="$ > {requestParameters.SEARCH_CATEGORY_ID?if_exists}"/> > + <a href="javascript:call_fieldlookup2 > (document.addParentForm.parentProductCategoryId,'LookupProductCategory > ');"><img src='/images/fieldlookup.gif' width='15' height='14' > border='0' alt='Click here For Field Lookup'/></a> > <input type="text" size="25" name="fromDate" class="inputBox"> > <a href="javascript:call_cal(document.addParentForm.fromDate, > null);"><img src="/images/cal.gif" width="16" height="16" > border="0" alt="Calendar"></a> > <input type="submit" value="${uiLabelMap.CommonAdd}"> > @@ -145,13 +140,8 @@ > <input type="hidden" name="showProductCategoryId" value="$ > {productCategoryId}"> > <input type="hidden" name="parentProductCategoryId" value="$ > {productCategoryId}"> > <div class="tabletext">${uiLabelMap.CommonAddA} <b>$ > {uiLabelMap.ProductChild}</b> $ > {uiLabelMap.ProductCategorySelectCategoryAndEnterFromDate}:</div> > - <select name="productCategoryId" class="selectBox"> > - <#list productCategoryCol as curCategory> > - <#if productCategoryId != curCategory.productCategoryId> > - <option value="${curCategory.productCategoryId}">$ > {curCategory.description?if_exists} [$ > {curCategory.productCategoryId}]</option> > - </#if> > - </#list> > - </select> > + <input type="text" class="inputBox" name="productCategoryId" > size="20" maxlength="20" value="$ > {requestParameters.SEARCH_CATEGORY_ID?if_exists}"/> > + <a href="javascript:call_fieldlookup2 > (document.addChildForm.productCategoryId,'LookupProductCategory');"><i > mg src='/images/fieldlookup.gif' width='15' height='14' border='0' > alt='Click here For Field Lookup'/></a> > <input type="text" size="25" name="fromDate" class="inputBox"> > <a href="javascript:call_cal(document.addChildForm.fromDate, > null);"><img src="/images/cal.gif" width="16" height="16" > border="0" alt="Calendar"></a> > <input type="submit" value="${uiLabelMap.CommonAdd}"> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/find/ > advancedsearch.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/find/advancedsearch.ftl? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/find/ > advancedsearch.ftl (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/find/ > advancedsearch.ftl Tue Jan 9 10:43:14 2007 > @@ -59,16 +59,8 @@ > </td> > <td valign="middle"> > <div class="tabletext"> > - <select class="selectBox" name="SEARCH_CATEGORY_ID"> > - <option value="">- $ > {uiLabelMap.ProductAnyCategory} -</option> > - <#list productCategories as productCategory> > - <#assign displayDesc = > productCategory.description?default("$ > {uiLabelMap.ProductNoDescription}")> > - <#if 18 < displayDesc?length> > - <#assign displayDesc = displayDesc > [0..15] + "..."> > - </#if> > - <option value="$ > {productCategory.productCategoryId}">${displayDesc} [$ > {productCategory.productCategoryId}]</option> > - </#list> > - </select> > + <input type="text" class="inputBox" > name="SEARCH_CATEGORY_ID" size="20" maxlength="20" value="$ > {requestParameters.SEARCH_CATEGORY_ID?if_exists}"/> > + <a href="javascript:call_fieldlookup2 > (document.advtokeywordsearchform.SEARCH_CATEGORY_ID,'LookupProductCate > gory');"><img src='/images/fieldlookup.gif' width='15' height='14' > border='0' alt='Click here For Field Lookup'/></a> > ${uiLabelMap.ProductIncludeSubCategories}? > ${uiLabelMap.CommonYes}<input type="radio" > name="SEARCH_SUB_CATEGORIES" value="Y" checked/> > ${uiLabelMap.CommonNo}<input type="radio" > name="SEARCH_SUB_CATEGORIES" value="N"/> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/find/ > keywordsearch.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/find/keywordsearch.ftl? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/find/ > keywordsearch.ftl (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/find/ > keywordsearch.ftl Tue Jan 9 10:43:14 2007 > @@ -110,18 +110,10 @@ > <hr class="sepbar"/> > > <div class="tabletext"> > -<form method="post" action="<@ofbizUrl>searchRemoveFromCategory</ > @ofbizUrl>" > +<form method="post" action="<@ofbizUrl>searchRemoveFromCategory</ > @ofbizUrl>" name="searchRemoveFromCategory"> > <b>${uiLabelMap.ProductRemoveResultsFrom} </b> $ > {uiLabelMap.ProductCategory}: > - <select class="selectBox" name="SE_SEARCH_CATEGORY_ID"> > - <option value="">- ${uiLabelMap.ProductAnyCategory} -</option> > - <#list productCategories as productCategory> > - <#assign displayDesc = productCategory.description? > default("No Description")> > - <#if 28 < displayDesc?length> > - <#assign displayDesc = displayDesc[0..25] + "..."> > - </#if> > - <option value="${productCategory.productCategoryId}">$ > {displayDesc} [${productCategory.productCategoryId}]</option> > - </#list> > - </select> > + <input type="text" class="inputBox" name="SE_SEARCH_CATEGORY_ID" > size="20" maxlength="20"/> > + <a href="javascript:call_fieldlookup2 > (document.searchRemoveFromCategory.SE_SEARCH_CATEGORY_ID,'LookupProduc > tCategory');"><img src='/images/fieldlookup.gif' width='15' > height='14' border='0' alt='Click here For Field Lookup'/></a> > <input type="hidden" name="clearSearch" value="N"> > <input type="submit" value="${uiLabelMap.CommonRemove}" > class="smallSubmit"><br/> > </form> > @@ -132,16 +124,8 @@ > <div class="tabletext"> > <form method="post" action="<@ofbizUrl>searchExpireFromCategory</ > @ofbizUrl>" name="searchExpireFromCategory"> > <b>${uiLabelMap.ProductExpireResultsFrom} </b> $ > {uiLabelMap.ProductCategory}: > - <select class="selectBox" name="SE_SEARCH_CATEGORY_ID"> > - <option value="">- ${uiLabelMap.ProductAnyCategory} -</option> > - <#list productCategories as productCategory> > - <#assign displayDesc = productCategory.description? > default("No Description")> > - <#if 28 < displayDesc?length> > - <#assign displayDesc = displayDesc[0..25] + "..."> > - </#if> > - <option value="${productCategory.productCategoryId}">$ > {displayDesc} [${productCategory.productCategoryId}]</option> > - </#list> > - </select> > + <input type="text" class="inputBox" name="SE_SEARCH_CATEGORY_ID" > size="20" maxlength="20"/> > + <a href="javascript:call_fieldlookup2 > (document.searchExpireFromCategory.SE_SEARCH_CATEGORY_ID,'LookupProduc > tCategory');"><img src='/images/fieldlookup.gif' width='15' > height='14' border='0' alt='Click here For Field Lookup'/></a> > ${uiLabelMap.CommonThru}<input type="text" size="25" > name="thruDate" class="inputBox"><a href="javascript:call_cal > (document.searchExpireFromCategory.thruDate, null);"><img src="/ > images/cal.gif" width="16" height="16" border="0" alt="Calendar"></a> > <input type="hidden" name="clearSearch" value="N"> > <input type="submit" value="${uiLabelMap.CommonExpire}" > class="smallSubmit"><br/> > @@ -153,15 +137,8 @@ > <div class="tabletext"> > <form method="post" action="<@ofbizUrl>searchAddToCategory</ > @ofbizUrl>" name="searchAddToCategory"> > <b>${uiLabelMap.ProductAddResultsTo} </b> $ > {uiLabelMap.ProductCategory}: > - <select class="selectBox" name="SE_SEARCH_CATEGORY_ID"> > - <#list productCategories as productCategory> > - <#assign displayDesc = productCategory.description? > default("No Description")> > - <#if 28 < displayDesc?length> > - <#assign displayDesc = displayDesc[0..25] + "..."> > - </#if> > - <option value="${productCategory.productCategoryId}">$ > {displayDesc} [${productCategory.productCategoryId}]</option> > - </#list> > - </select> > + <input type="text" class="inputBox" name="SE_SEARCH_CATEGORY_ID" > size="20" maxlength="20"/> > + <a href="javascript:call_fieldlookup2 > (document.searchAddToCategory.SE_SEARCH_CATEGORY_ID,'LookupProductCate > gory');"><img src='/images/fieldlookup.gif' width='15' height='14' > border='0' alt='Click here For Field Lookup'/></a> > ${uiLabelMap.CommonFrom}<input type="text" size="25" > name="fromDate" class="inputBox"><a href="javascript:call_cal > (document.searchAddToCategory.fromDate, null);"><img src="/images/ > cal.gif" width="16" height="16" border="0" alt="Calendar"></a> > <input type="hidden" name="clearSearch" value="N"> > <input type="submit" value="${uiLabelMap.ProductAddToCategory}" > class="smallSubmit"><br/> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/find/ > keywordsearchbox.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/find/keywordsearchbox.ftl? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/find/ > keywordsearchbox.ftl (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/find/ > keywordsearchbox.ftl Tue Jan 9 10:43:14 2007 > @@ -46,7 +46,9 @@ > <form name="keywordsearchform" method="post" > action="<@ofbizUrl>keywordsearch?VIEW_SIZE=25</@ofbizUrl>" > style="margin: 0;"> > <div class="tabletext">$ > {uiLabelMap.ProductKeywords}: <input type="text" class="inputBox" > name="SEARCH_STRING" size="20" maxlength="50" value="$ > {requestParameters.SEARCH_STRING?if_exists}"/></div> > <div class="tabletext"> > - ${uiLabelMap.ProductCategoryId}: <input > type="text" class="inputBox" name="SEARCH_CATEGORY_ID" size="20" > maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID? > if_exists}"/> > + ${uiLabelMap.ProductCategoryId}: > + <input type="text" class="inputBox" > name="SEARCH_CATEGORY_ID" size="18" maxlength="20" value="$ > {requestParameters.SEARCH_CATEGORY_ID?if_exists}"/> > + <a href="javascript:call_fieldlookup2 > (document.keywordsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory' > );"><img src='/images/fieldlookup.gif' width='15' height='14' > border='0' alt='Click here For Field Lookup'/></a> > </div> > <div class="tabletext"> > ${uiLabelMap.CommonNoContains}<input > type="checkbox" name="SEARCH_CONTAINS" value="N" <#if > requestParameters.SEARCH_CONTAINS?if_exists == > "N">checked="checked"</#if>/> > @@ -59,21 +61,13 @@ > <div> > <form name="advancedsearchform" method="post" > action="<@ofbizUrl>advancedsearch</@ofbizUrl>" style="margin: 0;"> > <div class="tabletext"> > - ${uiLabelMap.ProductCategoryId}: <input > type="text" class="inputBox" name="SEARCH_CATEGORY_ID" size="20" > maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID? > if_exists}"/> > + ${uiLabelMap.ProductCategoryId}: > + <input type="text" class="inputBox" > name="SEARCH_CATEGORY_ID" size="18" maxlength="20" value="$ > {requestParameters.SEARCH_CATEGORY_ID?if_exists}"/> > + <a href="javascript:call_fieldlookup2 > (document.advancedsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory > ');"><img src='/images/fieldlookup.gif' width='15' height='14' > border='0' alt='Click here For Field Lookup'/></a> > </div> > <div class="tabletext"> > <a > href="javascript:document.advancedsearchform.submit()" > class="buttontext">${uiLabelMap.ProductAdvancedSearch}</a> > </div> > - <select class="selectBox" name="DUMMYCAT" > onchange="changeCategory()" style="width: 200px;"> > - <option value="">-$ > {uiLabelMap.ProductSelectCategory}-</option> > - <#list productCategories as productCategory> > - <#assign displayDesc = > productCategory.description?default("No Description")> > - <#if 18 < displayDesc?length> > - <#assign displayDesc = displayDesc > [0..15] + "..."> > - </#if> > - <option value="$ > {productCategory.productCategoryId}">${displayDesc} [$ > {productCategory.productCategoryId}]</option> > - </#list> > - </select> > </form> > </div> > <div> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ > ProductForms.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/product/ProductForms.xml? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/product/ > ProductForms.xml (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/product/ > ProductForms.xml Tue Jan 9 10:43:14 2007 > @@ -47,14 +47,7 @@ > </entity-options> > </drop-down> > </field> > - <field name="primaryProductCategoryId" title="$ > {uiLabelMap.ProductPrimaryCategory}" widget-style="selectBox"> > - <drop-down allow-empty="true"> > - <entity-options entity- > name="ProductCategoryAndMember" key-field-name="productCategoryId" > description="${description} [${productCategoryId}]"> > - <entity-constraint name="productId" env- > name="product.productId"/> > - <entity-order-by field-name="description"/> > - </entity-options> > - </drop-down> > - </field> > + <field name="primaryProductCategoryId" title="$ > {uiLabelMap.ProductPrimaryCategory}"><lookup target-form- > name="LookupProductCategory"></lookup></field> > > <field name="internalName" title="$ > {uiLabelMap.ProductInternalName}"><text size="30" maxlength="60"/></ > field> > <field name="brandName" title="$ > {uiLabelMap.ProductBrandName}" ><text size="30" maxlength="60"/></ > field> > @@ -315,14 +308,7 @@ > default-title-style="tableheadtext" default-widget- > style="inputBox" default-tooltip-style="tabletext"> > <auto-fields-service service- > name="safeAddProductToCategory"/> > <field name="productId" title="$ > {uiLabelMap.ProductProductId}" map-name="product"><hidden/></field> > - <field name="productCategoryId" title="$ > {uiLabelMap.ProductProductCategoryId}" widget-style="selectBox"> > - <drop-down> > - <entity-options entity-name="ProductCategory" > description="${description} [${productCategoryId}]"> > - <entity-constraint name="showInSelect" > value="N" operator="not-equals"/> > - <entity-order-by field-name="description"/> > - </entity-options> > - </drop-down> > - </field> > + <field name="productCategoryId" title="$ > {uiLabelMap.ProductProductCategoryId}"><lookup target-form- > name="LookupProductCategory"></lookup></field> > <field name="fromDate" title="$ > {uiLabelMap.CommonFromDate}" ></field> > <field name="thruDate" title="$ > {uiLabelMap.CommonThruDate}" ></field> > <field name="sequenceNum" title="$ > {uiLabelMap.ProductSequenceNum}" ></field> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/promo/ > EditProductPromoRules.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/promo/EditProductPromoRules.ftl? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/promo/ > EditProductPromoRules.ftl (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/promo/ > EditProductPromoRules.ftl Tue Jan 9 10:43:14 2007 > @@ -108,16 +108,13 @@ > </div> > </#list> > <div class="tabletext"> > - <form method="post" > action="<@ofbizUrl>createProductPromoCategory</@ofbizUrl>"> > + <form method="post" > action="<@ofbizUrl>createProductPromoCategory</@ofbizUrl>" > name="createProductPromoCategoryConditions"> > <input type="hidden" > name="productPromoId" value="${productPromoId}"> > <input type="hidden" > name="productPromoRuleId" value="$ > {productPromoCond.productPromoRuleId}"> > <input type="hidden" > name="productPromoActionSeqId" value="_NA_"> > <input type="hidden" > name="productPromoCondSeqId" value="$ > {productPromoCond.productPromoCondSeqId}"> > - <select > name="productCategoryId" class="selectBox"> > - <#list productCategories > as productCategory> > - <option value="$ > {productCategory.productCategoryId}">${productCategory.description? > if_exists}</option> > - </#list> > - </select> > + <input type="text" > class="inputBox" name="productCategoryId" size="20" maxlength="20"/> > + <a > href="javascript:call_fieldlookup2 > (document.createProductPromoCategoryConditions.productCategoryId,'Look > upProductCategory');"><img src='/images/fieldlookup.gif' width='15' > height='14' border='0' alt='Click here For Field Lookup'/></a> > <select > name="productPromoApplEnumId" class="selectBox"> > <#list > productPromoApplEnums as productPromoApplEnum> > <option value="$ > {productPromoApplEnum.enumId}">${productPromoApplEnum.get > ("description",locale)}</option> > @@ -261,16 +258,13 @@ > </div> > </#list> > <div class="tabletext"> > - <form method="post" > action="<@ofbizUrl>createProductPromoCategory</@ofbizUrl>"> > + <form method="post" > action="<@ofbizUrl>createProductPromoCategory</@ofbizUrl>" > name="createProductPromoCategoryActions"> > <input type="hidden" > name="productPromoId" value="${productPromoId}"> > <input type="hidden" > name="productPromoRuleId" value="$ > {productPromoAction.productPromoRuleId}"> > <input type="hidden" > name="productPromoActionSeqId" value="$ > {productPromoAction.productPromoActionSeqId}"> > <input type="hidden" > name="productPromoCondSeqId" value="_NA_"> > - <select > name="productCategoryId" class="selectBox"> > - <#list productCategories > as productCategory> > - <option value="$ > {productCategory.productCategoryId}">${productCategory.description? > if_exists}</option> > - </#list> > - </select> > + <input type="text" > class="inputBox" name="productCategoryId" size="20" maxlength="20"/> > + <a > href="javascript:call_fieldlookup2 > (document.createProductPromoCategoryActions.productCategoryId,'LookupP > roductCategory');"><img src='/images/fieldlookup.gif' width='15' > height='14' border='0' alt='Click here For Field Lookup'/></a> > <select > name="productPromoApplEnumId" class="selectBox"> > <#list > productPromoApplEnums as productPromoApplEnum> > <option value="$ > {productPromoApplEnum.enumId}">${productPromoApplEnum.get > ("description",locale)}</option> > @@ -383,16 +377,13 @@ > </div> > </#list> > <div class="tabletext"> > - <form method="post" > action="<@ofbizUrl>createProductPromoCategory</@ofbizUrl>"> > + <form method="post" > action="<@ofbizUrl>createProductPromoCategory</@ofbizUrl>" > name="createProductPromoCategoryPromotions"> > <input type="hidden" name="productPromoId" value="$ > {productPromoId}"> > <input type="hidden" name="productPromoRuleId" > value="_NA_"> > <input type="hidden" > name="productPromoActionSeqId" value="_NA_"> > <input type="hidden" name="productPromoCondSeqId" > value="_NA_"> > - <select name="productCategoryId" class="selectBox"> > - <#list productCategories as productCategory> > - <option value="$ > {productCategory.productCategoryId}">${productCategory.description? > if_exists}</option> > - </#list> > - </select> > + <input type="text" class="inputBox" > name="productCategoryId" size="20" maxlength="20"/> > + <a href="javascript:call_fieldlookup2 > (document.createProductPromoCategoryPromotions.productCategoryId,'Look > upProductCategory');"><img src='/images/fieldlookup.gif' width='15' > height='14' border='0' alt='Click here For Field Lookup'/></a> > <select name="productPromoApplEnumId" > class="selectBox"> > <#list productPromoApplEnums as > productPromoApplEnum> > <option value="$ > {productPromoApplEnum.enumId}">${productPromoApplEnum.get > ("description",locale)}</option> > > Modified: ofbiz/trunk/applications/product/webapp/catalog/store/ > EditProductStoreSurveys.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/catalog/store/EditProductStoreSurveys.ftl? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/catalog/store/ > EditProductStoreSurveys.ftl (original) > +++ ofbiz/trunk/applications/product/webapp/catalog/store/ > EditProductStoreSurveys.ftl Tue Jan 9 10:43:14 2007 > @@ -81,12 +81,8 @@ > <tr> > <td><span class="tableheadtext">$ > {uiLabelMap.ProductCategoryId}</span></td> > <td> > - <select class="selectBox" name="productCategoryId"> > - <option></option> > - <#list productCategories as category> > - <option value="${category.productCategoryId}">$ > {category.description?default("[$ > {uiLabelMap.ProductNoDescription}]")}</option> > - </#list> > - </select> > + <input type="text" class="inputBox" > name="productCategoryId" size="20" maxlength="20"/> > + <a href="javascript:call_fieldlookup2 > (document.addSurvey.productCategoryId,'LookupProductCategory');"><img > src='/images/fieldlookup.gif' width='15' height='14' border='0' > alt='Click here For Field Lookup'/></a> > </td> > </tr> > <tr> > > Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > controller.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/facility/WEB-INF/controller.xml? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > controller.xml (original) > +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > controller.xml Tue Jan 9 10:43:14 2007 > @@ -111,6 +111,10 @@ > <security auth="true" https="true"/> > <response name="success" type="view" > value="LookupVariantProduct"/> > </request-map> > + <request-map uri="LookupProductCategory"> > + <security auth="true" https="true"/> > + <response name="success" type="view" > value="LookupProductCategory"/> > + </request-map> > <request-map uri="LookupFacilityLocation"> > <security auth="true" https="true"/> > <response name="success" type="view" > value="LookupFacilityLocation"/> > @@ -1006,6 +1010,7 @@ > <view-map name="LookupPurchaseOrderHeaderAndShipInfo" > type="screen" page="component://order/widget/ordermgr/ > LookupScreens.xml#LookupPurchaseOrderHeaderAndShipInfo"/> > <view-map name="LookupProduct" page="component://product/ > widget/catalog/LookupScreens.xml#LookupProduct" type="screen"/> > <view-map name="LookupVariantProduct" page="component:// > product/widget/catalog/LookupScreens.xml#LookupVariantProduct" > type="screen"/> > + <view-map name="LookupProductCategory" type="screen" > page="component://product/widget/catalog/ > LookupScreens.xml#LookupProductCategory"/> > <view-map name="LookupFacilityLocation" page="component:// > product/widget/facility/LookupScreens.xml#LookupFacilityLocation" > type="screen"/> > <view-map name="LookupPartyName" type="screen" > page="component://party/widget/partymgr/ > LookupScreens.xml#LookupPartyName"/> > > > Modified: ofbiz/trunk/applications/product/webapp/facility/facility/ > FacilityForms.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/facility/facility/FacilityForms.xml? > view=diff&rev=494515&r1=494514&r2=494515 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/facility/facility/ > FacilityForms.xml (original) > +++ ofbiz/trunk/applications/product/webapp/facility/facility/ > FacilityForms.xml Tue Jan 9 10:43:14 2007 > @@ -69,14 +69,7 @@ > </entity-options> > </drop-down> > </field> > - <field name="searchInProductCategoryId" title="$ > {uiLabelMap.ProductCategory}" widget-style="selectBox"> > - <drop-down allow-empty="true"> > - <entity-options entity-name="ProductCategory" key- > field-name="productCategoryId" description="${description} [$ > {productCategoryId}]"> > - <entity-constraint name="showInSelect" > value="N" operator="not-equals"/> > - <entity-order-by field-name="description"/> > - </entity-options> > - </drop-down> > - </field> > + <field name="searchInProductCategoryId" title="$ > {uiLabelMap.ProductCategory}"><lookup target-form- > name="LookupProductCategory"></lookup></field> > <field name="productSupplierId" title="$ > {uiLabelMap.ProductSupplier}" widget-style="selectBox"> > <drop-down allow-empty="true"> > <entity-options entity- > name="PartyRoleAndPartyDetail" key-field-name="partyId" > description="${groupName} [${partyId}]"> > > smime.p7s (3K) Download Attachment |
David E Jones wrote:
> > Si, > > This is a great direction to go, but doing it universally like this is > a bit much I think. In general doing anything globally like this and > throwing out previous efforts is a bit of a dangerous thing (at best!). > > Many of these drop-downs have (or _had_...) conditions on them to > limit the categories viewed, and losing those is no good. > > My thoughts on this are that the changes for these that have extra > conditions should be reverted right away. For the long run we have 2 > options, and these should be chosen on a case-by-case basis: > > 1. leave the drop-down > 2. use a lookup window with parameters passed to it to have default > constraints for the query > > Obviously #2 is a bit tougher and there isn't a lot of precedence for > this, but after the initial curve it should be pretty trivial going > forward. > > -David > > I reverted the one in TaxAuthorityForms.xml. For the showInSelect I'm not quite sure what we should do. What is the idea of the "showInSelect" field? I'm thinking it'd be more flexible to use the lookup box and let the user decide what to see/not to see rather than encoding that in the database. Si |
On Jan 9, 2007, at 2:02 PM, Si Chen wrote: > David E Jones wrote: >> >> Si, >> >> This is a great direction to go, but doing it universally like >> this is a bit much I think. In general doing anything globally >> like this and throwing out previous efforts is a bit of a >> dangerous thing (at best!). >> >> Many of these drop-downs have (or _had_...) conditions on them to >> limit the categories viewed, and losing those is no good. >> >> My thoughts on this are that the changes for these that have extra >> conditions should be reverted right away. For the long run we have >> 2 options, and these should be chosen on a case-by-case basis: >> >> 1. leave the drop-down >> 2. use a lookup window with parameters passed to it to have >> default constraints for the query >> >> Obviously #2 is a bit tougher and there isn't a lot of precedence >> for this, but after the initial curve it should be pretty trivial >> going forward. > I reverted the one in TaxAuthorityForms.xml. > > For the showInSelect I'm not quite sure what we should do. What is > the idea of the "showInSelect" field? I'm thinking it'd be more > flexible to use the lookup box and let the user decide what to see/ > not to see rather than encoding that in the database. It should be okay to ignore the showInSelect field for these. The whole point of that was to have a way to keep the drop-downs from having too many categories in them, ie to leave out certain auto- created and maintained categories. When using a look-up those should not be needed as hopefully all searches will be constrained in other ways by the user. -David smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |