You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2009/04/09 08:01:21 UTC

svn commit: r763520 - in /ofbiz/trunk/framework/widget: src/org/ofbiz/widget/form/ templates/

Author: jacopoc
Date: Thu Apr  9 06:01:21 2009
New Revision: 763520

URL: http://svn.apache.org/viewvc?rev=763520&view=rev
Log:
Mostly completed the implementation of widget macro renderers for xml and text output.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
    ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl
    ofbiz/trunk/framework/widget/templates/xmlScreenMacroLibrary.ftl

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=763520&r1=763519&r2=763520&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Thu Apr  9 06:01:21 2009
@@ -1093,7 +1093,9 @@
 
         StringWriter sr = new StringWriter();
         sr.append("<@renderFormatListWrapperOpen ");
-        sr.append(" style=\"");
+        sr.append(" formName=\"");
+        sr.append(modelForm.getName());
+        sr.append("\" style=\"");
         sr.append(modelForm.getDefaultTableStyle());
         sr.append("\" columnStyles=[");
         sr.append(columnStyleListString);
@@ -1104,7 +1106,10 @@
 
     public void renderFormatListWrapperClose(Appendable writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
         StringWriter sr = new StringWriter();
-        sr.append("<@renderFormatListWrapperClose />");
+        sr.append("<@renderFormatListWrapperClose");
+        sr.append(" formName=\"");
+        sr.append(modelForm.getName());
+        sr.append("\" />");
         executeMacro(writer, sr.toString());
         if (this.renderPagination) {
             this.renderNextPrev(writer, context, modelForm);
@@ -1189,7 +1194,9 @@
         }
         StringWriter sr = new StringWriter();
         sr.append("<@renderFormatItemRowOpen ");
-        sr.append(" itemIndex=");
+        sr.append(" formName=\"");
+        sr.append(modelForm.getName());
+        sr.append("\" itemIndex=");
         sr.append(Integer.toString(itemIndex));
         sr.append(" altRowStyles=\"");
         sr.append(altRowStyles);
@@ -1203,7 +1210,10 @@
 
     public void renderFormatItemRowClose(Appendable writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
         StringWriter sr = new StringWriter();
-        sr.append("<@renderFormatItemRowClose />");
+        sr.append("<@renderFormatItemRowClose ");
+        sr.append(" formName=\"");
+        sr.append(modelForm.getName());
+        sr.append("\"/>");
         executeMacro(writer, sr.toString());
     }
 
@@ -1211,7 +1221,9 @@
         String areaStyle = modelFormField.getTitleAreaStyle();
         StringWriter sr = new StringWriter();
         sr.append("<@renderFormatItemRowCellOpen ");
-        sr.append(" style=\"");
+        sr.append(" fieldName=\"");
+        sr.append(modelFormField.getName());
+        sr.append("\" style=\"");
         sr.append(areaStyle);
         sr.append("\" positionSpan=");
         sr.append(Integer.toString(positionSpan));
@@ -1221,7 +1233,10 @@
 
     public void renderFormatItemRowCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField) throws IOException {
         StringWriter sr = new StringWriter();
-        sr.append("<@renderFormatItemRowCellClose />");
+        sr.append("<@renderFormatItemRowCellClose");
+        sr.append(" fieldName=\"");
+        sr.append(modelFormField.getName());
+        sr.append("\"/>");
         executeMacro(writer, sr.toString());
     }
 
@@ -1245,7 +1260,9 @@
         String style = modelForm.getDefaultTableStyle();
         StringWriter sr = new StringWriter();
         sr.append("<@renderFormatSingleWrapperOpen ");
-        sr.append(" style=\"");
+        sr.append(" formName=\"");
+        sr.append(modelForm.getName());
+        sr.append("\" style=\"");
         sr.append(style);
         sr.append("\" />");
         executeMacro(writer, sr.toString());
@@ -1253,7 +1270,10 @@
 
     public void renderFormatSingleWrapperClose(Appendable writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
         StringWriter sr = new StringWriter();
-        sr.append("<@renderFormatSingleWrapperClose />");
+        sr.append("<@renderFormatSingleWrapperClose");
+        sr.append(" formName=\"");
+        sr.append(modelForm.getName());
+        sr.append("\"/>");
         executeMacro(writer, sr.toString());
     }
 

Modified: ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl?rev=763520&r1=763519&r2=763520&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl Thu Apr  9 06:01:21 2009
@@ -72,8 +72,8 @@
 <#macro renderFormClose focusFieldName formName></#macro>
 <#macro renderMultiFormClose></#macro>
     
-<#macro renderFormatListWrapperOpen style columnStyles><fo:table border="solid black"><#list columnStyles as columnStyle><fo:table-column<#if columnStyle?has_content> <@getFoStyle columnStyle/></#if>/></#list></#macro>
-<#macro renderFormatListWrapperClose></fo:table-body></fo:table></#macro>
+<#macro renderFormatListWrapperOpen formName style columnStyles><fo:table border="solid black"><#list columnStyles as columnStyle><fo:table-column<#if columnStyle?has_content> <@getFoStyle columnStyle/></#if>/></#list></#macro>
+<#macro renderFormatListWrapperClose formName></fo:table-body></fo:table></#macro>
 
 <#macro renderFormatHeaderRowOpen style><fo:table-header><fo:table-row></#macro>
 <#macro renderFormatHeaderRowClose></fo:table-row></fo:table-header><fo:table-body>
@@ -87,16 +87,16 @@
 <#macro renderFormatHeaderRowFormCellClose></fo:table-cell></#macro>
 <#macro renderFormatHeaderRowFormCellTitleSeparator style isLast></#macro>
     
-<#macro renderFormatItemRowOpen itemIndex altRowStyles evenRowStyle oddRowStyle><fo:table-row></#macro>
-<#macro renderFormatItemRowClose></fo:table-row></#macro>
-<#macro renderFormatItemRowCellOpen style positionSpan><fo:table-cell <#if positionSpan?has_content && positionSpan gt 1 >number-columns-spanned="${positionSpan}"</#if><#if style?has_content><@getFoStyle style/><#else><@getFoStyle "tabletext"/></#if>></#macro>
-<#macro renderFormatItemRowCellClose></fo:table-cell></#macro>
+<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle><fo:table-row></#macro>
+<#macro renderFormatItemRowClose formName></fo:table-row></#macro>
+<#macro renderFormatItemRowCellOpen fieldName style positionSpan><fo:table-cell <#if positionSpan?has_content && positionSpan gt 1 >number-columns-spanned="${positionSpan}"</#if><#if style?has_content><@getFoStyle style/><#else><@getFoStyle "tabletext"/></#if>></#macro>
+<#macro renderFormatItemRowCellClose fieldName></fo:table-cell></#macro>
 <#macro renderFormatItemRowFormCellOpen style><fo:table-cell></#macro>
 <#macro renderFormatItemRowFormCellClose></fo:table-cell></#macro>
 
 <#-- TODO: multi columns (position attribute) in single forms are still not implemented -->
-<#macro renderFormatSingleWrapperOpen style><fo:table><fo:table-column column-width="2in"/><fo:table-column/><fo:table-body></#macro>
-<#macro renderFormatSingleWrapperClose></fo:table-body></fo:table></#macro>
+<#macro renderFormatSingleWrapperOpen formName style><fo:table><fo:table-column column-width="2in"/><fo:table-column/><fo:table-body></#macro>
+<#macro renderFormatSingleWrapperClose formName></fo:table-body></fo:table></#macro>
 
 <#macro renderFormatFieldRowOpen><fo:table-row></#macro>
 <#macro renderFormatFieldRowClose></fo:table-row></#macro>
@@ -114,7 +114,7 @@
 
 <#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals value2 defaultOptionThru><@makeBlock className value /></#macro>
 
-<#macro renderLookupField className alert name value size maxlength autocomplete descriptionFieldName formName lookupFieldFormName targetParameterIter imgSrc><<@makeBlock className value /></#macro>
+<#macro renderLookupField className alert name value size maxlength autocomplete descriptionFieldName formName lookupFieldFormName targetParameterIter imgSrc><@makeBlock className value /></#macro>
 <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel></#macro>
 <#macro renderFileField className alert name value size maxlength autocomplete><@makeBlock className value /></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete><@makeBlock className "" /></#macro>

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=763520&r1=763519&r2=763520&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Thu Apr  9 06:01:21 2009
@@ -156,8 +156,8 @@
 <#macro renderFormClose focusFieldName formName></form><#if focusFieldName?has_content><script language="JavaScript" type="text/javascript">document.${formName}.${focusFieldName}.focus();</script></#if></#macro>
 <#macro renderMultiFormClose></#macro>
 
-<#macro renderFormatListWrapperOpen style columnStyles>  <table cellspacing="0" class="<#if style?has_content>${style}<#else>basic-table form-widget-table dark-grid</#if>" > </#macro>
-<#macro renderFormatListWrapperClose> </table></#macro>
+<#macro renderFormatListWrapperOpen formName style columnStyles>  <table cellspacing="0" class="<#if style?has_content>${style}<#else>basic-table form-widget-table dark-grid</#if>" > </#macro>
+<#macro renderFormatListWrapperClose formName> </table></#macro>
 
 <#macro renderFormatHeaderRowOpen style>  <tr class="<#if style?has_content>${style}<#else>header-row</#if>"></#macro>
 <#macro renderFormatHeaderRowClose>  </tr></#macro>
@@ -168,15 +168,15 @@
 <#macro renderFormatHeaderRowFormCellClose></td></#macro>
 <#macro renderFormatHeaderRowFormCellTitleSeparator style isLast><#if style?has_content><sapn class="${style}"></#if> - <#if style?has_content></span></#if></#macro>
 
-<#macro renderFormatItemRowOpen itemIndex altRowStyles evenRowStyle oddRowStyle> <tr <#if itemIndex?has_content><#if itemIndex%2==0><#if evenRowStyle?has_content>class="${evenRowStyle}<#if altRowStyles?has_content> ${altRowStyles}</#if>"<#elseif altRowStyles?has_content>class="${altRowStyles}"</#if><#else><#if oddRowStyle?has_content>class="${oddRowStyle}<#if altRowStyles?has_content> ${altRowStyles}</#if>"<#elseif altRowStyles?has_content>class="${altRowStyles}"</#if></#if></#if> ></#macro>
-<#macro renderFormatItemRowClose>  </tr></#macro>
-<#macro renderFormatItemRowCellOpen style positionSpan>  <td <#if positionSpan?has_content && positionSpan gt 1>colspan="${positionSpan}"</#if><#if style?has_content>class="${style}"</#if>></#macro>
-<#macro renderFormatItemRowCellClose>  </td></#macro>
+<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle> <tr <#if itemIndex?has_content><#if itemIndex%2==0><#if evenRowStyle?has_content>class="${evenRowStyle}<#if altRowStyles?has_content> ${altRowStyles}</#if>"<#elseif altRowStyles?has_content>class="${altRowStyles}"</#if><#else><#if oddRowStyle?has_content>class="${oddRowStyle}<#if altRowStyles?has_content> ${altRowStyles}</#if>"<#elseif altRowStyles?has_content>class="${altRowStyles}"</#if></#if></#if> ></#macro>
+<#macro renderFormatItemRowClose formName>  </tr></#macro>
+<#macro renderFormatItemRowCellOpen fieldName style positionSpan>  <td <#if positionSpan?has_content && positionSpan gt 1>colspan="${positionSpan}"</#if><#if style?has_content>class="${style}"</#if>></#macro>
+<#macro renderFormatItemRowCellClose fieldName>  </td></#macro>
 <#macro renderFormatItemRowFormCellOpen style>   <td<#if style?has_content> class="${style}"</#if>></#macro>
 <#macro renderFormatItemRowFormCellClose></td></#macro>
 
-<#macro renderFormatSingleWrapperOpen style> <table cellspacing="0" <#if style?has_content>class="${style}"</#if> ></#macro>
-<#macro renderFormatSingleWrapperClose> </table></#macro>
+<#macro renderFormatSingleWrapperOpen formName style> <table cellspacing="0" <#if style?has_content>class="${style}"</#if> ></#macro>
+<#macro renderFormatSingleWrapperClose formName> </table></#macro>
 
 <#macro renderFormatFieldRowOpen>  <tr></#macro>
 <#macro renderFormatFieldRowClose>  </tr></#macro>

Modified: ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl?rev=763520&r1=763519&r2=763520&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl Thu Apr  9 06:01:21 2009
@@ -54,8 +54,8 @@
 <#macro renderFormClose focusFieldName formName></#macro>
 <#macro renderMultiFormClose></#macro>
 
-<#macro renderFormatListWrapperOpen style columnStyles></#macro>
-<#macro renderFormatListWrapperClose></#macro>
+<#macro renderFormatListWrapperOpen formName style columnStyles></#macro>
+<#macro renderFormatListWrapperClose formName></#macro>
 
 <#macro renderFormatHeaderRowOpen style></#macro>
 <#macro renderFormatHeaderRowClose> </#macro>
@@ -66,15 +66,15 @@
 <#macro renderFormatHeaderRowFormCellClose></#macro>
 <#macro renderFormatHeaderRowFormCellTitleSeparator style isLast></#macro>
 
-<#macro renderFormatItemRowOpen itemIndex altRowStyles evenRowStyle oddRowStyle></#macro>
-<#macro renderFormatItemRowClose></#macro>
-<#macro renderFormatItemRowCellOpen style positionSpan></#macro>
-<#macro renderFormatItemRowCellClose></#macro>
+<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle></#macro>
+<#macro renderFormatItemRowClose formName></#macro>
+<#macro renderFormatItemRowCellOpen fieldName style positionSpan></#macro>
+<#macro renderFormatItemRowCellClose fieldName></#macro>
 <#macro renderFormatItemRowFormCellOpen style></#macro>
 <#macro renderFormatItemRowFormCellClose></#macro>
 
-<#macro renderFormatSingleWrapperOpen style></#macro>
-<#macro renderFormatSingleWrapperClose></#macro>
+<#macro renderFormatSingleWrapperOpen formName style></#macro>
+<#macro renderFormatSingleWrapperClose formName></#macro>
 
 <#macro renderFormatFieldRowOpen></#macro>
 <#macro renderFormatFieldRowClose></#macro>

Modified: ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl?rev=763520&r1=763519&r2=763520&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl Thu Apr  9 06:01:21 2009
@@ -17,20 +17,100 @@
 under the License.
 -->
 
-<#macro renderField text><#if text?exists>xml${text}</#if></#macro>
+<#macro renderField text><#if text?exists>${text?xml}</#if></#macro>
 
-<#macro renderFormatListWrapperOpen formName><${formName}Export></#macro>
+<#macro renderFormatListWrapperOpen formName style columnStyles><${formName}Export></#macro>
 
 <#macro renderFormatListWrapperClose formName></${formName}Export></#macro>
 
-<#macro renderFormatItemRowOpen formName><${formName}></#macro>
+<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle><${formName}></#macro>
 
 <#macro renderFormatItemRowClose formName></${formName}></#macro>
 
-<#macro renderFormatItemRowCellOpen fieldName><${fieldName}></#macro>
+<#macro renderFormatItemRowCellOpen fieldName style positionSpan><${fieldName}></#macro>
 
 <#macro renderFormatItemRowCellClose fieldName></${fieldName}></#macro>
 
-<#macro renderFormatSingleWrapperOpen formName><${formName}Export></#macro>
+<#macro renderFormatSingleWrapperOpen formName style><${formName}Export></#macro>
 
 <#macro renderFormatSingleWrapperClose formName></${formName}Export></#macro>
+
+
+
+
+
+
+<#macro renderDisplayField idName description class alert><@renderField description/></#macro>
+<#macro renderHyperlinkField></#macro>
+
+<#macro renderTextField name className alert value textSize maxlength id event action clientAutocomplete ajaxUrl ajaxEnabled><@renderField value/></#macro>
+
+<#macro renderTextareaField name className alert cols rows id readonly value visualEdtiorEnalble buttons><@renderField value/></#macro>
+
+<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString calGif localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@renderField value/></#macro>
+
+<#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch>
+</#macro>
+
+<#macro renderCheckField items className alert allChecked currentValue name event action></#macro>
+<#macro renderRadioField items className alert currentValue noCurrentSelectedKey name event action></#macro>
+
+<#macro renderSubmitField buttonType className alert formName title name event action imgSrc></#macro>
+<#macro renderResetField className alert name title></#macro>
+
+<#macro renderHiddenField name value></#macro>
+<#macro renderIgnoredField></#macro>
+
+<#macro renderFieldTitle style title></#macro>
+<#macro renderSingleFormFieldTitle title></#macro>
+    
+<#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit></#macro>
+<#macro renderFormClose focusFieldName formName></#macro>
+<#macro renderMultiFormClose></#macro>
+
+
+<#macro renderFormatHeaderRowOpen style></#macro>
+<#macro renderFormatHeaderRowClose>
+</#macro>
+<#macro renderFormatHeaderRowCellOpen style positionSpan></#macro>
+<#macro renderFormatHeaderRowCellClose></#macro>
+
+<#macro renderFormatHeaderRowFormCellOpen style></#macro>
+<#macro renderFormatHeaderRowFormCellClose></#macro>
+<#macro renderFormatHeaderRowFormCellTitleSeparator style isLast></#macro>
+
+<#macro renderFormatItemRowFormCellOpen style></#macro>
+<#macro renderFormatItemRowFormCellClose></#macro>
+
+<#macro renderFormatFieldRowOpen></#macro>
+<#macro renderFormatFieldRowClose></#macro>
+<#macro renderFormatFieldRowTitleCellOpen style></#macro>
+<#macro renderFormatFieldRowTitleCellClose></#macro>
+<#macro renderFormatFieldRowSpacerCell></#macro>
+<#macro renderFormatFieldRowWidgetCellOpen positionSpan style></#macro>
+<#macro renderFormatFieldRowWidgetCellClose></#macro>
+
+<#macro renderFormatEmptySpace> </#macro>
+
+<#macro renderTextFindField name value defaultOption opEquals opBeginsWith opContains opIsEmpty opNotEqual className alert size maxlength autocomplete titleStyle hideIgnoreCase ignCase ignoreCase><@renderField value/></#macro>
+
+<#macro renderDateFindField className alert name localizedInputTitle value size maxlength dateType formName defaultDateTimeString imgSrc localizedIconTitle titleStyle defaultOptionFrom defaultOptionThru opEquals opSameDay opGreaterThanFromDayStart opGreaterThan opGreaterThan opLessThan opUpToDay opUpThruDay opIsEmpty></#macro>
+
+<#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals value2 defaultOptionThru></#macro>
+
+<#macro renderLookupField className alert name value size maxlength autocomplete descriptionFieldName formName lookupFieldFormName targetParameterIter imgSrc></#macro>
+<#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel></#macro>
+<#macro renderFileField className alert name value size maxlength autocomplete></#macro>
+<#macro renderPasswordField className alert name value size maxlength id autocomplete></#macro>
+<#macro renderImageField value border width height event action></#macro>
+<#macro renderBanner style leftStyle rightStyle leftText text rightText></#macro>
+<#macro renderFieldGroupOpen style id title collapsed collapsibleAreaId collapsible expandToolTip collapseToolTip></#macro>
+<#macro renderFieldGroupClose style id title></#macro>
+
+<#macro renderHyperlinkTitle name title></#macro>
+<#macro renderSortField style title linkUrl ajaxEnabled></#macro>
+<#macro formatBoundaryComment boundaryType widgetType widgetName></#macro>
+<#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description><@renderField description /></#macro>
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc linkUrl targetWindow description><@renderField description /></#macro>
+<#macro renderTooltip tooltip tooltipStyle></#macro>
+<#macro renderAsterisks requiredField requiredStyle></#macro>

Modified: ofbiz/trunk/framework/widget/templates/xmlScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/xmlScreenMacroLibrary.ftl?rev=763520&r1=763519&r2=763520&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/xmlScreenMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/xmlScreenMacroLibrary.ftl Thu Apr  9 06:01:21 2009
@@ -21,74 +21,28 @@
 <#macro renderSectionEnd>
 </#macro>
 <#macro renderContainerBegin id style autoUpdateLink autoUpdateInterval>
-<#if autoUpdateLink?has_content>
-<script type="text/javascript">ajaxUpdateAreaPeriodic('${id}', '${autoUpdateLink}', '', '${autoUpdateInterval}');</script>
-</#if>
-<div<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if>>
 </#macro>
-<#macro renderContainerEnd></div></#macro>
-<#macro renderContentBegin editRequest enableEditValue editContainerStyle><#if editRequest?has_content && enableEditValue><div class=${editContainerStyle}></#if></#macro>
+<#macro renderContainerEnd></#macro>
+<#macro renderContentBegin editRequest enableEditValue editContainerStyle></#macro>
 <#macro renderContentBody></#macro>
 <#macro renderContentEnd urlString editMode editContainerStyle editRequest enableEditValue>
-<#if editRequest?exists && enableEditValue>
-<#if urlString?exists><a href="${urlString}">${editMode}</a><#rt/></#if>
-<#if editContainerStyle?exists></div><#rt/></#if>
-</#if>
 </#macro>
-<#macro renderSubContentBegin editContainerStyle editRequest enableEditValue><#if editRequest?exists && enableEditValue><div class="${editContainerStyle}"></#if></#macro>
+<#macro renderSubContentBegin editContainerStyle editRequest enableEditValue></#macro>
 <#macro renderSubContentBody></#macro>
 <#macro renderSubContentEnd>
-<#if editRequest?exists && enableEditValue>
-<#if urlString?exists><a href="${urlString}">${editMode}</a><#rt/></#if>
-<#if editContainerStyle?exists></div><#rt/></#if>
-</#if>
 </#macro>
 
-<#macro renderHorizontalSeparator id style><hr<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if>/></#macro>
-<#macro renderLabel text id style><#if text?exists><#if id?has_content || style?has_content><span<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if>></#if>${text}<#if id?has_content || style?has_content></span></#if></#if></#macro>
+<#macro renderHorizontalSeparator id style></#macro>
+<#macro renderLabel text id style></#macro>
 <#macro renderLink parameterList targetWindow target uniqueItemName linkType actionUrl id style name linkUrl text imgStr>
-<#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>
-<input name="${parameter.name}" value="${parameter.value}" type="hidden"/><#rt/>
-</#list>
-</form><#rt/>
-</#if>
-<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 image?has_content>${imgStr}<#else><#if text?has_content>${text}</#if></#if></a>
 </#macro>
 <#macro renderImage src id style wid hgt border alt urlString>
-<#if src?has_content>
-<img <#if id?has_content>id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if wid?has_content> width="${wid}"</#if><#if hgt?has_content> height="${hgt}"</#if><#if border?has_content> border="${border}"</#if><#if alt?has_content> alt="${alt}"</#if> src="${urlString}" />
-</#if>
 </#macro>
 
-<#macro renderContentFrame fullUrl width height border><iframe src="${fullUrl}" width="${width}" height="${height}" <#if border?has_content>border="${border}"</#if> /></#macro>
+<#macro renderContentFrame fullUrl width height border></#macro>
 <#macro renderScreenletBegin id title collapsible collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled>
-<div class="screenlet"<#if id?has_content> id="${id}"</#if>><#rt/>
-<#if showMore>
-<div class="screenlet-title-bar"><ul><#if title?has_content><li class="h3">${title}</li></#if>
-<#if collapsible>
-<li class="<#rt/>
-<#if collapsed>
-collapsed"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
-<#else>
-expanded"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
-</#if>
->&nbsp</a></li>
-</#if>
-<#if !collapsed>
-${menuString}
-</#if>
-</ul><br class="clear" /></div><div <#if collapsibleAreaId?has_content> id="${collapsibleAreaId}" <#if collapsed> style="${collapsed}display: none;"</#if></#if><#if padded> class="screenlet-body"</#if>>
-</#if>
 </#macro>
 <#macro renderScreenletSubWidget></#macro>
-<#macro renderScreenletEnd></div></div></#macro>
+<#macro renderScreenletEnd></#macro>
 <#macro renderScreenletPaginateMenu>
-<li class="${paginateLastStyle}<#if lastLinkUrl?has_content>"><a href="${lastLinkUrl}">${paginateLastLabel}</a><#else> disabled">${paginateLastLabel}</#if></li><#rt/>
-<li class="${paginateNextStyle}<#if nextLinkUrl?has_content>"><a href="${nextLinkUrl}">${paginateNextLabel}</a><#else> disabled">${paginateNextLabel}</#if></li><#rt/>
-<#if listSize>0>${lowIndex + 1}" - "${lowIndex + actualPageSize}" "${ofLabel}" "${listSize}<#rt/></#if>
-<li class="${paginatePreviousStyle}<#if previousLinkUrl?has_content>"><a href="${previousLinkUrl}">${paginatePreviousLabel}</a><#else> disabled">${paginatePreviousLabel}</#if></li><#rt/>
-<li class="${paginateFirstStyle}<#if firstLinkUrl?has_content>"><a href="${firstLinkUrl}">${paginateFirstLabel}</a><#else> disabled">${paginateFirstLabel}</#if></li>
 </#macro>
\ No newline at end of file