• 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
inline binding problem (SOLVED) - but broken again by refactor > format!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inline binding problem (SOLVED) - but broken again by refactor > format!!


  • Subject: inline binding problem (SOLVED) - but broken again by refactor > format!!
  • From: Simon McLean <email@hidden>
  • Date: Fri, 14 Mar 2008 17:10:57 +0000

I just finished my component, then did refactor > format to clean up and it butchered my ognl expressions! It converted all \" to \\" :-

<td class = "$~errorMessages.objectForKey(\\"title\\") != null ? \\"error\\" : \\"label\\"">My Title</td>

Is there a recommended way of doing what I am trying to do that the formatter will work and the formatter will leave alone ?

Thanks, Simon

Begin forwarded message:

From: Simon McLean <email@hidden>
Date: 14 March 2008 17:05:39 GMT
To: AppleWO List <email@hidden>
Subject: inline binding problem (SOLVED)


I figured this - this works:

<td class = "$~errorMessages.objectForKey(\"title\") != null ? \"error\" : \"label\"">My Title</td>

Simon


Begin forwarded message:

From: Simon McLean <email@hidden>
Date: 14 March 2008 15:55:24 GMT
To: AppleWO List <email@hidden>
Subject: inline binding problem

HI All -

Having some fun trying to get an inline binding to work. I'm sure this must be something blindingly obvious, but i can't see it on a Friday afternoon :-)

errorMessages is a dictionary in my component class. I'm trying to toggle the css class of a <td> element based on the contents of the dictionary as follows:

<td class = "$errorMessages.objectForKey(\"title\") != null ? \"error\" : \"label\"">My Title</td>

But it just returns null (in fact, it renders as just a <td> tag with no class attribute at all). Can anyone spot what's wrong with this ?

Thanks, Simon



 _______________________________________________
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

  • Follow-Ups:
    • Re: inline binding problem (SOLVED) - but broken again by refactor > format!!
      • From: Mike Schrag <email@hidden>
References: 
 >inline binding problem (SOLVED) (From: Simon McLean <email@hidden>)

  • Prev by Date: inline binding problem (SOLVED)
  • Next by Date: Re: WO vs. Ruby on Rails
  • Previous by thread: inline binding problem (SOLVED)
  • Next by thread: Re: inline binding problem (SOLVED) - but broken again by refactor > format!!
  • Index(es):
    • Date
    • Thread