cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafael Alvarado" <alvar...@Princeton.EDU>
Subject My XSP is entifying my UTF
Date Tue, 09 Mar 2004 21:47:44 GMT
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

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

-----Original Message-----
From: Mark Lundquist [] 
Sent: Tuesday, March 09, 2004 4:42 PM
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>
> 			<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

...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...


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message