You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Eko S.W." <sw...@gmail.com> on 2007/07/02 12:25:06 UTC

Need Quick Help on else statement

Dear community,

Is there else clause in <t:if> construct ???
I've try (but maybe not hard), but can not find it.
That is, is there an else if you use <t:if> ???

* I imagine it to be like this :
<t:if test="ifSummaryActive">
    <t:if else>

</t:if>

Currently, to give the same behaviour I create a getIfSummaryActive
method and a getIfSummaryNotActive, like this:
<t:if test="ifSummaryActive">


</t:if>
<t:if test="ifSummaryNotActive">

</t:if>

Not perfect, but it's works...

Thanks in advance
-- 
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: how to overwrite the Locale in BaseEngine

Posted by Hans Drexler <dr...@geotax.nl>.
On Mon, 02 Jul 2007 13:05:39 +0200, munich wrote
> What would be the most reliable way to overwrite the Locale for the 
> Component  and Page messages inside an extended BaseEngine?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

Our code:

private static final Locale NL = new Locale("nl","NL");
public final void setLocale(Locale locale) {
____if (getLocale() == null ) {
________super.setlocale(NL);
____} else {
________super.setLocale(locale);
____} 


----
Hans Drexler
GeoTax en WOZ-Support b.v.
e: drexler@geotax.nl


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


how to overwrite the Locale in BaseEngine

Posted by mu...@fantasymail.de.
What would be the most reliable way to overwrite the Locale for the Component  and Page messages inside an extended BaseEngine?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Need Quick Help on else statement

Posted by "Eko S.W." <sw...@gmail.com>.
Yess!!!
That was very helpful crowd!

Thank you very much!

2007/7/3, Nick Westgate <ni...@key-planning.co.jp>:
>
> Another option is to use the negate parameter.
>
> Then you only need the one logic method,
> and you can have the if's wherever you want:
>
> <t:if test="ifSummaryActive">
>    ...
> </t:if>
> ...
> <t:if test="ifSummaryActive" negate="true">
>    ...
> </t:if>
>
> Cheers,
> Nick.
>
>
> Erik Vullings wrote:
> > Hi Eko,
> >
> >    <t:if test="myObjectExists">
> >        Whatever
> >    <t:parameter name="else">Please select an object first!</t:parameter>
> >    </t:if>
> >
> > Cheers
> > Erik
> >
> > On 7/2/07, Eko S.W. <sw...@gmail.com> wrote:
> >>
> >> Dear community,
> >>
> >> Is there else clause in <t:if> construct ???
> >> I've try (but maybe not hard), but can not find it.
> >> That is, is there an else if you use <t:if> ???
> >>
> >> * I imagine it to be like this :
> >> <t:if test="ifSummaryActive">
> >>     <t:if else>
> >>
> >> </t:if>
> >>
> >> Currently, to give the same behaviour I create a getIfSummaryActive
> >> method and a getIfSummaryNotActive, like this:
> >> <t:if test="ifSummaryActive">
> >>
> >>
> >> </t:if>
> >> <t:if test="ifSummaryNotActive">
> >>
> >> </t:if>
> >>
> >> Not perfect, but it's works...
> >>
> >> Thanks in advance
> >> --
> >> Best wishes,
> >> Eko SW
> >> http://swdev.blogs.friendster.com/my_blog/
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/

Re: Need Quick Help on else statement

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Another option is to use the negate parameter.

Then you only need the one logic method,
and you can have the if's wherever you want:

<t:if test="ifSummaryActive">
   ...
</t:if>
...
<t:if test="ifSummaryActive" negate="true">
   ...
</t:if>

Cheers,
Nick.


Erik Vullings wrote:
> Hi Eko,
> 
>    <t:if test="myObjectExists">
>        Whatever
>    <t:parameter name="else">Please select an object first!</t:parameter>
>    </t:if>
> 
> Cheers
> Erik
> 
> On 7/2/07, Eko S.W. <sw...@gmail.com> wrote:
>>
>> Dear community,
>>
>> Is there else clause in <t:if> construct ???
>> I've try (but maybe not hard), but can not find it.
>> That is, is there an else if you use <t:if> ???
>>
>> * I imagine it to be like this :
>> <t:if test="ifSummaryActive">
>>     <t:if else>
>>
>> </t:if>
>>
>> Currently, to give the same behaviour I create a getIfSummaryActive
>> method and a getIfSummaryNotActive, like this:
>> <t:if test="ifSummaryActive">
>>
>>
>> </t:if>
>> <t:if test="ifSummaryNotActive">
>>
>> </t:if>
>>
>> Not perfect, but it's works...
>>
>> Thanks in advance
>> -- 
>> Best wishes,
>> Eko SW
>> http://swdev.blogs.friendster.com/my_blog/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Need Quick Help on else statement

Posted by Erik Vullings <er...@gmail.com>.
Hi Eko,

    <t:if test="myObjectExists">
        Whatever
    <t:parameter name="else">Please select an object first!</t:parameter>
    </t:if>

Cheers
Erik

On 7/2/07, Eko S.W. <sw...@gmail.com> wrote:
>
> Dear community,
>
> Is there else clause in <t:if> construct ???
> I've try (but maybe not hard), but can not find it.
> That is, is there an else if you use <t:if> ???
>
> * I imagine it to be like this :
> <t:if test="ifSummaryActive">
>     <t:if else>
>
> </t:if>
>
> Currently, to give the same behaviour I create a getIfSummaryActive
> method and a getIfSummaryNotActive, like this:
> <t:if test="ifSummaryActive">
>
>
> </t:if>
> <t:if test="ifSummaryNotActive">
>
> </t:if>
>
> Not perfect, but it's works...
>
> Thanks in advance
> --
> Best wishes,
> Eko SW
> http://swdev.blogs.friendster.com/my_blog/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>