svn commit: r1706909 - in /ofbiz/trunk: framework/widget/config/ framework/widget/dtd/ framework/widget/src/org/ofbiz/widget/model/ framework/widget/src/org/ofbiz/widget/renderer/macro/ framework/widget/templates/ specialpurpose/example/config/ special...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1706909 - in /ofbiz/trunk: framework/widget/config/ framework/widget/dtd/ framework/widget/src/org/ofbiz/widget/model/ framework/widget/src/org/ofbiz/widget/renderer/macro/ framework/widget/templates/ specialpurpose/example/config/ special...

nmalin
Author: nmalin
Date: Mon Oct  5 19:56:28 2015
New Revision: 1706909

URL: http://svn.apache.org/viewvc?rev=1706909&view=rev
Log:
Make layered-window available in forms and menu (OFBIZ-6327), adding example to use on example form and widget example and set new properties to define defaut layered windows size. Thanks Jacques Leroux for the submission

Modified:
    ofbiz/trunk/framework/widget/config/widget.properties
    ofbiz/trunk/framework/widget/dtd/widget-common.xsd
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/CommonWidgetModels.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
    ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl
    ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml
    ofbiz/trunk/specialpurpose/example/widget/example/ExampleFeatureForms.xml
    ofbiz/trunk/specialpurpose/example/widget/example/ExampleForms.xml
    ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml
    ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleForms.xml
    ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml

Modified: ofbiz/trunk/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/config/widget.properties?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/config/widget.properties (original)
+++ ofbiz/trunk/framework/widget/config/widget.properties Mon Oct  5 19:56:28 2015
@@ -57,6 +57,10 @@ widget.form.displayhelpText=Y
 # first appears.
 widget.defaultNoConditionFind=N
 
+#Default size for layered modal windows  
+#widget.link.default.layered-modal.width=800
+#widget.link.default.layered-modal.height=600
+
 # Configurations for the Widget View Handlers implemented using the MacroScreenViewHandler
 #
 # html output

Modified: ofbiz/trunk/framework/widget/dtd/widget-common.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-common.xsd?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-common.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-common.xsd Mon Oct  5 19:56:28 2015
@@ -607,14 +607,13 @@ under the License.
                             <xs:documentation>
                                 If selected the hidden-form type will be used if the url-mode is intra-app
                                 and the request specified has an event, otherwise the anchor type will be used,
-                                except if the ajax-window mode is specified.
+                                except if the layered-modal mode is specified.
                             </xs:documentation>
                         </xs:annotation>
                     </xs:enumeration>
                     <xs:enumeration value="anchor" />
                     <xs:enumeration value="hidden-form" />
-                        <!-- FIXME: This is not a link type. It indicates the target window should be a popup dialog. -->
-                    <xs:enumeration value="ajax-window" />
+                    <xs:enumeration value="layered-modal" />
                 </xs:restriction>
             </xs:simpleType>
         </xs:attribute>

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/CommonWidgetModels.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/CommonWidgetModels.java?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/CommonWidgetModels.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/CommonWidgetModels.java Mon Oct  5 19:56:28 2015
@@ -358,7 +358,9 @@ public final class CommonWidgetModels {
                     this.image = null;
                 }
             }
-            this.linkType = linkElement.getAttribute("link-type");
+            //Backwards compatibility
+            if ("ajax-window".equals(linkElement.getAttribute("link-type"))) this.linkType = "layered-modal";
+            else this.linkType = linkElement.getAttribute("link-type");
             List<? extends Element> parameterElementList = UtilXml.childElementList(linkElement, "parameter");
             if (parameterElementList.isEmpty()) {
                 this.parameterList = Collections.emptyList();

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java Mon Oct  5 19:56:28 2015
@@ -32,6 +32,7 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
+import java.util.UUID;
 import java.util.WeakHashMap;
 
 import javax.servlet.ServletContext;
@@ -313,6 +314,8 @@ public final class MacroFormRenderer imp
         this.request.setAttribute("imageTitle", encodedImageTitle);
         this.request.setAttribute("descriptionSize", hyperlinkField.getSize());
         this.request.setAttribute("id", hyperlinkField.getId(context));
+        this.request.setAttribute("width", hyperlinkField.getWidth());
+        this.request.setAttribute("height", hyperlinkField.getHeight());
         makeHyperlinkByType(writer, hyperlinkField.getLinkType(), modelFormField.getWidgetStyle(), hyperlinkField.getUrlMode(), 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);
@@ -2998,6 +3001,8 @@ public final class MacroFormRenderer imp
             return;
         }
         if (subHyperlink.shouldUse(context)) {
+            if (UtilValidate.isNotEmpty(subHyperlink.getWidth())) this.request.setAttribute("width", subHyperlink.getWidth());
+            if (UtilValidate.isNotEmpty(subHyperlink.getHeight())) this.request.setAttribute("height", subHyperlink.getHeight());
             writer.append(' ');
             makeHyperlinkByType(writer, subHyperlink.getLinkType(), subHyperlink.getStyle(context), subHyperlink.getUrlMode(),
                     subHyperlink.getTarget(context), subHyperlink.getParameterMap(context), subHyperlink.getDescription(context),
@@ -3065,9 +3070,27 @@ public final class MacroFormRenderer imp
                 WidgetWorker.makeHiddenFormLinkAnchor(writer, linkStyle, encodedDescription, confirmation, modelFormField, request, response, context);
             }
         } else {
-            makeHyperlinkString(writer, linkStyle, targetType, target, parameterMap, encodedDescription, confirmation, modelFormField, request, response, context, targetWindow);
+            if ("layered-modal".equals(realLinkType)) {
+                String uniqueItemName = "Modal_".concat(UUID.randomUUID().toString());
+                String width = (String) this.request.getAttribute("width");
+                if (UtilValidate.isEmpty(width)) {
+                    width = String.valueOf(UtilProperties.getPropertyValue("widget.properties", "widget.link.default.layered-modal.width", "800"));
+                    this.request.setAttribute("width", width);
+                }
+                String height = (String) this.request.getAttribute("height");
+                if (UtilValidate.isEmpty(height)) {
+                    height = String.valueOf(UtilProperties.getPropertyValue("widget.properties", "widget.link.default.layered-modal.height", "600"));
+                    this.request.setAttribute("height", height);
+                }
+                this.request.setAttribute("uniqueItemName", uniqueItemName);
+                makeHyperlinkString(writer, linkStyle, targetType, target, parameterMap, encodedDescription, confirmation, modelFormField, request, response, context, targetWindow);
+                this.request.removeAttribute("uniqueItemName");
+                this.request.removeAttribute("height");
+                this.request.removeAttribute("width");
+            } else {
+                makeHyperlinkString(writer, linkStyle, targetType, target, parameterMap, encodedDescription, confirmation, modelFormField, request, response, context, targetWindow);
+            }
         }
-
     }
 
     public void makeHyperlinkString(Appendable writer, String linkStyle, String targetType, String target, Map<String, String> parameterMap, String description, String confirmation, ModelFormField modelFormField, HttpServletRequest request, HttpServletResponse response, Map<String, Object> context,
@@ -3080,6 +3103,9 @@ public final class MacroFormRenderer imp
             String imgSrc = "";
             String alt = "";
             String id = "";
+            String uniqueItemName = "";
+            String width = "";
+            String height = "";
             String imgTitle = "";
             String hiddenFormName = WidgetWorker.makeLinkHiddenFormName(context, modelFormField);
             if (UtilValidate.isNotEmpty(modelFormField.getEvent()) && UtilValidate.isNotEmpty(modelFormField.getAction(context))) {
@@ -3109,6 +3135,11 @@ public final class MacroFormRenderer imp
             if (UtilValidate.isNotEmpty(request.getAttribute("id"))) {
                 id = request.getAttribute("id").toString();
             }
+            if (UtilValidate.isNotEmpty(request.getAttribute("uniqueItemName"))) {
+                uniqueItemName = request.getAttribute("uniqueItemName").toString();
+                width = request.getAttribute("width").toString();
+                height = request.getAttribute("height").toString();
+            }
             StringWriter sr = new StringWriter();
             sr.append("<@makeHyperlinkString ");
             sr.append("linkStyle=\"");
@@ -3133,6 +3164,12 @@ public final class MacroFormRenderer imp
             sr.append(description);
             sr.append("\" confirmation =\"");
             sr.append(confirmation);
+            sr.append("\" uniqueItemName=\"");
+            sr.append(uniqueItemName);
+            sr.append("\" height=\"");
+            sr.append(height);
+            sr.append("\" width=\"");
+            sr.append(width);
             sr.append("\" id=\"");
             sr.append(id);
             sr.append("\" />");

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java Mon Oct  5 19:56:28 2015
@@ -226,7 +226,7 @@ public class MacroMenuRenderer implement
         String linkUrl = "";
         String actionUrl = "";
         StringBuilder targetParameters = new StringBuilder();
-        if ("hidden-form".equals(linkType) || "ajax-window".equals(linkType)) {
+        if ("hidden-form".equals(linkType) || "layered-modal".equals(linkType)) {
             StringBuilder sb = new StringBuilder();
             WidgetWorker.buildHyperlinkUrl(sb, target, link.getUrlMode(), null, link.getPrefix(context), link.getFullPath(), link.getSecure(), link.getEncode(), request, response, context);
             actionUrl = sb.toString();

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroScreenRenderer.java?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroScreenRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroScreenRenderer.java Mon Oct  5 19:56:28 2015
@@ -235,13 +235,13 @@ public class MacroScreenRenderer impleme
         StringBuilder parameters = new StringBuilder();
         String width = link.getWidth();
         if (UtilValidate.isEmpty(width)) {
-            width = "300";
+            width = String.valueOf(UtilProperties.getPropertyValue("widget.properties", "widget.link.default.layered-modal.width", "800"));
         }
         String height = link.getHeight();
         if (UtilValidate.isEmpty(height)) {
-            height = "200";
+            height = String.valueOf(UtilProperties.getPropertyValue("widget.properties", "widget.link.default.layered-modal.height", "600"));
         }
-        if ("hidden-form".equals(linkType) || "ajax-window".equals(linkType)) {
+        if ("hidden-form".equals(linkType) || "layered-modal".equals(linkType)) {
             StringBuilder sb = new StringBuilder();
             WidgetWorker.buildHyperlinkUrl(sb, target, link.getUrlMode(), null, link.getPrefix(context),
                     link.getFullPath(), link.getSecure(), link.getEncode(), request, response, context);

Modified: ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl Mon Oct  5 19:56:28 2015
@@ -119,4 +119,4 @@ under the License.
 <#macro renderAsterisks requiredField requiredStyle></#macro>
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description confirmation><@renderField description /></#macro>
-<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation id><@renderField description />,<#rt/></#macro>
\ No newline at end of file
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation uniqueItemName="" height="" width="" id=""><@renderField description />,<#rt/></#macro>
\ No newline at end of file

Modified: ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl Mon Oct  5 19:56:28 2015
@@ -142,7 +142,7 @@ under the License.
 <#macro formatBoundaryComment boundaryType widgetType widgetName></#macro>
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description><@renderField description /></#macro>
-<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation id><@makeBlock linkStyle description /></#macro>
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation uniqueItemName="" height="" width="" id=""><@makeBlock linkStyle description /></#macro>
 <#macro renderTooltip tooltip tooltipStyle></#macro>
 <#macro renderAsterisks requiredField requiredStyle></#macro>
 </#escape>

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Mon Oct  5 19:56:28 2015
@@ -66,6 +66,7 @@ under the License.
     <#if clientAutocomplete?has_content && clientAutocomplete=="false"> autocomplete="off"</#if><#rt/>
     <#if placeholder?has_content> placeholder="${placeholder}"</#if><#rt/>
     <#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
+    require
   /><#t/>
   <#if ajaxEnabled?has_content && ajaxEnabled>
     <#assign defaultMinLength = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultMinLength")>
@@ -852,12 +853,49 @@ Parameter: tabindex, String, optional -
     <#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 id="">
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation uniqueItemName="" height="" width="" id="">
+    <#if uniqueItemName?has_content>
+        <div id="${uniqueItemName}"></div>
+        <a href="javascript:void(0);" id="${uniqueItemName}_link"
+        <#if style?has_content>class="${style}"</#if>>
+        <#if description?has_content>${description}</#if></a>
+        <script type="text/javascript">
+            function getRequestData () {
+                var data =  {
+                    <#--list parameterList as parameter>
+                        "${parameter.name}": "${parameter.value}",
+                    </#list-->
+                    "presentation": "layer"
+                };
+                return data;
+            }
+            jQuery("#${uniqueItemName}_link").click(function () {
+                jQuery("#${uniqueItemName}").dialog("open");
+            });
+            jQuery("#${uniqueItemName}").dialog({
+                 autoOpen: false,
+                 <#if text?has_content>title: "${text}",</#if>
+                 height: ${height},
+                 width: ${width},
+                 modal: true,
+                 closeOnEscape: true,
+                 open: function() {
+                         jQuery.ajax({
+                             url: "${linkUrl}",
+                             type: "POST",
+                             data: getRequestData(),
+                             success: function(data) {jQuery("#${uniqueItemName}").html(data);}
+                         });
+                 }
+            });
+        </script>
+    <#else>
     <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 id?has_content> id="${id}"</#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>
+      <#if imgSrc?has_content><img src="${imgSrc}" alt="${alternate}" title="${title}"/></#if>${description}</a>
+    </#if>
+</#macro>

Modified: ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl Mon Oct  5 19:56:28 2015
@@ -54,11 +54,48 @@ under the License.
     </#list>
 </form><#rt/>
   </#if>
+  <#if uniqueItemName?has_content && "layered-modal" == linkType>
+<div id="${uniqueItemName}"></div>
+<a href="javascript:void(0);" id="${uniqueItemName}_link"
+    <#if style?has_content>class="${style}"</#if>>
+    <#if text?has_content>${text}</#if></a>
+<script type="text/javascript">
+    function getRequestData () {
+        var data =  {
+                   <#--list parameterList as parameter>
+                        "${parameter.name}": "${parameter.value}",
+                    </#list-->
+                    "presentation": "layer"
+                };
+                return data;
+            }
+            jQuery("#${uniqueItemName}_link").click(function () {
+                jQuery("#${uniqueItemName}").dialog("open");
+            });
+            jQuery("#${uniqueItemName}").dialog({
+                 autoOpen: false,
+                 <#if text?has_content>title: "${text}",</#if>
+                 height: <#if height == "">600<#else>${height}</#if>,
+                 width: <#if width == "">800<#else>${width}</#if>,
+                 modal: true,
+                 closeOnEscape: true,
+                 open: function() {
+                         jQuery.ajax({
+                             url: "${linkUrl}",
+                             type: "POST",
+                             data: getRequestData(),
+                             success: function(data) {jQuery("#${uniqueItemName}").html(data);}
+                         });
+                 }
+            });
+      </script>
+  <#else>
 <#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content>
 <a<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if name?has_content> name="${name}"</#if><#if targetWindow?has_content> target="${targetWindow}"</#if> href="<#if "hidden-form"==linkType>javascript:document.${uniqueItemName}.submit()<#else>${linkUrl}</#if>"><#rt/>
 </#if>
 <#if imgStr?has_content>${imgStr}</#if><#if text?has_content>${text}</#if><#rt/>
 <#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content></a><#rt/></#if>
+  </#if>
 </#macro>
 
 <#macro renderMenuItemBegin style toolTip linkStr containsNestedMenus>

Modified: ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl Mon Oct  5 19:56:28 2015
@@ -91,7 +91,7 @@ under the License.
 </#macro>
 
 <#macro renderLink parameterList targetWindow target uniqueItemName linkType actionUrl id style name height width linkUrl text imgStr>
-    <#if "ajax-window" != linkType>
+    <#if "layered-modal" != linkType>
         <#if "hidden-form" == linkType>
             <form method="post" action="${actionUrl}" <#if targetWindow?has_content>target="${targetWindow}"</#if> onsubmit="javascript:submitFormDisableSubmits(this)" name="${uniqueItemName}"><#rt/>
                 <#list parameterList as parameter>

Modified: ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl Mon Oct  5 19:56:28 2015
@@ -119,4 +119,4 @@ under the License.
 <#macro renderAsterisks requiredField requiredStyle>*</#macro>
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description confirmation><@renderField description /></#macro>
-<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation id><@renderField description /></#macro>
\ No newline at end of file
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation uniqueItemName="" height="" width="" id=""><@renderField description /></#macro>
\ No newline at end of file

Modified: ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl Mon Oct  5 19:56:28 2015
@@ -110,6 +110,6 @@ under the License.
 <#macro formatBoundaryComment boundaryType widgetType widgetName></#macro>
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description confirmation><@renderField description /></#macro>
-<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation id=""><@renderField description /></#macro>
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation uniqueItemName="" height="" width="" id=""><@renderField description /></#macro>
 <#macro renderTooltip tooltip tooltipStyle></#macro>
 <#macro renderAsterisks requiredField requiredStyle></#macro>

Modified: ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/trunk/specialpurpose/example/config/ExampleUiLabels.xml Mon Oct  5 19:56:28 2015
@@ -647,6 +647,10 @@
         <value xml:lang="zh">分层的查找数据项(仅用于测试)</value>
         <value xml:lang="zh-TW">階層式尋找資料項目(僅用於測試)</value>
     </property>
+    <property key="ExampleLinks">
+        <value xml:lang="en">Links</value>
+        <value xml:lang="fr">Liens</value>
+    </property>
     <property key="ExampleLongDescription">
         <value xml:lang="en">Long Description</value>
         <value xml:lang="it">Descrizione lunga</value>

Modified: ofbiz/trunk/specialpurpose/example/widget/example/ExampleFeatureForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/widget/example/ExampleFeatureForms.xml?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/widget/example/ExampleFeatureForms.xml (original)
+++ ofbiz/trunk/specialpurpose/example/widget/example/ExampleFeatureForms.xml Mon Oct  5 19:56:28 2015
@@ -82,7 +82,7 @@ under the License.
         <auto-fields-service service-name="updateExampleFeatureAppl"/>
         <field name="exampleId" title="${uiLabelMap.ExampleExample}">
             <display-entity entity-name="Example" description="${exampleName}">
-                <sub-hyperlink target="EditExample" description="${exampleId}" link-style="buttontext">
+                <sub-hyperlink target="EditExampleLayer" description="${exampleId}" link-style="buttontext" link-type="layered-modal">
                     <parameter param-name="exampleId"/>
                 </sub-hyperlink>
             </display-entity>

Modified: ofbiz/trunk/specialpurpose/example/widget/example/ExampleForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/widget/example/ExampleForms.xml?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/widget/example/ExampleForms.xml (original)
+++ ofbiz/trunk/specialpurpose/example/widget/example/ExampleForms.xml Mon Oct  5 19:56:28 2015
@@ -134,6 +134,11 @@ under the License.
         <actions>
             <entity-condition entity-name="Example"><order-by field-name="exampleName"/></entity-condition>
         </actions>
+        <field name="exampleId" title="${uiLabelMap.ExampleExampleId}" widget-style="buttontext">
+            <hyperlink also-hidden="false" description="${exampleId}" target="EditExampleLayer" link-type="layered-modal">
+                <parameter param-name="exampleId"/>
+            </hyperlink>
+        </field>
         <field name="exampleName" title="${uiLabelMap.CommonName}" id-name="exampleName">
             <display>
                 <in-place-editor url="/example/control/updateExample" cancel-control="button" saving-text="Updating..." text-between-controls=" ">

Modified: ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml Mon Oct  5 19:56:28 2015
@@ -43,8 +43,8 @@ under the License.
                             </condition>
                             <widgets>
                                 <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
-                                    <decorator-section name="menu-bar"><label>${formExampleListName}</label>
-                                        <container style="button-bar"><link target="EditExampleLayer" link-type="ajax-window" height="500" width="500" text="${uiLabelMap.ExampleNewExample}" style="buttontext create"/></container>
+                                    <decorator-section name="menu-bar">
+                                        <container style="button-bar"><link target="EditExampleLayer" link-type="layered-modal" text="${uiLabelMap.ExampleNewExample}" style="buttontext create"/></container>
                                     </decorator-section>
                                     <decorator-section name="search-options">
                                         <include-form name="FindExamples" location="component://example/widget/example/ExampleForms.xml"/>

Modified: ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleForms.xml?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleForms.xml (original)
+++ ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleForms.xml Mon Oct  5 19:56:28 2015
@@ -394,4 +394,13 @@ under the License.
         </field>
     </form>
 
+     <form name="LinksExampleForm" type="single">
+        <!-- ************************ -->
+        <!-- ***   Layered-modal  *** -->
+        <!-- ************************ -->
+        <field name="emptyField0" title=" "><display/></field>
+        <field name="newExample" title=" " widget-style="buttontext">
+            <hyperlink also-hidden="false" description="${uiLabelMap.ExampleNewExample}" target="EditExampleLayer" link-type="layered-modal"/>
+        </field>
+    </form>
 </forms>

Modified: ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml?rev=1706909&r1=1706908&r2=1706909&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml Mon Oct  5 19:56:28 2015
@@ -115,6 +115,15 @@ under the License.
                                     </container>
                                 </container>
                                 <container style="screenlet-body">
+                                    <container style="button-bar"><label style="h2">${uiLabelMap.ExampleLinks}</label></container>
+                                    <container style="screenlet-body">
+                                        <label style="h3">${uiLabelMap.ExampleSourceCode}</label>
+                                        <label>${uiLabelMap.ExampleDefinitionName} &quot;LinksExampleForm&quot; ${uiLabelMap.ExampleDefinitionFile}</label>
+                                        <link target="http://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleForms.xml" url-mode="plain" target-window="svnPage" text="${uiLabelMap.ExampleDefinitionFileTooltip}" style="buttontext"/>
+                                        <include-form name="LinksExampleForm" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
+                                    </container>
+                                </container>
+                                <container style="screenlet-body">
                                     <container style="button-bar"><label style="h2">${uiLabelMap.ExamplePrintButton}</label></container>
                                     <container style="screenlet-body">
                                         <label>${uiLabelMap.ExampleFopFonts}</label>