Ummm... yeah, but "fixes an issue" does NOT equal "bug". Everything (bug fixes and new features) fixes an issue, otherwise we wouldn't bother working on anything, would we?
On the extra lines... you're a committer... if you want to clean stuff up and they are good cleanups then that's your job, not something you should be afraid to do.
-David On Oct 26, 2007, at 12:28 PM, Jacques Le Roux wrote:
Not exactly, there were nothing before like that (so I agree it a new thing) but it fixes an issue. Because this was not working before.You had to put an external request in the apllication controller, copied from an other application controller. Anyway it's easy to revert, but I still think it was missing in release (I did not touch applications in this commit only framework)BTW sorry for the not related lines changed, always my setting which automatically formats accordingly to best practices. Assuggested by Adam I should use more diff before commiting... Jacques De : "David E Jones" <[EMAIL PROTECTED]>Objet : Re: svn commit: r588630 - in /ofbiz/branches/release4.0/ framework/widget: dtd/widget-form.xsd src/org/ofbiz/widget/form/ModelForm.java src/org/ofbiz/widget/html/ HtmlFormRenderer.javaIsn't this a new feature, and not a bug fix? Ie, adding the target-type attribute where it didn't exist, and changing semantics of things?-David On Oct 26, 2007, at 6:53 AM, [EMAIL PROTECTED] wrote:Author: jleroux Date: Fri Oct 26 05:53:08 2007 New Revision: 588630 URL: http://svn.apache.org/viewvc?rev=588630&view=rev Log: Applied fix from trunk for revision: 582338 Modified: ofbiz/branches/release4.0/framework/widget/dtd/widget-form.xsd ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/ form/ModelForm.java ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/ html/HtmlFormRenderer.java Modified: ofbiz/branches/release4.0/framework/widget/dtd/widget- form.xsd URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/ framework/widget/dtd/widget-form.xsd? rev=588630&r1=588629&r2=588630&view=diff==================================================================== ========== --- ofbiz/branches/release4.0/framework/widget/dtd/widget-form.xsd (original) +++ ofbiz/branches/release4.0/framework/widget/dtd/widget-form.xsd Fri Oct 26 05:53:08 2007 @@ -187,13 +187,13 @@ </xs:attribute> <xs:attribute type="xs:string" name="header-row-style"> <xs:annotation><xs:documentation>The header-row-style specifies the style to use in the header of table.</ xs:documentation></xs:annotation> - </xs:attribute> + </xs:attribute> <xs:attribute type="xs:string" name="default-table-style"> <xs:annotation><xs:documentation>The default-table- style specifies the style to use in the table.</xs:documentation></ xs:annotation> </xs:attribute> <!-- not sure this is such a good idea<xs:attribute type="xs:string" name="hidden-values-map- name">- <xs:annotation><xs:documentation>A map that contains hidden field name/value pairs. + <xs:annotation><xs:documentation>A map that contains hidden field name/value pairs. The reason for this is to eliminate the need to code custom forms so that auxiliary, passthru data can be sent to the server. By doing it this way, more standard forms can be used. </xs:documentation></xs:annotation> @@ -208,6 +208,7 @@ <xs:attributeGroup name="attlist.alt-target"> <xs:attribute type="xs:string" name="use-when" use="required"/> <xs:attribute type="xs:string" name="target"/> + <xs:attribute type="xs:string" name="target-type"/> </xs:attributeGroup> <xs:element name="auto-fields-service"> <xs:complexType> @@ -300,7 +301,7 @@ <xs:attributeGroup name="attlist.sort-field"> <xs:attribute type="xs:string" name="name" use="required"/> </xs:attributeGroup> - + <!-- ================== FIELDS ==================== --> <xs:element name="AllFields" abstract="true"/> <xs:element name="field"> @@ -448,7 +449,7 @@ <xs:element name="date-time" substitutionGroup="AllFields"> <xs:annotation> <xs:documentation> - A special entry for date-time fields; may just have a default size text + A special entry for date-time fields; may just have a default size text entry box and some sort of widget to make date entry/selection easier. </xs:documentation> </xs:annotation> @@ -923,8 +924,8 @@ <xs:attribute type="xs:string" name="list-entry-name"> <xs:annotation> <xs:documentation> - If specified the list entry will be placed in the local - context, otherwise each list entry must be a Map that will be expanded + If specified the list entry will be placed in the local + context, otherwise each list entry must be a Map that will be expanded into the local context. </xs:documentation> </xs:annotation> @@ -932,7 +933,7 @@ <xs:attribute type="xs:string" name="key-name" use="required"> <xs:annotation> <xs:documentation> - The value of the key-name will be the value passed + The value of the key-name will be the value passed to the server; this should be the full name of the location of the key value in the context, given the list-entry- name or expanded list-entry Map as the options you would most likely use. Modified: ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/ widget/form/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/ framework/widget/src/org/ofbiz/widget/form/ModelForm.java? rev=588630&r1=588629&r2=588630&view=diff==================================================================== ========== --- ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/ form/ModelForm.java (original) +++ ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/ form/ModelForm.java Fri Oct 26 05:53:08 2007 @@ -1537,7 +1537,7 @@ /** iterate through altTargets list to see if any should be used, if not return original target * @return The target for this Form */ - public String getTarget(Map context) { + public String getTarget(Map context, String targetType) { try { // use the same Interpreter (ie with the same context setup) for all evals Interpreter bsh = this.getBshInterpreter(context); @@ -1555,7 +1555,7 @@ "Return value from target condition eval was not a Boolean: " + retVal.getClass().getName() + " [" + retVal + "] of form " + this.name); } - if (condTrue) { + if (condTrue && !targetType.equals("inter-app")) { return altTarget.target; } } @@ -1797,7 +1797,7 @@ public String getPaginateTarget(Map context) { String targ = this.paginateTarget.expandString(context); if (UtilValidate.isEmpty(targ)) { - targ = getTarget(context); + targ = getTarget(context, null); } return targ; @@ -1823,15 +1823,15 @@ Object value = context.get(field); if (value == null) { - // try parameters.VIEW_INDEX as that is an old OFBiz convention - Map parameters = (Map) context.get("parameters"); - if (parameters != null) { - value = parameters.get("VIEW_INDEX"); - - if (value == null) { - value = parameters.get(field); - } - } + // try parameters.VIEW_INDEX as that is an old OFBiz convention + Map parameters = (Map) context.get("parameters"); + if (parameters != null) { + value = parameters.get("VIEW_INDEX"); + + if (value == null) { + value = parameters.get(field); + } + } } if (value instanceof Integer) { @@ -1862,15 +1862,15 @@ Object value = context.get(field); if (value == null) { - // try parameters.VIEW_SIZE as that is an old OFBiz convention - Map parameters = (Map) context.get("parameters"); - if (parameters != null) { - value = parameters.get("VIEW_SIZE"); - - if (value == null) { - value = parameters.get(field); - } - } + // try parameters.VIEW_SIZE as that is an old OFBiz convention + Map parameters = (Map) context.get("parameters"); + if (parameters != null) { + value = parameters.get("VIEW_SIZE"); + + if (value == null) { + value = parameters.get(field); + } + } } if (value instanceof Integer) { Modified: ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/ widget/html/HtmlFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/ framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java? rev=588630&r1=588629&r2=588630&view=diff==================================================================== ========== --- ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/ html/HtmlFormRenderer.java (original) +++ ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/ html/HtmlFormRenderer.java Fri Oct 26 05:53:08 2007 @@ -1014,8 +1014,8 @@ buffer.append("<!-- begin form widget -->"); this.appendWhitespace(buffer); buffer.append("<form method=\"post\" "); - String targ = modelForm.getTarget(context); String targetType = modelForm.getTargetType(); + String targ = modelForm.getTarget(context, targetType);// The 'action' attribute is mandatory in a form definition,// even if it is empty. buffer.append(" action=\"");
smime.p7s
Description: S/MIME cryptographic signature
