What ever happened to discussing data model changes before going ahead with them? If I'm not wrong the point of using a Content record was to simplify usage for end users so they only have to enter the bare minimum. It also reduces duplication of the code across multiple sites, if a change is needed then you only have to update the content record.
Since you weren't the original committer of the feature it might be a bit more polite to at least discuss design changes before going ahead with them. I won't even get started on data model deprecation and migration services. Regards Scott On 13/05/2011, at 9:04 PM, [hidden email] wrote: > Author: hansbak > Date: Fri May 13 09:04:09 2011 > New Revision: 1102617 > > URL: http://svn.apache.org/viewvc?rev=1102617&view=rev > Log: > enlarge analyticsCode field and remove content field from webanalytics entity > > Modified: > ofbiz/trunk/applications/product/entitydef/entitymodel.xml > ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml > ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl > ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml > > Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > ============================================================================== > --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original) > +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Fri May 13 09:04:09 2011 > @@ -4764,10 +4764,9 @@ under the License. > <field name="productStoreId" type="id-ne"></field> > <field name="webAnalyticsTypeId" type="id-ne"></field> > <field name="webSiteId" type="id"></field> > - <field name="webAnalyticsCode" type="value"></field> > + <field name="webAnalyticsCode" type="very-long"><description>copy in here the analitics javascript code without the beginning- and end<script> tags</description></field> > <field name="isEnabled" type="indicator"></field> > <field name="description" type="description"></field> > - <field name="contentId" type="id"></field> > <prim-key field="productStoreId"/> > <prim-key field="webAnalyticsTypeId"/> > <relation type="one" fk-name="WANA_PROD_STORE" rel-entity-name="ProductStore"> > @@ -4779,9 +4778,6 @@ under the License. > <relation type="one" fk-name="WANA_WEBSITE" rel-entity-name="WebSite"> > <key-map field-name="webSiteId"/> > </relation> > - <relation type="one-nofk" fk-name="WANA_CNT_CNT" rel-entity-name="Content"> > - <key-map field-name="contentId"/> > - </relation> > </entity> > > <entity entity-name="WebAnalyticsType" package-name="org.ofbiz.product.catalog" > > Modified: ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > ============================================================================== > --- ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml (original) > +++ ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml Fri May 13 09:04:09 2011 > @@ -44,7 +44,6 @@ under the License. > </entity-options> > </drop-down> > </field> > - <field name="contentId"><text-find/></field> > <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> > </form> > > @@ -68,13 +67,6 @@ under the License. > <field name="webAnalyticsTypeId" title="${uiLabelMap.CommonType}"><display-entity entity-name="WebAnalyticsType"/></field> > <field name="isEnabled" title="${uiLabelMap.CommonEnabled}" sort-field="true"><display/></field> > <field name="webSiteId" sort-field="true"><display/></field> > - <field name="contentId" widget-style="buttontext"> > - <display-entity entity-name="Content"> > - <sub-hyperlink target="/content/control/editContent" target-type="inter-app" description="${contentId}" link-style="buttontext"> > - <parameter param-name="contentId"/> > - </sub-hyperlink> > - </display-entity> > - </field> > <field name="editLink" title="${uiLabelMap.CommonEdit}" widget-style="buttontext"> > <hyperlink also-hidden="false" description="${uiLabelMap.CommonEdit}" target="EditWebAnalyticsConfig"> > <parameter param-name="productStoreId"/> > @@ -118,9 +110,6 @@ under the License. > <option key="N" description="${uiLabelMap.CommonNo}"/> > </drop-down> > </field> > - <field name="contentId"> > - <lookup target-form-name="LookupContent"/> > - </field> > <field use-when="webAnalyticsConfig!=null" name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> > <field use-when="webAnalyticsConfig==null" name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field> > </form> > > Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl?rev=1102617&r1=1102616&r2=1102617&view=diff > ============================================================================== > --- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl (original) > +++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl Fri May 13 09:04:09 2011 > @@ -88,7 +88,7 @@ under the License. > <#if metaKeywords?exists> > <meta name="keywords" content="${metaKeywords}"/> > </#if> > - <#if webAnalyticsConfigs?exists> > + <#if webAnalyticsConfigs?has_content> > <script language="JavaScript" type="text/javascript"> > <#list webAnalyticsConfigs as webAnalyticsConfig> > ${StringUtil.wrapString(webAnalyticsConfig.webAnalyticsCode?if_exists)} > > Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > ============================================================================== > --- ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml (original) > +++ ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml Fri May 13 09:04:09 2011 > @@ -57,6 +57,7 @@ under the License. > <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/> > <entity-and list="webAnalyticsConfigs" entity-name="WebAnalyticsConfig"> > <field-map field-name="webSiteId"/> > + <field-map field-name="isEnabled" value="Y"/> > </entity-and> > </actions> > <widgets> > > smime.p7s (3K) Download Attachment |
Scott, please judge after you study.
These entities were added for a reason a cannot see. They are not used anywhere as simply for file maintenance. In the current form i had to go to the content manager to create a content, data resource and electronic text entity. then add a a record connected to it and still there is no example in e-commerce how to use it. These 2 entities can be completely replaced by a blob field in the website entity containing the javascript to be included in the website. At the moment i choose to simply modify so it can be used ad is useful now. As usual you revert if you do not like it. Regards, Hans On Sat, 2011-05-14 at 18:51 +1200, Scott Gray wrote: > What ever happened to discussing data model changes before going ahead with them? If I'm not wrong the point of using a Content record was to simplify usage for end users so they only have to enter the bare minimum. It also reduces duplication of the code across multiple sites, if a change is needed then you only have to update the content record. > > Since you weren't the original committer of the feature it might be a bit more polite to at least discuss design changes before going ahead with them. I won't even get started on data model deprecation and migration services. > > Regards > Scott > > On 13/05/2011, at 9:04 PM, [hidden email] wrote: > > > Author: hansbak > > Date: Fri May 13 09:04:09 2011 > > New Revision: 1102617 > > > > URL: http://svn.apache.org/viewvc?rev=1102617&view=rev > > Log: > > enlarge analyticsCode field and remove content field from webanalytics entity > > > > Modified: > > ofbiz/trunk/applications/product/entitydef/entitymodel.xml > > ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml > > ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl > > ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml > > > > Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original) > > +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Fri May 13 09:04:09 2011 > > @@ -4764,10 +4764,9 @@ under the License. > > <field name="productStoreId" type="id-ne"></field> > > <field name="webAnalyticsTypeId" type="id-ne"></field> > > <field name="webSiteId" type="id"></field> > > - <field name="webAnalyticsCode" type="value"></field> > > + <field name="webAnalyticsCode" type="very-long"><description>copy in here the analitics javascript code without the beginning- and end<script> tags</description></field> > > <field name="isEnabled" type="indicator"></field> > > <field name="description" type="description"></field> > > - <field name="contentId" type="id"></field> > > <prim-key field="productStoreId"/> > > <prim-key field="webAnalyticsTypeId"/> > > <relation type="one" fk-name="WANA_PROD_STORE" rel-entity-name="ProductStore"> > > @@ -4779,9 +4778,6 @@ under the License. > > <relation type="one" fk-name="WANA_WEBSITE" rel-entity-name="WebSite"> > > <key-map field-name="webSiteId"/> > > </relation> > > - <relation type="one-nofk" fk-name="WANA_CNT_CNT" rel-entity-name="Content"> > > - <key-map field-name="contentId"/> > > - </relation> > > </entity> > > > > <entity entity-name="WebAnalyticsType" package-name="org.ofbiz.product.catalog" > > > > Modified: ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml (original) > > +++ ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml Fri May 13 09:04:09 2011 > > @@ -44,7 +44,6 @@ under the License. > > </entity-options> > > </drop-down> > > </field> > > - <field name="contentId"><text-find/></field> > > <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> > > </form> > > > > @@ -68,13 +67,6 @@ under the License. > > <field name="webAnalyticsTypeId" title="${uiLabelMap.CommonType}"><display-entity entity-name="WebAnalyticsType"/></field> > > <field name="isEnabled" title="${uiLabelMap.CommonEnabled}" sort-field="true"><display/></field> > > <field name="webSiteId" sort-field="true"><display/></field> > > - <field name="contentId" widget-style="buttontext"> > > - <display-entity entity-name="Content"> > > - <sub-hyperlink target="/content/control/editContent" target-type="inter-app" description="${contentId}" link-style="buttontext"> > > - <parameter param-name="contentId"/> > > - </sub-hyperlink> > > - </display-entity> > > - </field> > > <field name="editLink" title="${uiLabelMap.CommonEdit}" widget-style="buttontext"> > > <hyperlink also-hidden="false" description="${uiLabelMap.CommonEdit}" target="EditWebAnalyticsConfig"> > > <parameter param-name="productStoreId"/> > > @@ -118,9 +110,6 @@ under the License. > > <option key="N" description="${uiLabelMap.CommonNo}"/> > > </drop-down> > > </field> > > - <field name="contentId"> > > - <lookup target-form-name="LookupContent"/> > > - </field> > > <field use-when="webAnalyticsConfig!=null" name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> > > <field use-when="webAnalyticsConfig==null" name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field> > > </form> > > > > Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl?rev=1102617&r1=1102616&r2=1102617&view=diff > > ============================================================================== > > --- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl (original) > > +++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl Fri May 13 09:04:09 2011 > > @@ -88,7 +88,7 @@ under the License. > > <#if metaKeywords?exists> > > <meta name="keywords" content="${metaKeywords}"/> > > </#if> > > - <#if webAnalyticsConfigs?exists> > > + <#if webAnalyticsConfigs?has_content> > > <script language="JavaScript" type="text/javascript"> > > <#list webAnalyticsConfigs as webAnalyticsConfig> > > ${StringUtil.wrapString(webAnalyticsConfig.webAnalyticsCode?if_exists)} > > > > Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > > ============================================================================== > > --- ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml (original) > > +++ ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml Fri May 13 09:04:09 2011 > > @@ -57,6 +57,7 @@ under the License. > > <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/> > > <entity-and list="webAnalyticsConfigs" entity-name="WebAnalyticsConfig"> > > <field-map field-name="webSiteId"/> > > + <field-map field-name="isEnabled" value="Y"/> > > </entity-and> > > </actions> > > <widgets> > > > > > -- Ofbiz on twitter: http://twitter.com/apache_ofbiz Myself on twitter: http://twitter.com/hansbak Antwebsystems.com: Quality services for competitive rates. |
In reply to this post by Scott Gray-2
OK i will reply again.
I did it the way I did it to make an already committed halfway implemented function useful. Asking to remove these entities i did not want to ask for, to hurt not too many feelings. I thought we did agree there was no ownership of code? I would have discussed it, it if was an important function, however it is not. It is simply a way of including a javascript snippet to be able to add statistics. If we want to do it properly, my proposal is to remove the 2 entities: WebAnalyticsConfig and WebAnalyticsType. and add a clob field to the website entity called: endHeaderinsert what is now the field webAnalyticsCode in WebAnalyticsConfig. This inserted javascriptcode is only dependent on the website and i see no reason to save it in a content/dataresource/electonic entity field. Regards, Hans On Sat, 2011-05-14 at 18:51 +1200, Scott Gray wrote: > What ever happened to discussing data model changes before going ahead with them? If I'm not wrong the point of using a Content record was to simplify usage for end users so they only have to enter the bare minimum. It also reduces duplication of the code across multiple sites, if a change is needed then you only have to update the content record. > > Since you weren't the original committer of the feature it might be a bit more polite to at least discuss design changes before going ahead with them. I won't even get started on data model deprecation and migration services. > > Regards > Scott > > On 13/05/2011, at 9:04 PM, [hidden email] wrote: > > > Author: hansbak > > Date: Fri May 13 09:04:09 2011 > > New Revision: 1102617 > > > > URL: http://svn.apache.org/viewvc?rev=1102617&view=rev > > Log: > > enlarge analyticsCode field and remove content field from webanalytics entity > > > > Modified: > > ofbiz/trunk/applications/product/entitydef/entitymodel.xml > > ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml > > ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl > > ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml > > > > Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original) > > +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Fri May 13 09:04:09 2011 > > @@ -4764,10 +4764,9 @@ under the License. > > <field name="productStoreId" type="id-ne"></field> > > <field name="webAnalyticsTypeId" type="id-ne"></field> > > <field name="webSiteId" type="id"></field> > > - <field name="webAnalyticsCode" type="value"></field> > > + <field name="webAnalyticsCode" type="very-long"><description>copy in here the analitics javascript code without the beginning- and end<script> tags</description></field> > > <field name="isEnabled" type="indicator"></field> > > <field name="description" type="description"></field> > > - <field name="contentId" type="id"></field> > > <prim-key field="productStoreId"/> > > <prim-key field="webAnalyticsTypeId"/> > > <relation type="one" fk-name="WANA_PROD_STORE" rel-entity-name="ProductStore"> > > @@ -4779,9 +4778,6 @@ under the License. > > <relation type="one" fk-name="WANA_WEBSITE" rel-entity-name="WebSite"> > > <key-map field-name="webSiteId"/> > > </relation> > > - <relation type="one-nofk" fk-name="WANA_CNT_CNT" rel-entity-name="Content"> > > - <key-map field-name="contentId"/> > > - </relation> > > </entity> > > > > <entity entity-name="WebAnalyticsType" package-name="org.ofbiz.product.catalog" > > > > Modified: ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml (original) > > +++ ofbiz/trunk/applications/product/widget/catalog/WebAnalyticsForms.xml Fri May 13 09:04:09 2011 > > @@ -44,7 +44,6 @@ under the License. > > </entity-options> > > </drop-down> > > </field> > > - <field name="contentId"><text-find/></field> > > <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> > > </form> > > > > @@ -68,13 +67,6 @@ under the License. > > <field name="webAnalyticsTypeId" title="${uiLabelMap.CommonType}"><display-entity entity-name="WebAnalyticsType"/></field> > > <field name="isEnabled" title="${uiLabelMap.CommonEnabled}" sort-field="true"><display/></field> > > <field name="webSiteId" sort-field="true"><display/></field> > > - <field name="contentId" widget-style="buttontext"> > > - <display-entity entity-name="Content"> > > - <sub-hyperlink target="/content/control/editContent" target-type="inter-app" description="${contentId}" link-style="buttontext"> > > - <parameter param-name="contentId"/> > > - </sub-hyperlink> > > - </display-entity> > > - </field> > > <field name="editLink" title="${uiLabelMap.CommonEdit}" widget-style="buttontext"> > > <hyperlink also-hidden="false" description="${uiLabelMap.CommonEdit}" target="EditWebAnalyticsConfig"> > > <parameter param-name="productStoreId"/> > > @@ -118,9 +110,6 @@ under the License. > > <option key="N" description="${uiLabelMap.CommonNo}"/> > > </drop-down> > > </field> > > - <field name="contentId"> > > - <lookup target-form-name="LookupContent"/> > > - </field> > > <field use-when="webAnalyticsConfig!=null" name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> > > <field use-when="webAnalyticsConfig==null" name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field> > > </form> > > > > Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl?rev=1102617&r1=1102616&r2=1102617&view=diff > > ============================================================================== > > --- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl (original) > > +++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl Fri May 13 09:04:09 2011 > > @@ -88,7 +88,7 @@ under the License. > > <#if metaKeywords?exists> > > <meta name="keywords" content="${metaKeywords}"/> > > </#if> > > - <#if webAnalyticsConfigs?exists> > > + <#if webAnalyticsConfigs?has_content> > > <script language="JavaScript" type="text/javascript"> > > <#list webAnalyticsConfigs as webAnalyticsConfig> > > ${StringUtil.wrapString(webAnalyticsConfig.webAnalyticsCode?if_exists)} > > > > Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml > > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml?rev=1102617&r1=1102616&r2=1102617&view=diff > > ============================================================================== > > --- ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml (original) > > +++ ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml Fri May 13 09:04:09 2011 > > @@ -57,6 +57,7 @@ under the License. > > <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/> > > <entity-and list="webAnalyticsConfigs" entity-name="WebAnalyticsConfig"> > > <field-map field-name="webSiteId"/> > > + <field-map field-name="isEnabled" value="Y"/> > > </entity-and> > > </actions> > > <widgets> > > > > > -- Ofbiz on twitter: http://twitter.com/apache_ofbiz Myself on twitter: http://twitter.com/hansbak Antwebsystems.com: Quality services for competitive rates. |
Free forum by Nabble | Edit this page |