Author: jleroux
Date: Fri Aug 20 10:16:42 2010
New Revision: 987449
URL: http://svn.apache.org/viewvc?rev=987449&view=rev
Log:
Merge the trunk at r987348
Added:
ofbiz/branches/jquery/applications/party/widget/partymgr/PartyVisitForms.xml
- copied unchanged from r987448,
ofbiz/trunk/applications/party/widget/partymgr/PartyVisitForms.xml
ofbiz/branches/jquery/framework/example/data/ExampleDemoData.xml
- copied unchanged from r987448,
ofbiz/trunk/framework/example/data/ExampleDemoData.xml
ofbiz/branches/jquery/framework/example/webapp/birt/report/example.rptdesign
- copied unchanged from r987448,
ofbiz/trunk/framework/example/webapp/birt/report/example.rptdesign
Removed:
ofbiz/branches/jquery/framework/example/webapp/birt/report/product.rptdesign
Modified:
ofbiz/branches/jquery/ (props changed)
ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml
ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Visits.ftl
ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml
ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml
ofbiz/branches/jquery/framework/common/entitydef/entitymodel.xml
ofbiz/branches/jquery/framework/example/data/ExampleTypeData.xml
ofbiz/branches/jquery/framework/example/ofbiz-component.xml
ofbiz/branches/jquery/framework/example/webapp/birt/WEB-INF/controller.xml
ofbiz/branches/jquery/framework/example/webapp/birt/birt/report.ftl
ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml
ofbiz/branches/jquery/framework/example/widget/example/BirtForms.xml
ofbiz/branches/jquery/framework/example/widget/example/BirtScreens.xml
ofbiz/branches/jquery/framework/example/widget/example/ExampleForms.xml
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleScreens.xml
ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd
ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl
ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy
(props changed)
ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy
(props changed)
ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy
(props changed)
Propchange: ofbiz/branches/jquery/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 10:16:42 2010
@@ -1,3 +1,3 @@
/ofbiz/branches/addbirt:831210-885099,885686-886087
/ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:951708-986606
+/ofbiz/trunk:951708-987448
Modified:
ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
---
ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml
(original)
+++
ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/controller.xml
Fri Aug 20 10:16:42 2010
@@ -716,9 +716,9 @@ under the License.
<response name="error" type="view" value="EditPartyRelationships"/>
</request-map>
- <request-map uri="showvisits"><security https="true"
auth="true"/><response name="success" type="view"
value="showvisits"/></request-map>
+ <request-map uri="findVisits"><security https="true"
auth="true"/><response name="success" type="view"
value="findVisits"/></request-map>
<request-map uri="visitdetail"><security https="true"
auth="true"/><response name="success" type="view"
value="visitdetail"/></request-map>
-
+
<request-map uri="pushPage">
<security https="true" auth="true"/>
<event type="java" path="org.ofbiz.common.CommonEvents"
invoke="setFollowerPage"/>
@@ -1361,7 +1361,7 @@ under the License.
<view-map name="CertIssuerProvisions" type="screen"
page="component://party/widget/partymgr/SecurityScreens.xml#EditX509IssuerProvisions"/>
<view-map name="ViewCertificate" type="screen"
page="component://party/widget/partymgr/SecurityScreens.xml#ViewCertificate"/>
- <view-map name="showvisits" type="screen"
page="component://party/widget/partymgr/VisitScreens.xml#showvisits"/>
+ <view-map name="findVisits" type="screen"
page="component://party/widget/partymgr/VisitScreens.xml#FindVisits"/>
<view-map name="visitdetail" type="screen"
page="component://party/widget/partymgr/VisitScreens.xml#visitdetail"/>
<view-map name="LookupPartyName" type="screen"
page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyName"/>
Modified:
ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Visits.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Visits.ftl?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
---
ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Visits.ftl
(original)
+++
ofbiz/branches/jquery/applications/party/webapp/partymgr/party/profileblocks/Visits.ftl
Fri Aug 20 10:16:42 2010
@@ -21,7 +21,7 @@ under the License.
<div class="screenlet-title-bar">
<ul>
<li class="h3">${uiLabelMap.PartyVisits}</li>
- <li><a
href="<@ofbizUrl>showvisits?partyId=${partyId}</@ofbizUrl>">${uiLabelMap.CommonListAll}</a></li>
+ <li><a
href="<@ofbizUrl>findVisits?partyId=${partyId}</@ofbizUrl>">${uiLabelMap.CommonListAll}</a></li>
</ul>
<br class="clear" />
</div>
Modified:
ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml
(original)
+++ ofbiz/branches/jquery/applications/party/widget/partymgr/PartyMenus.xml Fri
Aug 20 10:16:42 2010
@@ -24,7 +24,7 @@
<menu-item name="find" title="${uiLabelMap.PartyParties}"><link
target="findparty"/></menu-item>
<menu-item name="mycomm"
title="${uiLabelMap.PartyMyCommunications}"><link
target="MyCommunicationEvents"/></menu-item>
<menu-item name="comm" title="${uiLabelMap.PartyCommunications}"><link
target="FindCommunicationEvents"/></menu-item>
- <menu-item name="visits" title="${uiLabelMap.PartyVisits}"><link
target="showvisits"/></menu-item>
+ <menu-item name="visits" title="${uiLabelMap.PartyVisits}"><link
target="findVisits"/></menu-item>
<menu-item name="classification"
title="${uiLabelMap.PartyClassifications}"><link
target="showclassgroups"/></menu-item>
<menu-item name="security" title="${uiLabelMap.CommonSecurity}">
<condition>
Modified:
ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml
(original)
+++ ofbiz/branches/jquery/applications/party/widget/partymgr/VisitScreens.xml
Fri Aug 20 10:16:42 2010
@@ -21,14 +21,12 @@ under the License.
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
- <screen name="showvisits">
+ <screen name="FindVisits">
<section>
<actions>
- <set field="titleProperty" value="PageTitleVisitList"/>
<set field="headerItem" value="visits"/>
- <set field="tabButtonItem" value="showvisits"/>
-
- <script
location="component://party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy"/>
+ <set field="titleProperty" value="PageTitleVisitList"/>
+ <set field="noConditionFind" value="Y"/>
</actions>
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
@@ -39,9 +37,14 @@ under the License.
<if-service-permission
service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
- <platform-specific>
- <html><html-template
location="component://party/webapp/partymgr/visit/showvisits.ftl"/></html>
- </platform-specific>
+ <decorator-screen name="FindScreenDecorator"
location="component://common/widget/CommonScreens.xml">
+ <decorator-section name="search-options">
+ <include-form name="FindVisits"
location="component://party/widget/partymgr/PartyVisitForms.xml"/>
+ </decorator-section>
+ <decorator-section name="search-results">
+ <include-form name="ListVisits"
location="component://party/widget/partymgr/PartyVisitForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
</widgets>
<fail-widgets>
<label
style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
@@ -52,6 +55,7 @@ under the License.
</widgets>
</section>
</screen>
+
<screen name="visitdetail">
<section>
<actions>
Modified: ofbiz/branches/jquery/framework/common/entitydef/entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/entitydef/entitymodel.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/jquery/framework/common/entitydef/entitymodel.xml Fri Aug 20
10:16:42 2010
@@ -738,7 +738,7 @@ under the License.
<key-map field-name="portalPortletId"/>
</view-link>
</view-entity>
- <entity entity-name="PortletAttribute"
package-name="org.ofbiz.common.portal" title="Product Attribute Entity">
+ <entity entity-name="PortletAttribute"
package-name="org.ofbiz.common.portal" title="Allows to set different attribute
values for each instance of the same portlet">
<field name="portalPageId" type="id-ne"></field>
<field name="portalPortletId" type="id-ne"></field>
<field name="portletSeqId" type="id-ne"></field>
Modified: ofbiz/branches/jquery/framework/example/data/ExampleTypeData.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/data/ExampleTypeData.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/data/ExampleTypeData.xml (original)
+++ ofbiz/branches/jquery/framework/example/data/ExampleTypeData.xml Fri Aug 20
10:16:42 2010
@@ -18,38 +18,5 @@ specific language governing permissions
under the License.
-->
<entity-engine-xml>
- <ExampleType exampleTypeId="REAL_WORLD" description="Real World"
parentTypeId=""/>
- <ExampleType exampleTypeId="MADE_UP" description="Made Up"
parentTypeId=""/>
- <ExampleType exampleTypeId="CONTRIVED" description="Contrived"
parentTypeId="MADE_UP"/>
- <ExampleType exampleTypeId="INSPIRED" description="Inspired"
parentTypeId="MADE_UP"/>
-
- <ExampleFeatureApplType exampleFeatureApplTypeId="REQUIRED"
description="Required" parentTypeId=""/>
- <ExampleFeatureApplType exampleFeatureApplTypeId="DESIRED"
description="Desired" parentTypeId=""/>
- <ExampleFeatureApplType exampleFeatureApplTypeId="NOT_ALLOWED"
description="Not Allowed" parentTypeId=""/>
-
- <StatusType description="Example" statusTypeId="EXAMPLE_STATUS"
hasTable="N" parentTypeId=""/>
- <StatusItem description="In Design" sequenceId="01" statusCode="IN_DESIGN"
statusId="EXST_IN_DESIGN" statusTypeId="EXAMPLE_STATUS"/>
- <StatusItem description="Defined" sequenceId="02" statusCode="DEFINED"
statusId="EXST_DEFINED" statusTypeId="EXAMPLE_STATUS"/>
- <StatusItem description="Approved" sequenceId="03" statusCode="APPROVED"
statusId="EXST_APPROVED" statusTypeId="EXAMPLE_STATUS"/>
- <StatusItem description="Implemented" sequenceId="04"
statusCode="IMPLEMENTED" statusId="EXST_IMPLEMENTED"
statusTypeId="EXAMPLE_STATUS"/>
- <StatusItem description="Tested" sequenceId="05" statusCode="TESTED"
statusId="EXST_TESTED" statusTypeId="EXAMPLE_STATUS"/>
- <StatusItem description="Complete" sequenceId="06" statusCode="COMPLETE"
statusId="EXST_COMPLETE" statusTypeId="EXAMPLE_STATUS"/>
- <StatusItem description="Cancelled" sequenceId="99" statusCode="CANCELLED"
statusId="EXST_CANCELLED" statusTypeId="EXAMPLE_STATUS"/>
- <StatusValidChange condition="" statusId="EXST_IN_DESIGN"
statusIdTo="EXST_DEFINED" transitionName="Definition Complete"/>
- <StatusValidChange condition="" statusId="EXST_DEFINED"
statusIdTo="EXST_APPROVED" transitionName="Approve"/>
- <StatusValidChange condition="" statusId="EXST_APPROVED"
statusIdTo="EXST_IMPLEMENTED" transitionName="Implementation Complete"/>
- <StatusValidChange condition="" statusId="EXST_IMPLEMENTED"
statusIdTo="EXST_TESTED" transitionName="Testing Complete"/>
- <StatusValidChange condition="" statusId="EXST_TESTED"
statusIdTo="EXST_COMPLETE" transitionName="Example Completed"/>
- <StatusValidChange condition="" statusId="EXST_IN_DESIGN"
statusIdTo="EXST_CANCELLED" transitionName="Cancel Example"/>
- <StatusValidChange condition="" statusId="EXST_DEFINED"
statusIdTo="EXST_CANCELLED" transitionName="Cancel Example"/>
- <StatusValidChange condition="" statusId="EXST_APPROVED"
statusIdTo="EXST_CANCELLED" transitionName="Cancel Example"/>
- <StatusValidChange condition="" statusId="EXST_IMPLEMENTED"
statusIdTo="EXST_CANCELLED" transitionName="Cancel Example"/>
- <StatusValidChange condition="" statusId="EXST_TESTED"
statusIdTo="EXST_CANCELLED" transitionName="Cancel Example"/>
-
- <EnumerationType description="Example Feature Source"
enumTypeId="EXMPL_FEAT_SOURCE" hasTable="N" parentTypeId=""/>
- <Enumeration description="Customer" enumCode="CUSTOMER"
enumId="EXFTSRC_CUSTOMER" sequenceId="01" enumTypeId="EXMPL_FEAT_SOURCE"/>
- <Enumeration description="Partner" enumCode="PARTNER"
enumId="EXFTSRC_PARTNER" sequenceId="02" enumTypeId="EXMPL_FEAT_SOURCE"/>
- <Enumeration description="Employee" enumCode="EMPLOYEE"
enumId="EXFTSRC_EMPLOYEE" sequenceId="03" enumTypeId="EXMPL_FEAT_SOURCE"/>
-
<WebSite webSiteId="EXAMPLE" siteName="Example Application"
visualThemeSetId="BACKOFFICE"/>
</entity-engine-xml>
Modified: ofbiz/branches/jquery/framework/example/ofbiz-component.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/ofbiz-component.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/ofbiz-component.xml (original)
+++ ofbiz/branches/jquery/framework/example/ofbiz-component.xml Fri Aug 20
10:16:42 2010
@@ -40,6 +40,7 @@ under the License.
<entity-resource type="data" reader-name="seed" loader="main"
location="data/ExamplePortletData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main"
location="data/ExamplePortalSeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main"
location="data/ExampleHelpData.xml"/>
+ <entity-resource type="data" reader-name="demo" loader="main"
location="data/ExampleDemoData.xml"/>
<!-- service resources: model(s), eca(s) and group definitions -->
<service-resource type="model" loader="main"
location="servicedef/services.xml"/>
Modified:
ofbiz/branches/jquery/framework/example/webapp/birt/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/webapp/birt/WEB-INF/controller.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/webapp/birt/WEB-INF/controller.xml
(original)
+++ ofbiz/branches/jquery/framework/example/webapp/birt/WEB-INF/controller.xml
Fri Aug 20 10:16:42 2010
@@ -85,6 +85,6 @@ under the License.
application/vnd.ms-word
application/vnd.ms-powerpoint
-->
- <view-map name="ViewHandler" type="birt"
page="component://example/webapp/birt/report/product.rptdesign"
content-type="application/pdf"/>
+ <view-map name="ViewHandler" type="birt"
page="component://example/webapp/birt/report/example.rptdesign"
content-type="application/pdf"/>
<!-- end of view mappings -->
</site-conf>
Modified: ofbiz/branches/jquery/framework/example/webapp/birt/birt/report.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/webapp/birt/birt/report.ftl?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/webapp/birt/birt/report.ftl
(original)
+++ ofbiz/branches/jquery/framework/example/webapp/birt/birt/report.ftl Fri Aug
20 10:16:42 2010
@@ -20,7 +20,7 @@ under the License.
<#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/>
<@birt.report id="birtReport"
- reportDesign="component://example/webapp/birt/report/product.rptdesign"
+ reportDesign="component://example/webapp/birt/report/example.rptdesign"
baseURL="/birt"
height="700"
width="900"
Modified:
ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
---
ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml
(original)
+++
ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml
Fri Aug 20 10:16:42 2010
@@ -290,7 +290,7 @@ under the License.
<view-map name="BirtMain" type="screen"
page="component://example/widget/example/BirtScreens.xml#main"/>
<view-map name="Report" type="screen"
page="component://example/widget/example/BirtScreens.xml#Report"/>
<view-map name="Mail" type="screen"
page="component://example/widget/example/BirtScreens.xml#EditMail"/>
- <view-map name="ViewHandler" type="birt"
page="component://example/webapp/birt/report/product.rptdesign"
content-type="application/pdf"/>
+ <view-map name="ViewHandler" type="birt"
page="component://example/webapp/birt/report/example.rptdesign"
content-type="application/pdf"/>
<!-- Flotr view mapping -->
<view-map name="ExampleBarChart"
page="component://example/widget/example/ExampleScreens.xml#ExampleBarChart"
type="screen"/>
Modified: ofbiz/branches/jquery/framework/example/widget/example/BirtForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/BirtForms.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/BirtForms.xml
(original)
+++ ofbiz/branches/jquery/framework/example/widget/example/BirtForms.xml Fri
Aug 20 10:16:42 2010
@@ -25,7 +25,7 @@ under the License.
<field name="sendFrom"><text/></field>
<field name="sendTo"><text/></field>
<field name="subject"><text/></field>
- <field name="birtReportLocation" tooltip="Example is
component://example/webapp/birt/report/product.rptdesign"><text/></field>
+ <field name="birtReportLocation" tooltip="Example is
component://example/webapp/birt/report/example.rptdesign"><text/></field>
<field name="birtContentType">
<drop-down>
<option key="text/html" description="text/html"/>
Modified: ofbiz/branches/jquery/framework/example/widget/example/BirtScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/BirtScreens.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/BirtScreens.xml
(original)
+++ ofbiz/branches/jquery/framework/example/widget/example/BirtScreens.xml Fri
Aug 20 10:16:42 2010
@@ -31,7 +31,7 @@ under the License.
<section>
<widgets>
<label style="h3" text="BIRT is an open
source Eclipse-based reporting system that integrates with any OFBiz
application to produce compelling reports including graphical presentations
like pie and bar charts."/>
- <label style="h3" text="This application
provides you with a sample product report."/>
+ <label style="h3" text="This application
provides you with a sample example report."/>
<label style="h3" text="See the help option
how to create your own OFBiz intergrated reports."/>
<link style="h3" text="or see the Birt home
for more information" target="http://eclipse.org/birt/phoenix/intro/"
url-mode="plain" target-window="_blank_"/>
</widgets>
Modified:
ofbiz/branches/jquery/framework/example/widget/example/ExampleForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/ExampleForms.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/ExampleForms.xml
(original)
+++ ofbiz/branches/jquery/framework/example/widget/example/ExampleForms.xml Fri
Aug 20 10:16:42 2010
@@ -128,8 +128,8 @@ under the License.
<field name="longDescription"
title="${uiLabelMap.ExampleLongDescription}"/>
<field name="anotherText">
<drop-down allow-empty="true">
- <option key="Explicit Option"
description="${uiLabelMap.ExampleExplicitOption}"/>
- <entity-options entity-name="ProductType"
description="${description}" key-field-name="productTypeId">
+ <option key="Explicit Option"
description="${uiLabelMap.ExampleExplicitOption}"/>
+ <entity-options entity-name="ExampleType"
description="${description}" key-field-name="exampleTypeId">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
Modified:
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
---
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml
(original)
+++
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml
Fri Aug 20 10:16:42 2010
@@ -244,14 +244,6 @@ under the License.
</entity-options>
</drop-down>
</field>
-
- <field name="separator"
title="${uiLabelMap.CommonEmptyHeader}"><display/></field>
- <field name="productCategoryId" tooltip="${uiLabelMap.CommonRequired}"
widget-style="required">
- <drop-down>
- <entity-options entity-name="ProductCategory"
key-field-name="productCategoryId" description="${categoryName }
${description}"/>
- </drop-down>
- </field>
- <field name="productId" widget-style="required"><drop-down
allow-empty="false"></drop-down></field>
</form>
<!-- Simple form to print a FOP PDF file with the fonts available in
OFBiz Project -->
Modified:
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleScreens.xml?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
---
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleScreens.xml
(original)
+++
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleScreens.xml
Fri Aug 20 10:16:42 2010
@@ -53,23 +53,19 @@ under the License.
</container>
<section>
<actions>
- <!-- fields for the form where
dependent dropdowns are-->
- <set field="dependentForm"
value="DropDownFieldsExampleForm"/>
-
- <!-- fields for
setCountryStatesEventJs -->
- <set
field="selectedStateProvinceGeoId"
from-field="postalAddress.stateProvinceGeoId" default-value="_none_"/><!--
postalAddress.stateProvinceGeoId does not make much sense here, only to get the
idea -->
-
+ <!-- setCountryStatesEventJs.ftl,
it's not used here but is a good example of a reusable template-script with
harcoded values which make sense -->
<!-- fields for
setDependentDropdownValuesJs.ftl, it's a try on generalization but there are
still issues. For instance: what if we have 2 couple of dependent dropdowns in
the same form? -->
- <set field="mainId"
value="productCategoryId"/><!-- here mainId and its key are same -->
- <set field="dependentId"
value="productId"/>
- <set field="requestName"
value="getAssociatedProductsList"/>
- <set field="responseName"
value="products"/>
- <set field="dependentKeyName"
value="productId"/>
- <set field="descName"
value="internalName"/>
- <set
field="selectedDependentOption" from-field="parameters.productId"
default-value="_none_"/>
+ <set field="dependentForm"
value="DropDownFieldsExampleForm"/>
+ <set field="mainId"
value="countryGeoId"/><!-- here mainId and its key are same -->
+ <set field="dependentId"
value="stateProvinceGeoId"/>
+ <set field="requestName"
value="getAssociatedStateList"/>
+ <set field="responseName"
value="stateList"/>
+ <set field="dependentKeyName"
value="geoId"/>
+ <set field="descName"
value="geoName"/>
+ <set
field="selectedDependentOption" from-field="postalAddress.stateProvinceGeoId"
default-value="_none_"/><!-- postalAddress.stateProvinceGeoId does not make
much sense here, only to get the idea -->
</actions>
<widgets>
-
<platform-specific><html><html-template
location="component://common/webcommon/includes/setCountryStatesEventJs.ftl"/></html></platform-specific>
+
<!--platform-specific><html><html-template
location="component://common/webcommon/includes/setCountryStatesEventJs.ftl"/></html></platform-specific-->
<platform-specific><html><html-template
location="component://common/webcommon/includes/setDependentDropdownValuesJs.ftl"/></html></platform-specific>
<include-form
name="DropDownFieldsExampleForm"
location="component://example/widget/example/FormWidgetExampleForms.xml"/>
</widgets>
Modified: ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd Fri Aug 20
10:16:42 2010
@@ -659,6 +659,9 @@ under the License.
<xs:attribute type="xs:string" name="description">
<xs:annotation><xs:documentation>Specifies the string to display,
can use the ${} syntax to insert context values; if empty the value of the
field will be printed for a default.</xs:documentation></xs:annotation>
</xs:attribute>
+ <xs:attribute type="xs:integer" name="size">
+ <xs:annotation><xs:documentation>Specifies the size of the field
(as a number of characters), when the text to display exceed the given size it
is truncated and add the complete text as a
hint</xs:documentation></xs:annotation>
+ </xs:attribute>
<xs:attribute name="type" default="text">
<xs:simpleType>
<xs:restriction base="xs:token">
@@ -699,6 +702,9 @@ under the License.
<xs:attribute type="xs:string" name="entity-name" use="required"/>
<xs:attribute type="xs:string" name="key-field-name"/>
<xs:attribute type="xs:string" name="description"
default="${description}"/>
+ <xs:attribute type="xs:integer" name="size">
+ <xs:annotation><xs:documentation>Specifies the size of the field
(as a number of characters), when the text to display exceed the given size it
is truncated and add the complete text as a
hint</xs:documentation></xs:annotation>
+ </xs:attribute>
<xs:attribute name="cache" default="true">
<xs:simpleType>
<xs:restriction base="xs:token">
@@ -771,6 +777,9 @@ under the License.
images/webapp/images/combobox.js must be included in the page.
</xs:documentation></xs:annotation>
</xs:attribute>
+ <xs:attribute type="xs:integer" name="text-size" >
+ <xs:annotation><xs:documentation>Specifies the size of the field
(as a number of characters), when the text to display exceed the given size it
is truncated and add the complete text as a
hint</xs:documentation></xs:annotation>
+ </xs:attribute>
</xs:attributeGroup>
<xs:element name="file" substitutionGroup="AllFields">
<xs:complexType>
@@ -866,6 +875,9 @@ under the License.
<xs:attribute name="parameters-map" type="xs:string">
<xs:annotation><xs:documentation>A Map in the context that will be
used as additional name/value pairs.</xs:documentation></xs:annotation>
</xs:attribute>
+ <xs:attribute type="xs:integer" name="size">
+ <xs:annotation><xs:documentation>Specifies the size of the field
(as a number of characters), when the text to display exceed the given size it
is truncated and add the complete text as a
hint</xs:documentation></xs:annotation>
+ </xs:attribute>
</xs:attributeGroup>
<xs:element name="parameter">
<xs:complexType>
Modified:
ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
---
ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
(original)
+++
ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
Fri Aug 20 10:16:42 2010
@@ -38,6 +38,7 @@ import javax.servlet.http.HttpServletRes
import javolution.util.FastList;
+import org.apache.commons.lang.StringEscapeUtils;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.StringUtil;
import org.ofbiz.base.util.UtilFormatOut;
@@ -82,7 +83,6 @@ import freemarker.core.Environment;
import freemarker.template.Template;
import freemarker.template.TemplateException;
-
/**
* Widget Library - Form Renderer implementation based on Freemarker macros
*
@@ -191,9 +191,25 @@ public class MacroFormRenderer implement
String description = displayField.getDescription(context);
String type = displayField.getType();
String imageLocation = displayField.getImageLocation();
+ Integer size = Integer.valueOf("0");
+ String title = "";
+
+ if (UtilValidate.isNotEmpty(displayField.getSize())) {
+ try {
+ size = Integer.parseInt(displayField.getSize());
+ }
+ catch(NumberFormatException nfe) {
+ Debug.logError(nfe, "Error reading size of a field fieldName="
+ displayField.getModelFormField().getFieldName()
+ + " FormName= " +
displayField.getModelFormField().getModelForm().getName(), module);
+ }
+ }
ModelFormField.InPlaceEditor inPlaceEditor =
displayField.getInPlaceEditor();
boolean ajaxEnabled = inPlaceEditor != null && this.javaScriptEnabled;
+ if (UtilValidate.isNotEmpty(description) && size > 0 &&
description.length() > size ) {
+ title = description;
+ description = description.substring(0, size-3)+"...";
+ }
StringWriter sr = new StringWriter();
sr.append("<@renderDisplayField ");
@@ -205,6 +221,8 @@ public class MacroFormRenderer implement
sr.append(idName);
sr.append("\" description=\"");
sr.append(description);
+ sr.append("\" title=\"");
+ sr.append(title);
sr.append("\" class=\"");
sr.append(modelFormField.getWidgetStyle());
sr.append("\" alert=\"");
@@ -300,12 +318,14 @@ public class MacroFormRenderer implement
String encodedImageTitle =
encode(hyperlinkField.getImageTitle(context), modelFormField, context);
this.request.setAttribute("alternate", encodedAlternate);
this.request.setAttribute("imageTitle", encodedImageTitle);
+ this.request.setAttribute("descriptionSize", hyperlinkField.getSize());
makeHyperlinkByType(writer, hyperlinkField.getLinkType(),
modelFormField.getWidgetStyle(), hyperlinkField.getTargetType(),
hyperlinkField.getTarget(context),
hyperlinkField.getParameterMap(context),
hyperlinkField.getDescription(context),
hyperlinkField.getTargetWindow(context),
hyperlinkField.getConfirmation(context), modelFormField,
this.request, this.response, context);
this.appendTooltip(writer, context, modelFormField);
this.request.removeAttribute("image");
+ this.request.removeAttribute("descriptionSize");
}
public void renderTextField(Appendable writer, Map<String, Object>
context, TextField textField) throws IOException {
@@ -639,6 +659,16 @@ public class MacroFormRenderer implement
ModelFormField.AutoComplete autoComplete =
dropDownField.getAutoComplete();
String event = modelFormField.getEvent();
String action = modelFormField.getAction(context);
+ Integer textSize = Integer.valueOf(0);
+ if (UtilValidate.isNotEmpty(dropDownField.getTextSize())) {
+ try {
+ textSize = Integer.parseInt(dropDownField.getTextSize());
+ }
+ catch(NumberFormatException nfe) {
+ Debug.logError(nfe, "Error reading size of a field fieldName="
+ dropDownField.getModelFormField().getFieldName()
+ + " FormName= " +
dropDownField.getModelFormField().getModelForm().getName(), module);
+ }
+ }
boolean ajaxEnabled = autoComplete != null && this.javaScriptEnabled;
String className = "";
String alert = "false";
@@ -713,6 +743,11 @@ public class MacroFormRenderer implement
options.append("'");
options.append(",'description':'");
String description = encode(optionValue.getDescription(),
modelFormField, context);
+ String unescaped = StringEscapeUtils.unescapeHtml(description);
+ if (textSize > 0 && unescaped.length() > textSize ) {
+ String reduced = unescaped.substring(0, textSize - 3) + "...";
+ description =
StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(reduced));
+ }
options.append(description);
if (UtilValidate.isNotEmpty(currentValueList)) {
@@ -2899,6 +2934,15 @@ public class MacroFormRenderer implement
if (UtilValidate.isNotEmpty(request.getAttribute("imageTitle"))) {
imgTitle = request.getAttribute("imageTitle").toString();
}
+ Integer size = Integer.valueOf("0");
+
+ if
(UtilValidate.isNotEmpty(request.getAttribute("descriptionSize"))) {
+ size =
Integer.valueOf(request.getAttribute("descriptionSize").toString());
+ }
+ if( UtilValidate.isNotEmpty(description) && size > 0 &&
description.length() > size) {
+ imgTitle = description;
+ description = description.substring(0, size - 3) + "...";
+ }
if(UtilValidate.isEmpty(imgTitle)){
imgTitle = modelFormField.getTitle(context);
}
Modified:
ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
---
ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
(original)
+++
ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
Fri Aug 20 10:16:42 2010
@@ -2047,6 +2047,7 @@ public class ModelFormField {
protected boolean alsoHidden = true;
protected FlexibleStringExpander description;
protected String type; // matches type of field, currently text or
currency
+ protected String size; // maximum number of characters to display
protected String imageLocation;
protected FlexibleStringExpander currency;
protected FlexibleStringExpander date;
@@ -2067,6 +2068,7 @@ public class ModelFormField {
public DisplayField(Element element, ModelFormField modelFormField) {
super(element, modelFormField);
this.type = element.getAttribute("type");
+ this.size = element.getAttribute("size");
this.imageLocation = element.getAttribute("image-location");
this.setCurrency(element.getAttribute("currency"));
this.setDescription(element.getAttribute("description"));
@@ -2091,6 +2093,13 @@ public class ModelFormField {
return this.type;
}
+ public String getSize(){
+ return this.size;
+ }
+ public String setSize(String size){
+ return this.size = size;
+ }
+
public String getImageLocation(){
return this.imageLocation;
}
@@ -2211,6 +2220,7 @@ public class ModelFormField {
this.entityName = element.getAttribute("entity-name");
this.keyFieldName = element.getAttribute("key-field-name");
this.cache = !"false".equals(element.getAttribute("cache"));
+ this.size = element.getAttribute("size");
if (this.description == null || this.description.isEmpty()) {
this.setDescription("${description}");
@@ -2267,6 +2277,9 @@ public class ModelFormField {
public void setSubHyperlink(SubHyperlink newSubHyperlink) {
this.subHyperlink = newSubHyperlink;
}
+ public String getSize(){
+ return this.size;
+ }
}
public static class HyperlinkField extends FieldInfo {
@@ -2276,6 +2289,7 @@ public class ModelFormField {
protected String linkType;
protected String targetType;
protected String image;
+ protected String size;
protected FlexibleStringExpander target;
protected FlexibleStringExpander description;
protected FlexibleStringExpander alternate;
@@ -2311,6 +2325,7 @@ public class ModelFormField {
this.targetWindowExdr =
FlexibleStringExpander.getInstance(element.getAttribute("target-window"));
this.parametersMapAcsr =
FlexibleMapAccessor.getInstance(element.getAttribute("parameters-map"));
this.image = element.getAttribute("image-location");
+ this.size = element.getAttribute("size");
this.setRequestConfirmation("true".equals(element.getAttribute("request-confirmation")));
this.setConfirmationMsg(element.getAttribute("confirmation-message"));
List<? extends Element> parameterElementList =
UtilXml.childElementList(element, "parameter");
@@ -2401,6 +2416,14 @@ public class ModelFormField {
return this.image;
}
+ public String getSize() {
+ return this.size;
+ }
+
+ public String setSize(String size) {
+ return this.size = size;
+ }
+
/**
* @param b
*/
@@ -3071,6 +3094,7 @@ public class ModelFormField {
protected boolean allowMulti = false;
protected String current;
protected String size;
+ protected String textSize;
protected FlexibleStringExpander currentDescription;
protected SubHyperlink subHyperlink;
protected int otherFieldSize = 0;
@@ -3093,6 +3117,7 @@ public class ModelFormField {
this.current = element.getAttribute("current");
this.size = element.getAttribute("size");
+ this.textSize = element.getAttribute("text-size");
this.allowEmpty =
"true".equals(element.getAttribute("allow-empty"));
this.allowMulti =
"true".equals(element.getAttribute("allow-multiple"));
this.currentDescription =
FlexibleStringExpander.getInstance(element.getAttribute("current-description"));
@@ -3101,6 +3126,9 @@ public class ModelFormField {
if (size == null) {
size = "1";
}
+ if (textSize == null) {
+ textSize = "0";
+ }
String sizeStr = element.getAttribute("other-field-size");
try {
@@ -3185,6 +3213,10 @@ public class ModelFormField {
return this.size;
}
+ public String getTextSize() {
+ return this.textSize;
+ }
+
/**
* Get the name to use for the parameter for this field in the form
interpreter.
* For HTML forms this is the request parameter name.
Modified:
ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=987449&r1=987448&r2=987449&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl
(original)
+++ ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl
Fri Aug 20 10:16:42 2010
@@ -23,12 +23,12 @@ under the License.
</#if>
</#macro>
-<#macro renderDisplayField type imageLocation idName description class alert
inPlaceEditorUrl="" inPlaceEditorParams="">
+<#macro renderDisplayField type imageLocation idName description title class
alert inPlaceEditorUrl="" inPlaceEditorParams="">
<#if type?has_content && type=="image">
<img src="${imageLocation}" alt=""><#lt/>
<#else>
- <#if inPlaceEditorUrl?has_content || class?has_content ||
alert=="true">
- <span <#if idName?has_content>id="cc_${idName}"</#if>
<@renderClass class alert />><#t/>
+ <#if inPlaceEditorUrl?has_content || class?has_content ||
alert=="true" || title?has_content>
+ <span <#if idName?has_content>id="cc_${idName}"</#if> <#if
title?has_content>title="${title}"</#if> <@renderClass class alert />><#t/>
</#if>
<#if description?has_content>
@@ -554,4 +554,4 @@ ${item.description}</span>
<#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow><form
method="post" action="${actionUrl}" <#if
targetWindow?has_content>target="${targetWindow}"</#if>
onsubmit="javascript:submitFormDisableSubmits(this)" name="${name}"><#list
parameters as parameter><input name="${parameter.name}"
value="${parameter.value}" type="hidden"/></#list></form></#macro>
<#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc
description confirmation><a <#if
linkStyle?has_content>class="${linkStyle}"</#if>
href="javascript:document.${hiddenFormName}.submit()"<#if action?has_content &&
event?has_content> ${event}="${action}"</#if><#if confirmation?has_content>
onclick="return confirm('${confirmation?js_string}')"</#if>><#if
imgSrc?has_content><img src="${imgSrc}"
alt=""/></#if>${description}</a></#macro>
-<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title
alternate linkUrl targetWindow description confirmation><a <#if
linkStyle?has_content>class="${linkStyle}"</#if> href="${linkUrl}"<#if
targetWindow?has_content> target="${targetWindow}"</#if><#if action?has_content
&& event?has_content> ${event}="${action}"</#if><#if confirmation?has_content>
onclick="return confirm('${confirmation?js_string}')"</#if>><#if
imgSrc?has_content><img src="${imgSrc}" alt="${alternate}"
title="${title}"/></#if>${description}</a></#macro>
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title
alternate linkUrl targetWindow description confirmation><a <#if
linkStyle?has_content>class="${linkStyle}"</#if> href="${linkUrl}"<#if
targetWindow?has_content> target="${targetWindow}"</#if><#if action?has_content
&& event?has_content> ${event}="${action}"</#if><#if confirmation?has_content>
onclick="return confirm('${confirmation?js_string}')"</#if><#if imgSrc?length
== 0 && title?has_content> title="${title}"</#if>><#if imgSrc?has_content><img
src="${imgSrc}" alt="${alternate}"
title="${title}"/></#if>${description}</a></#macro>
Propchange:
ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 10:16:42 2010
@@ -1,3 +1,3 @@
/incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:418499-490456
/ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-986606
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-987448
Propchange:
ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 10:16:42 2010
@@ -1,3 +1,3 @@
/incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:418499-490456
/ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-986606
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-987448
Propchange:
ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 10:16:42 2010
@@ -1,3 +1,3 @@
/incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:418499-490456
/ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-986606
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-987448