I have an XSP file that read some UTF8 content in a MySQL database and spits
out an XML document.  The problem is that the all the 16-bit UTF8 stuff gets
split into 8-byte characters and then entified.  I can find no place to
control this.  It also occurs in the generation phase, since I used a view
to check it out at that point.  Do I need to write my own generator to fix
this?!?


Rafael C. Alvarado
Manager of Humanities Computing Research Applications
316 87 Prospect | Princeton University


-----Original Message-----
From: Mark Lundquist [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 09, 2004 4:42 PM
To: [EMAIL PROTECTED]
Subject: Re: Need help w/ <wd:action> (and flowscript)


On Mar 9, 2004, at 1:14 PM, I wrote:

> Today I'm trying to move my application to Cocoon 2.1.4, and I'm 
> trying out some of the new stuff.  In particular, I'm having trouble 
> getting <wd:action> to work.
>
> Problem #1:  Validation is being triggered when I click my action 
> widget.  I didn't think that was possible with an action widget, but 
> apparently I've found a way :-/, or maybe I just didn't understand 
> this part.
>
> Problem #2:  The action for my widget needs visibility to objects that 
> are local to the caller of showForm(), and I can't figure out how to 
> get the right visibility inside the <on-action> javascript snippet.
>
> I tried this flowscript:
>
>       function blah() {
>       .
>       .
>               var doSomething = function() {
>                               // whatever
>                       }
>               form.form.setAttribute ("doSomething", doSomething);
>               form.showForm()
>       .
>       .
>       }
>
> ...and this in the form definition file:
>
>       <wd:action id="doSomething-button" action-command="doSomething">
>               <wd:label>Do something!</wd:label>
>               <wd:on-action>
>                       <javascript>
>
event.getSourceWidget().getForm().doSomething();
>                       <javascript>
>               </wd:on-action>
>       </wd:action>
>
> ...but Rhino says "doSomething is not a function" (actually, if I log 
> the value I see that it's undefined).

Aha, it worked when I wrote this in the <on-action> snippet:

        var doSomething = event.getSourceWidget().getForm().getAttribute
("doSomething");
        doSomething();

...and once I got that straightened out, the spurious validation problem
took care of itself as well!

I'd still be interested to know if I'm doing this in the "normative" 
way, or if there's some better way that I've missed...

Thanks,
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to