You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jeevan Bihari <je...@yahoo.com> on 2003/06/11 01:03:41 UTC

OGNL questions

Hi,

  I have a conditional component in my HTML file as follows:

   <span jwcid="@Conditional" condition="ognl:user">

  The isUser method for this conditional currently accepts no parameters. However, is it possible
to pass parameters into such a function, for example, isUser("Active") ?

Also, I have a best-practices question: When should one place a component in a .page file and when
should the component be OGNL'd in HTML ? I'm following a rule that complex components like Table
would go in the .page for better readability but any of your thoughts on this issue would be
great.

Thanks,
Jeevan

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

Re: OGNL questions

Posted by Harish Krishnaswamy <hk...@comcast.net>.
+1. I definitely prefer a clear separation while there may be some 
pressing arguments about simple components like Body.

-Harish

Bill Lear wrote:

>On Tuesday, June 10, 2003 at 16:03:41 (-0700) Jeevan Bihari writes:
>  
>
>>Hi,
>>
>> I have a conditional component in my HTML file as follows:
>>
>>  <span jwcid="@Conditional" condition="ognl:user">
>>
>> The isUser method for this conditional currently accepts no parameters. However, is it possible
>>to pass parameters into such a function, for example, isUser("Active") ?
>>
>>Also, I have a best-practices question: When should one place a component in a .page file and when
>>should the component be OGNL'd in HTML ? I'm following a rule that complex components like Table
>>would go in the .page for better readability but any of your thoughts on this issue would be
>>great.
>>    
>>
>
>One argument for placing all component specifications in the page file
>(if I'm not wording this improperly) is that it provides for a more
>complete separation of interface and implementation.  This may be a
>consideration in industrial programming institutions where strong
>social boundaries are enforced (i.e., web designers see nothing but
>tags, ognl logic is considered verboten and relegated to the page
>specification file).
>
>In short, it's up to you and your social institution to make the call.
>Personally, I prefer a strong separation, but only cavil when the
>short-cut method gets a bit out of hand.
>
>
>Bill
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>


Re: OGNL questions

Posted by Bill Lear <ra...@zopyra.com>.
On Tuesday, June 10, 2003 at 16:03:41 (-0700) Jeevan Bihari writes:
>Hi,
>
>  I have a conditional component in my HTML file as follows:
>
>   <span jwcid="@Conditional" condition="ognl:user">
>
>  The isUser method for this conditional currently accepts no parameters. However, is it possible
>to pass parameters into such a function, for example, isUser("Active") ?
>
>Also, I have a best-practices question: When should one place a component in a .page file and when
>should the component be OGNL'd in HTML ? I'm following a rule that complex components like Table
>would go in the .page for better readability but any of your thoughts on this issue would be
>great.

One argument for placing all component specifications in the page file
(if I'm not wording this improperly) is that it provides for a more
complete separation of interface and implementation.  This may be a
consideration in industrial programming institutions where strong
social boundaries are enforced (i.e., web designers see nothing but
tags, ognl logic is considered verboten and relegated to the page
specification file).

In short, it's up to you and your social institution to make the call.
Personally, I prefer a strong separation, but only cavil when the
short-cut method gets a bit out of hand.


Bill