Re: cocoon 2.1.x and java 8
Let me see what can I do. Francesco Chicchiriccò Escribio :-) On 31/01/2015 06:24, Francesco Chicchiriccò wrote: On 30/01/2015 15:09, Carlos Chávez wrote: Hi Francesco. I uploaded the patch. Hi Carlos, patch applied (and issue closed), thanks. It seems there is a problem; see https://builds.apache.org/job/Cocoon%202.1.X/98/console bad class file: /home/jenkins/jenkins-slave/workspace/Cocoon 2.1.X/BRANCH_2_1_X/lib/core/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar(org/eclipse/jdt/core/compiler/IProblem.class) class file has wrong version 50.0, should be 48.0 This means that the JAR above does not work with JDK 1.4, which is currently a pre-requisite for Cocoon 2.1.X - can you find a compatible version of that JAR? Alternatively I will need to revert the patch... Regards. On 16/01/15 01:24, Francesco Chicchiriccò wrote: On 15/01/2015 18:59, Carlos Chávez wrote: Hi Francesco. I downloaded that file and it works with java 8. I found another test that is failing, http://localhost:/samples/blocks/xsp/java/java5, this seems to be related to : // Set the sourceCodeVersion // Set the target platform Check the patch: Hi, thanks for reporting: could you please unify my patch with your changes and attach the resulting patch to https://issues.apache.org/jira/browse/COCOON-2344 ? Thanks. Regards. Index: src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java === --- workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java (revision 1652165) +++ workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java (working copy) @@ -215,8 +215,11 @@ } return result; } -} +public boolean ignoreOptionalProblems() { +return false; +} +} final INameEnvironment env = new INameEnvironment() { @@ -336,6 +339,18 @@ } // Set the sourceCodeVersion switch (this.compilerComplianceLevel) { +case 180: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8); + settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8); +break; +case 170: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7); + settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7); +break; +case 160: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); + settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); +break; case 150: settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); @@ -348,6 +363,15 @@ } // Set the target platform switch (SystemUtils.JAVA_VERSION_INT) { +case 180: + settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8); +break; +case 170: + settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7); +break; +case 160: + settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); +break; case 150: settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); break; On 15/01/15 02:19, Francesco Chicchiriccò wrote: On 08/01/2015 00:12, Carlos Chávez wrote: Hi all. I'm trying to run cocoon in java 8, I found an issue with the JDT core that did not recognize java 8, the version in cocoon is lib/core/jdtcore-3.1.0.jar I did tried updating that version, what I did was copy the file org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna Installation and it works. I did not find a public repository to download the jtdcore jar, I searched in maven repos and did not find any updated jar. When I compile and run cocoon with java 8, i found the issue testing the sample http://localhost:/samples/blocks/xsp/java/cacheable which it throw a NullPointerException when it tried to compile the XPS. With that version the exception is gone and the page is generated. thoughts, please ? Hi Carlos, I tried as you explain above and got exactly the same results: only found this updated JAR [1], but the error is the same. However, I have found these places [2] [3] from which the version reported above can be downloaded. I have opened COCOON-2344 [4] and provided a patch with which the XSP sample above is working
Re: cocoon 2.1.x and java 8
Hi Francesco. I uploaded the patch. On 16/01/15 01:24, Francesco Chicchiriccò wrote: On 15/01/2015 18:59, Carlos Chávez wrote: Hi Francesco. I downloaded that file and it works with java 8. I found another test that is failing, http://localhost:/samples/blocks/xsp/java/java5, this seems to be related to : // Set the sourceCodeVersion // Set the target platform Check the patch: Hi, thanks for reporting: could you please unify my patch with your changes and attach the resulting patch to https://issues.apache.org/jira/browse/COCOON-2344 ? Thanks. Regards. Index: src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java === --- workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java (revision 1652165) +++ workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java (working copy) @@ -215,8 +215,11 @@ } return result; } -} +public boolean ignoreOptionalProblems() { +return false; +} +} final INameEnvironment env = new INameEnvironment() { @@ -336,6 +339,18 @@ } // Set the sourceCodeVersion switch (this.compilerComplianceLevel) { +case 180: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8); +settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8); +break; +case 170: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7); +settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7); +break; +case 160: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); +settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); +break; case 150: settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); @@ -348,6 +363,15 @@ } // Set the target platform switch (SystemUtils.JAVA_VERSION_INT) { +case 180: +settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8); +break; +case 170: +settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7); +break; +case 160: +settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); +break; case 150: settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); break; On 15/01/15 02:19, Francesco Chicchiriccò wrote: On 08/01/2015 00:12, Carlos Chávez wrote: Hi all. I'm trying to run cocoon in java 8, I found an issue with the JDT core that did not recognize java 8, the version in cocoon is lib/core/jdtcore-3.1.0.jar I did tried updating that version, what I did was copy the file org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna Installation and it works. I did not find a public repository to download the jtdcore jar, I searched in maven repos and did not find any updated jar. When I compile and run cocoon with java 8, i found the issue testing the sample http://localhost:/samples/blocks/xsp/java/cacheable which it throw a NullPointerException when it tried to compile the XPS. With that version the exception is gone and the page is generated. thoughts, please ? Hi Carlos, I tried as you explain above and got exactly the same results: only found this updated JAR [1], but the error is the same. However, I have found these places [2] [3] from which the version reported above can be downloaded. I have opened COCOON-2344 [4] and provided a patch with which the XSP sample above is working (checked with OpenJDK 6 / 7 / 8). I have not committed the fix because I have no mean to check if everything is working with Java 4 / 5 and also if other XSP features are affected. Can anyone please double check and confirm if the proposed patch can be committed? Regards. [1] http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar [2] http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar [3] http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar [4] https://issues.apache.org/jira
Re: cocoon 2.1.x and java 8
Hi Francesco. I downloaded that file and it works with java 8. I found another test that is failing, http://localhost:/samples/blocks/xsp/java/java5, this seems to be related to : // Set the sourceCodeVersion // Set the target platform Check the patch: Index: src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java === --- workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java (revision 1652165) +++ workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java (working copy) @@ -215,8 +215,11 @@ } return result; } -} +public boolean ignoreOptionalProblems() { +return false; +} +} final INameEnvironment env = new INameEnvironment() { @@ -336,6 +339,18 @@ } // Set the sourceCodeVersion switch (this.compilerComplianceLevel) { +case 180: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8); +settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8); +break; +case 170: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7); +settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7); +break; +case 160: +settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); +settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); +break; case 150: settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); @@ -348,6 +363,15 @@ } // Set the target platform switch (SystemUtils.JAVA_VERSION_INT) { +case 180: +settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8); +break; +case 170: +settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7); +break; +case 160: +settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); +break; case 150: settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); break; On 15/01/15 02:19, Francesco Chicchiriccò wrote: On 08/01/2015 00:12, Carlos Chávez wrote: Hi all. I'm trying to run cocoon in java 8, I found an issue with the JDT core that did not recognize java 8, the version in cocoon is lib/core/jdtcore-3.1.0.jar I did tried updating that version, what I did was copy the file org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna Installation and it works. I did not find a public repository to download the jtdcore jar, I searched in maven repos and did not find any updated jar. When I compile and run cocoon with java 8, i found the issue testing the sample http://localhost:/samples/blocks/xsp/java/cacheable which it throw a NullPointerException when it tried to compile the XPS. With that version the exception is gone and the page is generated. thoughts, please ? Hi Carlos, I tried as you explain above and got exactly the same results: only found this updated JAR [1], but the error is the same. However, I have found these places [2] [3] from which the version reported above can be downloaded. I have opened COCOON-2344 [4] and provided a patch with which the XSP sample above is working (checked with OpenJDK 6 / 7 / 8). I have not committed the fix because I have no mean to check if everything is working with Java 4 / 5 and also if other XSP features are affected. Can anyone please double check and confirm if the proposed patch can be committed? Regards. [1] http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar [2] http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar [3] http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar [4] https://issues.apache.org/jira/browse/COCOON-2344 -- Saludos. Carlos Chávez. AG Software, S.A.
cocoon 2.1.x and java 8
Hi all. I'm trying to run cocoon in java 8, I found an issue with the JDT core that did not recognize java 8, the version in cocoon is lib/core/jdtcore-3.1.0.jar I did tried updating that version, what I did was copy the file org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna Installation and it works. I did not find a public repository to download the jtdcore jar, I searched in maven repos and did not find any updated jar. When I compile and run cocoon with java 8, i found the issue testing the sample http://localhost:/samples/blocks/xsp/java/cacheable which it throw a NullPointerException when it tried to compile the XPS. With that version the exception is gone and the page is generated. thoughts, please ? -- Saludos. Carlos Chávez. AG Software, S.A.
Re: BRANCH_2_1_X-dojo1_1 - dojoId is not defined
Jeroen Reijn Escribio :-) Hi, there was some effort of updating to dojo 1.1, but the work in the branch as far as I know is not finished. Jeroen Hi Jeroen. thanks for the feedback. I'm trying to help in the testing, I know Jeremy work sometime ago on this branch. So, in anycase I'm attaching another patch, this patch is to make work again the suggestion list of type javascript: fd:suggestion-list type=javascript -- Cheers. Carlos Chávez. On Mon, Jul 5, 2010 at 6:56 AM, Carlos Chávez ccha...@agssa.net wrote: Hi guys. I was testing the branch http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X-dojo1_1. I enter in the sample: http://localhost:/samples/blocks/forms/do-calculatedfields.flow I tried to add a row to the repeater and it shows the error: dojoId is not defined. I attached to the email the fix for this error. -- Cheers. Carlos Chávez. ### Eclipse Workspace Patch 1.0 #P BRANCH_2_1_X-dojo1_1 Index: src/blocks/forms/resources/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl === --- src/blocks/forms/resources/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl (revision 960158) +++ src/blocks/forms/resources/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl (working copy) @@ -47,13 +47,14 @@ xsl:param name=dojo-resourcesxsl:value-of select=$context-path//_cocoon/resources/dojotoolkit/xsl:param !-- Url prefix for dojo resources -- xsl:param name=forms-resourcesxsl:value-of select=$context-path//_cocoon/resources/forms/xsl:param !-- Url prefix for forms block resources -- xsl:param name=forms-systemxsl:value-of select=$context-path//_cocoon/system/forms/xsl:param!-- Url prefix for forms block system pipelines -- - + xsl:param name=forms-suggest_cocoon/system/forms/suggestionlist/xsl:param !-- Special case for the suggest widget -- + !-- set the default dojo css theme, other choices are currently 'nihilo' and 'soria' -- xsl:param name=dojo-theme-defaulttundra/xsl:param - + !-- A convenient way for samples to have a url that switches the theme. If your app does not want this, don't send this param from your sitemap -- xsl:param name=dojo-theme-param/xsl:param - + !-- the determine dojo css theme to use -- xsl:variable name=dojo-theme xsl:choose @@ -61,15 +62,15 @@ xsl:otherwisexsl:value-of select=$dojo-theme-param//xsl:otherwise /xsl:choose /xsl:variable - + !-- option to turn on console debugging for dojo on the browser and loading of uncompressed resources, from a parameter in the sitemap -- xsl:param name=dojo-debugfalse/xsl:param xsl:variable name=dojo-debug-jsxsl:if test=$dojo-debug='true'.uncompressed.js/xsl:if/xsl:variable!-- load the uncompressed version for debug mode -- xsl:variable name=dojo-debug-cssxsl:if test=$dojo-debug='true'.commented.css/xsl:if/xsl:variable - + !-- Configure the dojo locale from a parameter in the sitemap (required?). -- - xsl:param name=dojo-locale/xsl:param - + xsl:param name=dojo-locale/xsl:param + !-- Create a variable with the normalized locale, dojo needs locale parts to be separated with a dash -- xsl:variable name=dojoLocale xsl:choose @@ -81,7 +82,7 @@ /xsl:otherwise /xsl:choose /xsl:variable - + !-- create a variable for the dojo configuration -- xsl:variable name=djConfig isDebug: xsl:value-of select=$dojo-debug/, @@ -94,11 +95,11 @@ locale: 'xsl:value-of select=$dojoLocale/'xsl:if test=$dojo-use-cdn = 'true' and $dojo-cdn != '', dojoBlankHtmlUrl: 'xsl:value-of select=$dojo-resources//dojo/resources/blank.html', dojoIframeHistoryUrl: 'xsl:value-of select=$dojo-resources//dojo/resources/iframe_history.html', !-- not currently used by cforms itself -- -baseUrl: './', +baseUrl: './', xdWaitSeconds: 10/xsl:if /xsl:variable - xsl:template match=head mode=forms-field + xsl:template match=head mode=forms-field xsl:choose xsl:when test=$dojo-use-cdn = 'true' and $dojo-cdn != '' link rel=stylesheet type=text/css href={$dojo-cdn}/dijit/themes/dijit.css/!-- Google CDN does not keep *.commented.css -- @@ -146,11 +147,11 @@ | Adds support for live data validation on the client, based on fi:datatype | (Browser validation may be turned off with fi:styling/@browserValidation=false) +-- - + !-- TODO: Document new options -- !-- TODO: fi:styling/@regExp should not be a user tag, it should come from the validator (eventually?) -- - - xsl:template match=fi:field[not(fi:styling/@type='inplace-area') and (@state='active' or @state='disabled')] | + + xsl:template match=fi:field[not(fi:styling/@type='inplace-area') and (@state='active' or @state='disabled')] | fi:aggregatefield
BRANCH_2_1_X-dojo1_1 - dojoId is not defined
Hi guys. I was testing the branch http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X-dojo1_1. I enter in the sample: http://localhost:/samples/blocks/forms/do-calculatedfields.flow I tried to add a row to the repeater and it shows the error: dojoId is not defined. I attached to the email the fix for this error. -- Cheers. Carlos Chávez. ### Eclipse Workspace Patch 1.0 #P BRANCH_2_1_X-dojo1_1 Index: src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/common.js === --- src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/common.js (revision 960158) +++ src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/common.js (working copy) @@ -71,7 +71,7 @@ var formId = form.id; if (dojo formId) { // Delegate to the SimpleForm or AjaxForm widget -dijit.byId(dojoId).submit(name, params); +dijit.byId(formId).submit(name, params); } else { // Regular submit. There is no *Form widget available @@ -218,7 +218,7 @@ */ cocoon.forms.defaults = { - + statusMark: *, constraints: { // default constraints for numerical datatypes decimal: {pattern:###0.###, type: decimal, locale:en}, // PlainDecimalConvertor NB. Dojo has no concept of a plain number, hence force it to show 'en' to get '.' decimal @@ -226,7 +226,7 @@ float: {pattern:###0.###, type: decimal, locale:en}, // PlainFloatConvertor integer: {pattern: '#', places: 0, min: -2147483648, max: 2147483647}, // PlainIntegerConvertor long: {pattern: '#', places: 0, min: -9223372036854775808, max: 9223372036854775807},// PlainLongConvertor -l10n-currency: {fractional:true}, // FormattingDecimalConverter - currency variant +l10n-currency: {fractional:true}, // FormattingDecimalConverter - currency variant l10n-integer: {places: 0, min: -2147483648, max: 2147483647}, // FormattingIntegerConverter l10n-long: {places: 0, min:-9223372036854775808, max: 9223372036854775807}, // FormattingLongConverter l10n-number: {type: decimal}, // FormattingDecimalConverter, FormattingFloatConverter, FormattingDoubleConverter
usage of cocoon.createObject
Hello All, About the usage of the cocoon.createObject, i notice that on two cocoon sample we did not call the method cocoon.disposeObject for the object created before, is this right ? The sample code is on: 1. src/blocks/lucene/samples/flow.js 2. src/blocks/portal/samples/coplets/basket/basket.js We create the objects: org.apache.cocoon.components.flow.util.PipelineUtil and org.apache.cocoon.samples.LuceneUtil. Cheers, Carlos Chávez.
[CFORMS] forms_submitForm renamed to oldforms_submitForm
Hello to all. we recently update the cocoon 2.1.x from SVN and in cforms the javascript function forms_submitForm was rename to oldforms_submitForm. so, what is the new function ? this change break almost all my forms. any hint ? Carlos Chávez. Cheers. -- Carlos Chávez
Re: [CFORMS] forms_submitForm renamed to oldforms_submitForm
Sylvain Wallez Escribio :-) Carlos Chávez wrote: Hello to all. we recently update the cocoon 2.1.x from SVN and in cforms the javascript function forms_submitForm was rename to oldforms_submitForm. so, what is the new function ? this change break almost all my forms. any hint ? Yes, the forms_submitForm has moved to the new cforms.js file that contains the AJAX stuff, and I renamed the previous version in form-lib.js. You should upgrade the XSLs, which contain the additional script instruction, along with some other changes needed for the AJAX features. Sylvain Hello Sylvain. i see, thansk for the great job with AJAX, antonio and me we use in our webapp. Cheers. Carlos Chávez. -- Sylvain WallezAnyware Technologies http://apache.org/~sylvainhttp://anyware-tech.com Apache Software Foundation Member Research Technology Director -- Carlos Chávez
Re: [CForms] Binding error while saving back?
Tim Larson Escribio :-) On Sat, Jan 31, 2004 at 06:41:49PM -0600, Antonio Gallardo wrote: Hi again :-D In another place we have a binding problem: wb:context path=cuentaInventario wb:value id=prod_id_inventario path=prod_id/ wb:value id=cc_id_inventario path=cc_id/ /wb:context Interesting is that this binding works while load the form, but file while saving the values in the Java Bean using the binding framework. Here is the error: snip org.apache.commons.jxpath.JXPathException: Exception trying to create xpath cuentaInventario; Factory is not set on the JXPathContext - cannot create path: /cuentaInventario /snip Why this does not work? Is this a bug? The object cuentaInventario have the 2 values inside, but the binding framework is not able to set them. exception snipped Hi Tim, I found the error, cuentaInventario was declared of the following way: Productocuentacontable cuentaInventario ; and it had to be declared of the following way: Productocuentacontable cuentaInventario = new Productocuentacontable(); and that corrected the problem. Probably a silly question, but does cuentaInventario have setters defined for prod_id and cc_id? Yes, it's have. Also, is this wb:context snippet inside some other context, such as a repeater, that could be where the binding code actually messes up? Well, i do not use this inside of the repeater. I have found using a javascript binding acts as a good substitute for println statements when debugging issues like this. You could use a javascript binding right before the context binding or before the value bindings to print out the values of the jxpathcontext and jxpathpointer to see of they give any clues. Thanks for the advice. --Tim Larson -- Carlos Chávez
Re: [flowscript] How to set an integer value in the FlowScript?
Hi Joerg, i am think this is related with the datatype of Woody and Java the datatype in woody integer is converter in java.lang.Integer and the datatype in woody decimal is converter in java.math.BigDecimal Joerg Heinicke Escribio :-) I have a little problem when setting a value of a Woody widget which is type integer in the FlowScript: Tried to set value of output widget repeater.offset with an object of an incorrect type: expected class java.lang.Integer, received class java.lang.Double. The JavaScript code is simple: offsetWidget.value = 0; Try this : offsetWidget.setValue(new java.lang.Integer(0)); or offsetWidget.value = new java.lang.Integer(0); I tried to enforce the datatype integer in the JavaScript by changing it to: offsetWidget.value = parseInt(0); but had no success. Now I tried to access the error on the other end by changing the Woody definition and binding. As there is no double datatype I tried float with the following result: Tried to set value of output widget repeater.offset with an object of an incorrect type: expected class java.lang.Float, received class java.math.BigDecimal. That was not what I expected! Also this error occurs on binding load time, not when I set the value. Is this a bug?? Next try was to set the datatype in Woody definition and binding to decimal, but here I'm back at the expected error message: expected class java.math.BigDecimal, received class java.lang.Double. with the decimal datatype try this: repeater.offset = new java.math.BigDecimal(0); How to fix it? Joerg I hope help you. Cheers, Carlos Chávez
Re: Passing request params to a flowscript thru a resource?
Stephan Coboos Escribio :-) Hello, because I've got no answer for my question postet in the users list before, I will try it on the dev list... I have the following sitemap fragment: ... map:resources map:resource name=main map:call function=main/ /map:resource /map:resources map:flow language=javascript map:script src=flows/myScript.js/ /map:flow map:pipelines map:pipeline map:match pattern= map:call resource=main/ /map:match /map:pipeline /map:pipelines ... In the match section I'm calling the resource 'main' which is calling a flowscript function itself. But if I do that this way I don't have access to the request params in the flowscript because cocoon.request... returns nothing! Hi, Stephan try in flowcript this: var parameter = cocoon.parameters[parameter from sitemap] Cheers, How do I activate passing request parameters thru resources to a flowscript? Thank you. Regards Stephan -- Carlos Chávez AG Software, S.A. 876-8344 267-3007