Re: flowscript and select with multiple options

2008-10-10 Thread Jeff Schmitz
And just to answer my own question (in case there are other neophyte javascripters out there), the answer is, to get parameter(s) in array format use: var modellerArray = cocoon.request.getParameterValues("listImportExportUsers"); instead of var modellerArray = cocoon.request.ge

Re: flowscript and select with multiple options

2008-10-10 Thread Jeff Schmitz
After some debugging, I've reduced the problem to being that: cocoon.reqest.get(); Will not return an array. If one option is selected, it returns a string such as: "jeff". If more than one option is selected, it returns a String that looks like an array, but it can't be accessed a

Re: flowscript doesn't reach the continuation

2008-10-10 Thread Charlie Rose
This looks similar to the problem I am having with IE7. Just to make sure you have ruled this out: if you are using Internet Explorer to view a single field form, and you type return instead of click submit the page will just reload. Charles Rose CogNet MIT Press Journals On Oct 10, 2008,

Re: how to implement "back button functionality" from within a flow script

2008-10-10 Thread solprovider
I agree with Derek. This post pretends I am a flowscript guru. Variables persist in a continuation. Inside the loop, only update what needs updating i.e. if the list does not require updating, use the existing list. Good programming only runs what is necessary. var done = false; var key= "firs

Re: flowscript doesn't reach the continuation

2008-10-10 Thread solprovider
form.showForm("viewform-component-template"); looks better and may even be correct. This code is complicated by database access and form repeaters. Someone else may check the syntax. I would troubleshoot by logging often. The "print" statement logs to the Cocoon console. Examples: print("id=

flowscript and select with multiple options

2008-10-10 Thread Jeff Schmitz
Hello, I have a page with the following select/option list in a form: name="listImportExportUsers"> jeff jones john smith When this is submitted, how can I get a hold of the entire option list from within flowscript? I tried the following, but nothing in my loop below runs, even mak

Re: flowscript doesn't reach the continuation

2008-10-10 Thread solprovider
These two things are not like the other: pages/component-template.html.xml pages/comnponent-template.xml The former is from my post. Notice the double extension. The latter is from your post. (Misspelled, hopefully a typo) On 10/10/08, Мария Григорьева <[EMAIL PROTECTED]> wrote: > Yes, of cour

RE: pass repeater to the database using javaflow

2008-10-10 Thread Мария Григорьева
Hello! I'm using RepeaterAsList, because when I try to pass Repeater to the procedure public void addRepeater(Repeater repeater, int compositionID), I got the exception: org.mozilla.javascript.EvaluatorException: Can't find method org.apache.cocoon.mysamples.jdbc.postgresJDBCConn.addR

AW: pass repeater to the database using javaflow

2008-10-10 Thread Christofer Dutz
Hi, Well I have never used RepeaterAsList so I can't really say what type the elements are, but in the Web I could find: A List view of a Repeater , each element of the list being a Map wrapping a repeater row, as d

Re: [C2.2] Sitemap: Block Context Path

2008-10-10 Thread Alexander Daniel
On 06.10.2008, at 14:05, Matthias Müller wrote: what's the easiest way to get the context path of the current block (the project root)? i want to to use a parameter $myContextPath in my sitemap to work in a jx template, like this: With these input modules

pass repeater to the database using javaflow

2008-10-10 Thread Мария Григорьева
Hello! I need to pass the repeater params to the database. Here the function: public void addRepeater(RepeaterAsList repeater, int compositionID) throws SQLException { for (int i=0;i

Re: Handling "file not found errors"

2008-10-10 Thread Alexander Daniel
On 10.10.2008, at 12:57, Derek Hohls wrote: I have: src="org.apache.cocoon.selection.ExceptionSelector"> class="org.apache.cocoon.ResourceNotFoundException"/> class="java.io.FileNotFoundException"/> ... (after the last pipeline) ...

Re: Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Robin Wyles
Hi Antonio, Is there a reason why you don't want to specify your properties in META-INF/cocoon/properties/[runningMode]/*.properties rather than WEB- INF/cocoon/properties/[runningMode]/*.properties? I define all my properties in the former and I am able to get the appropriate values for m

RE: Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Perez Guerrero, Antonio Javier
Hi Robin, I found that using RunningModeHelper.determineRunningMode(null) does the same thing :) My problem now is that my Settings object: new MutableSettings(runningMode) has an empty property list, instead of containing all my spring managed properties (defined in WEB-INF/cocoon/proper

Re: Handling "file not found errors"

2008-10-10 Thread Derek Hohls
Thanks Alexander I know I do not quite "grok" this yet... I have: ... (after the last pipeline) ... Which does not seem to work ie. still get same error page below? Thanks Derek >>> On 2008/10/10 at

Re: Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Robin Wyles
Hi, If I understand correctly you want to determine the value of the property "org.apache.cocoon.mode", am I right? If so you can do it like this: String mode = ((Settings) WebAppContextUtils.getCurrentWebApplicationContext().getBean (Settings.ROLE)).getProperty("org.apache.cocoon.mode");

Re: How to force a Save As prompt?

2008-10-10 Thread Derek Hohls
David I agree with your examples below - I guess its been quite a long time since I had to work with systems that made me add ".php" or ".jsp" to my URLs. We are spoiled by Cocoon :) Derek >>> On 2008/10/09 at 03:30, in message <[EMAIL PROTECTED]>, David Legg <[EMAIL >>> PROTECTED]> wrote: D

Re: Handling "file not found errors"

2008-10-10 Thread Alexander Daniel
On 10.10.2008, at 10:48, Derek Hohls wrote: Using Cocoon 2.1.8 I am displaying data from a database that, in theory, contains URL links to files on the local server. Occasionally, for various reasons, the files are not available. At the moment, Cocoon returns an informative - but ugly - er

RE: Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Perez Guerrero, Antonio Javier
Thanks Alex. Unfortunately the status generator uses a ServiceManager object to get the running mode, which I don't know how to get. Anyway, while researching I found that there is a RunningModeHelper class, so now I have this code: Class Config { public Config () { ...

Handling "file not found errors"

2008-10-10 Thread Derek Hohls
Using Cocoon 2.1.8 I am displaying data from a database that, in theory, contains URL links to files on the local server. Occasionally, for various reasons, the files are not available. At the moment, Cocoon returns an informative - but ugly - error page: Resource not found java.io.FileNotFoun

Re: Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Alexander Daniel
On 10.10.2008, at 09:18, Perez Guerrero, Antonio Javier wrote: How can I read spring managed properties from Java, without defining my classes as beans? I’ve tried using org.apache.cocoon.configuration.MutableSettings, which has all the methods that I need... But I cannot instantiate it be

Cocoon Configuration API usage - how to get running mode?

2008-10-10 Thread Perez Guerrero, Antonio Javier
Hi, How can I read spring managed properties from Java, without defining my classes as beans? I've tried using org.apache.cocoon.configuration.MutableSettings, which has all the methods that I need... But I cannot instantiate it because I don't know how to determine the current running mode. Any

RE: flowscript doesn't reach the continuation

2008-10-10 Thread Мария Григорьева
In the other funrction with form.showForm() I have the common problem... function editPhisicalParams() { var id = cocoon.parameters.id; var form = new Form("form-definition/phisical-params.xml"); var formMap = form.asMap(); var params = dao.jdbc.selectPhisicalParams