Thanks to Bill. I *think* that the xreporter-expressions jar in Cocoon 2.1.6 needs to be updated to use this fix (that is part of xReporter, latest rev.).
thx Paul Note: forwarded message attached. ===== This communication, including attachments, is for the exclusive use of the addressee and may contain proprietary, confidential, or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination, or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender by return mail and delete this communication and destroy all copies.
--- Begin Message ---Grab the latest version of xReporter from SVN, or try to patch your existing install by taking only what you need from SVN. The function itself is at http://svn.cocoondev.org/viewsvn/trunk/xreporter/src/java/org/outerj/exp ression/NVLFunction.java?view=log&rev=624&root=xreporter and you'll need to modify/get latest DefaultFunctionFactory as well: http://svn.cocoondev.org/viewsvn/trunk/xreporter/src/java/org/outerj/exp ression/DefaultFunctionFactory.java?view=log&rev=624&root=xreporter You should be able to put these in XREPORTER_HOME/src/java/org/outerj/expression and redeploy. Don't know anything about the Cocoon Forms environment you're in, so I don't know what you need to do to register the function there, if anything. Good luck. Bill -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Joseph Sent: Monday, January 03, 2005 10:47 AM To: Paul Joseph; xReporter: webbased db reporting - general mailinglist Subject: RE: [xreporter] Fwd: aggregate field with optional values Hi Bruyn, How can I get a build that has the NVL function? At present, with this fix, I am getting an error that says that the function NVL does not exist as follows: "Nonexisting function name 'NVL'" I would lile to get this fix for both XReporter AND Cocoon if possible! I think this is exactly the problem that I am seeing and that this fix will solve it for me! thx Paul --- Paul Joseph <[EMAIL PROTECTED]> wrote: > Hi Bruyn, > > Thank you for your kind reply. > > Unfortunately it is not putting out any error msg., > but failing silently..... > > I will try what you suggest below, it sounds very > much > like the issue that I am seeing. It has nothing o > do > with xReporter other than CocoonForms seems to be > using the same code for expressions that xReporter > uses (or very similar code).. > > thanks again! > > Paul > --- Bruyn Bill <[EMAIL PROTECTED]> wrote: > > > First, what Marc asked for was specifics on 'does > > not appear to work'. > > While you've outlined in greater detail what it is > > that you're trying to > > accomplish, I don't think we have any better idea > of > > the problem you're > > experiencing. Do you have an error message / > stack > > trace? > > > > Secondly, I'm not sure I understand the context of > > this question - no > > experience with Cocoon Forms, and never before > seen > > the elements you > > list below (does this question have anything to do > > with xReporter?) - so > > take this feedback for what it's worth. > > > > I had a similar problem (I think) with xReporter a > > while back. IIRC, an > > InputField does not get created unless its value > is > > not null, so an > > exception is thrown when you try to reference it > > later. I created an > > NVL expression to work around that by returning > the > > value of a second > > argument when the first evaluates to null, or when > > evaluation of the > > first yields an exception. > > > > Assuming you have a build that includes the NVL > > function, you might try > > something like the following: > > > > <fd:combine expression = 'Concat(NVL(part1, ""), > > "-_-", NVL(part2, > > ""), "-_-", NVL(part3, ""))'/> > > > > > > HTH, > > > > Bill > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On > > Behalf Of Paul Joseph > > Sent: Monday, January 03, 2005 6:30 AM > > To: xReporter: webbased db reporting - general > > mailinglist > > Subject: Re: [xreporter] Fwd: aggregate field with > > optional values > > > > > > Hi Marc, > > > > Thank you kindly for your reply. > > > > The issue I am facing is as follows: > > > > I have a "simple" aggregate field made up of three > > parts, and would like to make filling of any of > > these > > parts optional to the user. > > > > Since I would like the user to be able to type in > > almost anything in each part, I have made the > > separator a combination that they are fairly > > unlikely > > to type. > > > > My model is as follows: > > > > <fd:aggregatefield id="requestaggregate" > > required="false"> > > <fd:label/> > > <fd:datatype base="string"/> > > <fd:split pattern="(.*)?-_-(.*)?-_-(.*)?"> > > <fd:map group="1" field="part1"/> > > <fd:map group="2" field="part2"/> > > <fd:map group="3" field="part3"/> > > </fd:split> > > <fd:combine expression = 'Concat(part1, "-_-", > > part2, > > "-_-", part3)'/> > > <fd:widgets> > > <fd:field id="part1" required="false"> > > <fd:datatype base="string"/> > > </fd:field> > > <fd:field id="part2" required="false"> > > <fd:datatype base="string"/> > > </fd:field> > > <fd:field id="part3" required="false"> > > <fd:datatype base="string"/> > > </fd:field> > > </fd:widgets> > > </fd:aggregatefield> > > > > I find that it either requires all the parts to be > > filled or none of the parts. > > > > If I leave one part unfilled, then it will not > save > > to > > the database, because I think it is not passing > some > > validation even though I have requested no > > validation. > > > > If however, I go to the backend database and > there, > > I > > delete from the data, any one of the parts, > > then the form populates correctly, leading me to > > think > > that the problem is not with the "split pattern" > but > > with the "combine expression" line: > > > > <fd:combine expression = 'Concat(part1, "-_-", > > part2, > > "-_-", part3)'/> > > > > This does not appear to work/validate when part1 > or > > part2 or part3 is blank. > > > > Any help would be much appreciated! > > > > TIA > > Paul > > > > --- Marc Portier <[EMAIL PROTECTED]> wrote: > > > > > Paul, > > > > > > did a quick scan on the code for the regular > > > suspects but didn't stumble > > > over any obvious reasons > > > > > > could you give some specifics on the nature of > > 'does > > > not appear to work' > > > > > > do you get any Exception/stacktrace? > > > > > > regards, > > > -marc= > > > > > > Paul Joseph wrote: > > > > Hi, > > > > > > > > I noticed that Concat used by the aggregate > > field > > > > widget in Cocoon Forms may be coming from the > > > > "Expression Language" > > > > > > (http://new.cocoondev.org/xreporter/docs/core/91) > > > used > > > > by xReporter. > > > > > > > > Would there happen to be a bug in Concat, > where > > > one of > > > > the parts being concatenated is blank? > > > > > > > > The issue I am facing is as follows: > > > > > > > > <fd:combine expression = 'Concat(part1, "-_-", > > > part2, > > > > "-_-", part3)'/> > > > > > > > > This does not appear to work/validate when > part1 > > > or > > > > part2 or part3 is blank. > === message truncated === ===== This communication, including attachments, is for the exclusive use of the addressee and may contain proprietary, confidential, or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination, or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender by return mail and delete this communication and destroy all copies. _______________________________________________ xreporter mailing list [EMAIL PROTECTED] http://lists.cocoondev.org/mailman/listinfo/xreporter _______________________________________________ xreporter mailing list [EMAIL PROTECTED] http://lists.cocoondev.org/mailman/listinfo/xreporter
--- End Message ---
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
