Hi Mike

I didn't know helper functions.
They are fantastic!


Now, the examples...


Other handy uses of helpers that we have in our own code:

  • StringHelper.sanitize(String str) – remove dangerous HTML and _javascript_ tags from a string
  • StringHelper.highlight(String str, String search) – highlight search result match in a string
  • StringHelper.pluralize(String str) – pluralize a string
  • StringHelper.html(String str) – convert a string to HTML
  • MemberHelper.mailTo(Member member) – return a member.emailAddress()
  • lots of others 


are just examples, or they are implementer in WOOGNL ?

cause i got this error

ERROR ognl.webobjects.WOOgnlAssociation  - Exception invoking valueInComponent on WOOgnlAssociation with keyPath '@ognl.helperfunction.WOHelperFunctionRegistry@registry()._helperInstanceForFrameworkNamed(#this, "highlight", "anArticle.titolo", "StringHelper").highlight(anArticle.titolo,searchString)'
NoSuchElementException: Could not find a helper class for 'java.lang.String implementing highlight'.


Regards
Amedeo



On 29/giu/09, at 16:31, Mike Schrag wrote:

* technically mixed wod/inline isn't a limitation of their parser, but it's a practical limitation of the way it's loaded ... so I'll list it in the pro column for woognl
* helper functions = pro -- it can be done with their association factory, but at a syntactic sacrifice, i think
* though not technically a parser feature, I think our if/else syntax makes more logical sense -- this is a total religious debate though
* they have var: which is pretty cool -- we could just add this to wonder pretty easily, though
* ours = much less strict parser ... this is a pro or a con depending on your perspective, but the fact is that we are more forgiving than theirs, and that seems better for most users. the catch is that to get <div id="$whatever"> support, you have to turn on strict parsing for ours, too (which they have by default, and so you can just do it by default)

i'm hoping this decision will not be as difficult (or exist) in future versions

ms

On Jun 29, 2009, at 10:18 AM, Amedeo Mantica wrote:

Just a question...

The pro/cons using WOOGNL instead WO 5.4 inline bindings ?

1) mixed inline and wod

2) ...?

n) ... ?




On 29/giu/09, at 13:49, Mike Schrag wrote:

I sent all my examples from WOWODC to Mike Schrag after the presentation; hopefully he could put them someplace where people can get them.
btw ... Drew's examples will be part of the WOWODC video release.

ms

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/amedeomailing%40insigno.it

This email sent to [email protected]




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/amedeomailing%40insigno.it

This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to