You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Thomas Christensen <tc...@nordija.com> on 2004/02/12 13:59:50 UTC
Use of ognl in html
Hi
There seemes to be two different ways of using jwcid. One where what is
behind the id is defined in the .page or .jwc file. Like this:
Home.html:
<p>Hello <span jwcid="insertUsername">Thomas</span></p>
Home.page:
<component id="insertUsername" type="Insert">
<binding name="value" expression="page.visit.username"/>
</component>
And there is another one where you add further non-html parameters to
the html tags and then do not define anything in the .page file.
Home.html:
<p>Hello <span jwcid="@Insert"
value="ognl:visit.username">Thomas</span></p>
Two q's:
Is there a recommended use and is one preffered above the other e.i. is
one type on its way out?
Is there a way to validate tapestry applications so if I remove
getUsername() on the Visit class I can get a warning before deployment?
Cheers
Thomas Christensen
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Use of ognl in html
Posted by Geoff Longman <gl...@intelligentworks.com>.
> As for the validation - good question - but probably not without using
> a serious unit test suite. (does Spindle do this?)
No. OGNL expressions are parsed for well formed-ness only.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Use of ognl in html
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Both 'implicit' (within .html) and 'explicit' (binding to .jwc/.page)
formats are fully supported and neither is on the way out. As for
preference - that is really a personal choice. Purists will keep the
.html clean except for jwcid mappings to the specification files. For
development, I find it more pleasant to stick with the implicit syntax
and formalize it a bit later.
I much prefer to have components with implicit syntax, since these are
not pieces that designers would generally touch anyway.
As for the validation - good question - but probably not without using
a serious unit test suite. (does Spindle do this?)
Erik
On Feb 12, 2004, at 7:59 AM, Thomas Christensen wrote:
> Hi
>
> There seemes to be two different ways of using jwcid. One where what
> is behind the id is defined in the .page or .jwc file. Like this:
>
> Home.html:
> <p>Hello <span jwcid="insertUsername">Thomas</span></p>
> Home.page:
> <component id="insertUsername" type="Insert">
> <binding name="value" expression="page.visit.username"/>
> </component>
>
> And there is another one where you add further non-html parameters to
> the html tags and then do not define anything in the .page file.
>
> Home.html:
> <p>Hello <span jwcid="@Insert"
> value="ognl:visit.username">Thomas</span></p>
>
> Two q's:
> Is there a recommended use and is one preffered above the other e.i.
> is one type on its way out?
> Is there a way to validate tapestry applications so if I remove
> getUsername() on the Visit class I can get a warning before
> deployment?
>
> Cheers
>
> Thomas Christensen
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org