It's not often used, but the HTML spec actually says that you can
specify the language by using a common prefix in the attribute value.

Like so:
  <Button onButtonPressd="java:callMyMethod()">

But I also like your idea of using a default script language. Using
more than one script language is such a weird corner case, that you
should be penalised by needing to use the verbose syntax :-)

-- Noel.

On Thu, Sep 3, 2009 at 02:55, Greg Brown<[email protected]> wrote:
> One thing that isn't ideal about either approach is that, in an attribute,
> you can't specify which scripting language you want to use. I was thinking
> that we could add some sort of page-level tag that allows a caller to define
> the default scripting language (e.g. <wtkx:page language="groovy"/>), but
> this doesn't seem especially clean. We'd have to ensure that only one
> instance of this element existed, and we don't currently have any other need
> for such a tag.
>
> However, we could easily add a constructor argument to WTKXSerializer that
> specifies the default scripting language. This would allow us to use other
> scripting languages in attributes, and is also useful for <wtkx:script>
> blocks.
>

Reply via email to