• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Quoting hell, anybody a solution?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Quoting hell, anybody a solution?


  • Subject: RE: Quoting hell, anybody a solution?
  • From: "Weide, Björn" <email@hidden>
  • Date: Thu, 18 Feb 2010 12:55:42 +0100

Could work something like that? :
 
<a id=<wo:WOString value ="[mySess.selectedPerformance.primaryKey]"/> href = ""
 
 >
 
Ciao,
Bjoern


From: webobjects-dev-bounces+bw=email@hidden [mailto:webobjects-dev-bounces+bw=email@hidden] On Behalf Of Johan Henselmans
Sent: Thursday, February 18, 2010 9:45 AM
To: WebObjects Development
Subject: Quoting hell, anybody a solution?

I am trying to call a webobjects string in an a href;

First i tried this:

<a href = "_javascript_:ShowContent('<wo:WOString value ="[mySess.selectedPerformance.primaryKey]"/>') "; 
 onMouseOver = "ShowContent('<wo:WOString value="[mySess.selectedPerformance.primaryKey]"/>'); return true;"
 onMouseOut = "HideContent('<wo:WOString value ="[mySess.selectedPerformance.primaryKey]"/>'); return true;">


Of course, that gave errors about the quoting. It said: 'The character '<' must be escaped'.  Expected behavior, too many quotes. 

Smart ass as I am (just have been listening to Bonzo Dog Doo-bah Band's  'Look at me I'm wonderful') I thought that using the &quot; instead of " would take care of it:

<a href = &quot; _javascript_:ShowContent('<wo:WOString value ="[mySess.selectedPerformance.primaryKey]"/>') &quot; 
ShowContent('<wo:WOString value="[mySess.selectedPerformance.primaryKey]"/>'); return true; &quot;
  HideContent('<wo:WOString value ="[mySess.selectedPerformance.primaryKey]"/>'); return true; &quot; >

I would assume that the webobjects parser would parse the WOString bit, then pass the rest to the webserver which in return would pass it to the browser where the &quot; quoting would be returned to it glorious " quoting and be interpreted by the browser as being a _javascript_. 

Unfortunately that resulted in:


SAXParseException: Open quote is expected for attribute "href" associated with an  element type  "a".
  at org.apache.xerces.parsers.AbstractSAXParser.parse(null:Unknown)
  at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(null:Unknown)
  at com.webobjects.appserver.parser.woml.WOMLTemplateParser.process(WOMLTemplateParser.java:339)
  at com.webobjects.appserver.parser.woml.WOMLTemplateParser.parse(WOMLTemplateParser.java:653)
  at com.webobjects.appserver.parser.WOHTMLTemplateParser.parse(WOHTMLTemplateParser.java:40)
  at com.webobjects.appserver.parser.WOComponentTemplateParser.templateWithHTMLAndDeclaration(WOComponentTemplateParser.java:438)
     ... skipped 1 stack elements
  at com.webobjects.appserver.WOComponent.template(WOComponent.java:499)
  ... skipped 17 stack elements


Anybody a correct way of quoting? 

(Because the liberal use of quotes in this document, you should not feed this document to your SAXParser)

Johan Henselmans
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Quoting hell, anybody a solution?
  • Next by Date: Re: Q about locked ec
  • Previous by thread: Re: Quoting hell, anybody a solution?
  • Next by thread: De Framing an Application
  • Index(es):
    • Date
    • Thread