Discussion:
Concatenating strings in OGNL
Mark
2006-05-09 06:16:14 UTC
Permalink
Hi,

how can I concatenate strings using OGNL?

What I would like to do is something like this:

<html jwcid="@Shell" title="ognl:appTitle + ' - ' + sectionTitle"
stylesheet="asset:mainCss">

The resulting title should look like this: "My Application - Admin Section".

Is there a way to do this in OGNL or do I need to add a Java function to
the page/component?

Thanks,

MARK

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Schulte Marcus
2006-05-09 06:19:08 UTC
Permalink
That should work just fine - which error do you get?
-----Original Message-----
Sent: Tuesday, May 09, 2006 8:16 AM
To: Tapestry users
Subject: Concatenating strings in OGNL
Hi,
how can I concatenate strings using OGNL?
stylesheet="asset:mainCss">
The resulting title should look like this: "My Application -
Admin Section".
Is there a way to do this in OGNL or do I need to add a Java
function to
the page/component?
Thanks,
MARK
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Mark
2006-05-09 06:44:05 UTC
Permalink
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Weird, now it works.<br>
I got some crazy error which I can not remember any more just now. I
had already taken it out and just tried this one:<br>
&lt;html jwcid="@Shell" title="ognl: {appTitle+ ' - ' +sectionTitle}"
stylesheet="asset:mainCss"&gt;<br>
<br>
Then I got your email and took the { and } off again, but I can not
reproduce the problem I had earlier... Maybe something didn't
reload/propagade properly.<br>
<br>
Oh well... better this way than the other way around.<br>
<br>
Thank you for the response.<br>
<br>
MARK<br>
<br>
Schulte Marcus wrote:
<blockquote
cite="***@szh001.ch.sub"
type="cite">
<pre wrap="">That should work just fine - which error do you get?

</pre>
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: Mark [<a class="moz-txt-link-freetext" href="mailto:***@mark-arnold.net">mailto:***@mark-arnold.net</a>]
Sent: Tuesday, May 09, 2006 8:16 AM
To: Tapestry users
Subject: Concatenating strings in OGNL


Hi,

how can I concatenate strings using OGNL?

What I would like to do is something like this:

&lt;html jwcid="@Shell" title="ognl:appTitle + ' - ' + sectionTitle"
stylesheet="asset:mainCss"&gt;

The resulting title should look like this: "My Application -
Admin Section".

Is there a way to do this in OGNL or do I need to add a Java
function to
the page/component?

Thanks,

MARK

---------------------------------------------------------------------
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-***@tapestry.apache.org">users-***@tapestry.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-***@tapestry.apache.org">users-***@tapestry.apache.org</a>

</pre>
</blockquote>
<pre wrap=""><!---->
---------------------------------------------------------------------
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-***@tapestry.apache.org">users-***@tapestry.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-***@tapestry.apache.org">users-***@tapestry.apache.org</a>



</pre>
</blockquote>
<br>
</body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Andreas Andreou
2006-05-09 07:51:05 UTC
Permalink
BTW, there's a little known feature of tacos, the template binding.
With it, you can do:
title="template:${appTitle} - ${sectionTitle}"
Post by Mark
Weird, now it works.
I got some crazy error which I can not remember any more just now. I
stylesheet="asset:mainCss">
Then I got your email and took the { and } off again, but I can not
reproduce the problem I had earlier... Maybe something didn't
reload/propagade properly.
Oh well... better this way than the other way around.
Thank you for the response.
MARK
Post by Schulte Marcus
That should work just fine - which error do you get?
-----Original Message-----
Sent: Tuesday, May 09, 2006 8:16 AM
To: Tapestry users
Subject: Concatenating strings in OGNL
Hi,
how can I concatenate strings using OGNL?
stylesheet="asset:mainCss">
The resulting title should look like this: "My Application -
Admin Section".
Is there a way to do this in OGNL or do I need to add a Java
function to
the page/component?
Thanks,
MARK
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Jim Steinberger
2006-05-09 13:14:02 UTC
Permalink
Hehe, never mind; just saw you had a response -- still battling my junk
e-mail filters with the new list-address.

Jim


-----Original Message-----
From: Mark [mailto:***@mark-arnold.net]
Sent: Tuesday, May 09, 2006 2:16 AM
To: Tapestry users
Subject: Concatenating strings in OGNL

Hi,

how can I concatenate strings using OGNL?

What I would like to do is something like this:

<html jwcid="@Shell" title="ognl:appTitle + ' - ' + sectionTitle"
stylesheet="asset:mainCss">

The resulting title should look like this: "My Application - Admin
Section".

Is there a way to do this in OGNL or do I need to add a Java function to

the page/component?

Thanks,

MARK

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tapestry.apache.org
For additional commands, e-mail: users-***@tapestry.apache.org
Jim Steinberger
2006-05-09 13:12:57 UTC
Permalink
Hi Mark,

What you have should be working fine -- are you getting an error? Go
ahead and try it if you haven't already.

Jim

-----Original Message-----
From: Mark [mailto:***@mark-arnold.net]
Sent: Tuesday, May 09, 2006 2:16 AM
To: Tapestry users
Subject: Concatenating strings in OGNL

Hi,

how can I concatenate strings using OGNL?

What I would like to do is something like this:

<html jwcid="@Shell" title="ognl:appTitle + ' - ' + sectionTitle"
stylesheet="asset:mainCss">

The resulting title should look like this: "My Application - Admin
Section".

Is there a way to do this in OGNL or do I need to add a Java function to

the page/component?

Thanks,

MARK

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


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

Loading...