You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Bohnert <ab...@online.de> on 2003/11/24 14:00:12 UTC

nested tags

hi,

how can correcltly build a statement like that:

<input name="Submit" type="submit" id="Submit" value=<span 
jwcid="@Insert" value="ognl:mystring" /> />

I tried all possible variations on this but without success. Maybe it's 
much simpler, but I don' get it-

Do I have to build a new component for that, where I have the freedom to 
arrange parameters like I wish?

Thanks for any advice..
Andreas




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


Re: nested tags

Posted by John Meredith <ps...@t-online.de>.
<input jwcid="@Submit" value="ognl:myComponentProperty"/>

or, if your message is a localised property:

<input jwcid="@Submit" value="message:MyLocalisedString"/>

  - John

On Mon, 2003-11-24 at 14:00, Andreas Bohnert wrote:
> hi,
> 
> how can correcltly build a statement like that:
> 
> <input name="Submit" type="submit" id="Submit" value=<span 
> jwcid="@Insert" value="ognl:mystring" /> />
> 
> I tried all possible variations on this but without success. Maybe it's 
> much simpler, but I don' get it-
> 
> Do I have to build a new component for that, where I have the freedom to 
> arrange parameters like I wish?
> 
> Thanks for any advice..
> Andreas
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
-- 
John Meredith <ps...@t-online.de>

Re: nested tags

Posted by Andreas Bohnert <ab...@online.de>.
Thanks!
now it works!

andreas

Kevin C. Dorff wrote:

> If you look at the @Submit component... this should do everything you 
> need.
>
> For example, the sample code says
>
> <input type="submit" jwcid="@Submit <Submit.html>" 
> listener="ognl:listeners.loginSubmitAction" value="Login"/>
>
> but you could easily say
>
> <input type="submit" jwcid="@Submit <Submit.html>" 
> listener="ognl:listeners.loginSubmitAction" value="ognl:mystring"/>
>
> The only oddity is the documentation cannot seem to decide if the 
> label is specified with the label attribute or the value attribute. I 
> think I have used value...
>
> Hope this helps...
> Kevin
>
>
> Andreas Bohnert wrote:
>
>> hi,
>>
>> how can correcltly build a statement like that:
>>
>> <input name="Submit" type="submit" id="Submit" value=<span 
>> jwcid="@Insert" value="ognl:mystring" /> />
>>
>> I tried all possible variations on this but without success. Maybe 
>> it's much simpler, but I don' get it-
>>
>> Do I have to build a new component for that, where I have the freedom 
>> to arrange parameters like I wish?
>>
>> Thanks for any advice..
>> Andreas
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>


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


Re: nested tags

Posted by John Meredith <ps...@t-online.de>.
On Mon, 2003-11-24 at 14:49, John Meredith wrote:
> If you're using localised properties, you can also use:

"localised messages" rather

> <input jwcid="@Submit" value="message:someProperty"/>
> 
>   - John
> 
> On Mon, 2003-11-24 at 14:36, Kevin C. Dorff wrote:
> > If you look at the @Submit component... this should do everything you need.
> > 
> > For example, the sample code says
> > 
> > <input type="submit" jwcid="@Submit <Submit.html>" 
> > listener="ognl:listeners.loginSubmitAction" value="Login"/>
> > 
> > but you could easily say
> > 
> > <input type="submit" jwcid="@Submit <Submit.html>" 
> > listener="ognl:listeners.loginSubmitAction" value="ognl:mystring"/>
> > 
> > The only oddity is the documentation cannot seem to decide if the label 
> > is specified with the label attribute or the value attribute. I think I 
> > have used value...
> > 
> > Hope this helps...
> > Kevin
> > 
> > 
> > Andreas Bohnert wrote:
> > 
> > > hi,
> > >
> > > how can correcltly build a statement like that:
> > >
> > > <input name="Submit" type="submit" id="Submit" value=<span 
> > > jwcid="@Insert" value="ognl:mystring" /> />
> > >
> > > I tried all possible variations on this but without success. Maybe 
> > > it's much simpler, but I don' get it-
> > >
> > > Do I have to build a new component for that, where I have the freedom 
> > > to arrange parameters like I wish?
> > >
> > > Thanks for any advice..
> > > Andreas
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
-- 
John Meredith <ps...@t-online.de>


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


Re: nested tags

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Monday, November 24, 2003, at 10:45  AM, Bill Lear wrote:
> On Monday, November 24, 2003 at 10:26:23 (-0500) Erik Hatcher writes:
>> ...
>> Not true.  You can implement your own resource handling such that all
>> the builtin mechanisms for getting localized resources uses the
>> database rather than the properties files (<span key="..."> and
>> "message:...").  Look at IEngine and the hooks it offers  - we did 
>> this
>> very thing and all our messages come from a database table now.
>
> I'm not sure I understand how you did this.  Did you write an IEngine
> implementation that in getResourceResolver() returns an instance of
> IResourceResolver that in getResource() looks up the requested URL in
> a database?

We implemented

public IComponentMessagesSource getComponentMessagesSource()

on a subclass of BaseEngine (and configured the engine in the 
.application file).

> More details would be welcome.

The details are not really going to be helpful as it calls into one of 
our session beans to fetch the resources.  But I implemented a custom 
subclass of DefaultComponentMessagesSource and also a custom IMessages 
implementation to go along with it.

The thing to note is that there is one instance of the engine per 
session, so be careful with how you cache :)

	Erik


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


Re: nested tags

Posted by Bill Lear <ra...@zopyra.com>.
On Monday, November 24, 2003 at 10:26:23 (-0500) Erik Hatcher writes:
>...
>Not true.  You can implement your own resource handling such that all 
>the builtin mechanisms for getting localized resources uses the 
>database rather than the properties files (<span key="..."> and 
>"message:...").  Look at IEngine and the hooks it offers  - we did this 
>very thing and all our messages come from a database table now.

I'm not sure I understand how you did this.  Did you write an IEngine
implementation that in getResourceResolver() returns an instance of
IResourceResolver that in getResource() looks up the requested URL in
a database?

More details would be welcome.


Bill

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


Re: nested tags

Posted by "Kevin C. Dorff" <kd...@kcp.com>.
What I have read (and written) from the Tapestry Tutorial, your options 
are either or both of a localized properties file or localized 
templates. If your localizations come from a database, you will need to 
use your beans, I guess.

Andreas Bohnert wrote:

> as far as I understand the tapestry localization, I have to use either 
> html templates or properties.
> in my case the localized strings are inside a database, so I use a 
> simple bean method to get the localized string.
>
> some frameworks provide an interface to implement a lookup method, I 
> didn't find that in the tapestry docs.
> regards
> andreas
>
>
> John Meredith wrote:
>
>> If you're using localised properties, you can also use:
>>
>> <input jwcid="@Submit" value="message:someProperty"/>
>>
>>  - John
>>
>> On Mon, 2003-11-24 at 14:36, Kevin C. Dorff wrote:
>>  
>>
>>> If you look at the @Submit component... this should do everything 
>>> you need.
>>>
>>> For example, the sample code says
>>>
>>> <input type="submit" jwcid="@Submit <Submit.html>" 
>>> listener="ognl:listeners.loginSubmitAction" value="Login"/>
>>>
>>> but you could easily say
>>>
>>> <input type="submit" jwcid="@Submit <Submit.html>" 
>>> listener="ognl:listeners.loginSubmitAction" value="ognl:mystring"/>
>>>
>>> The only oddity is the documentation cannot seem to decide if the 
>>> label is specified with the label attribute or the value attribute. 
>>> I think I have used value...
>>>
>>> Hope this helps...
>>> Kevin
>>>
>>>
>>> Andreas Bohnert wrote:
>>>
>>>   
>>>
>>>> hi,
>>>>
>>>> how can correcltly build a statement like that:
>>>>
>>>> <input name="Submit" type="submit" id="Submit" value=<span 
>>>> jwcid="@Insert" value="ognl:mystring" /> />
>>>>
>>>> I tried all possible variations on this but without success. Maybe 
>>>> it's much simpler, but I don' get it-
>>>>
>>>> Do I have to build a new component for that, where I have the 
>>>> freedom to arrange parameters like I wish?
>>>>
>>>> Thanks for any advice..
>>>> Andreas
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>   
>>
>
>
> ---------------------------------------------------------------------
> 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


Session hijacking in Tapestry?

Posted by ford prefect <fo...@yahoo.de>.
Has tapestry a built-in protection for
session-hijacking, i.e. if someone sees on his website
the referrers from someone coming from a tapestry
website and if he clicks on the url containing the
session id? 

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

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


Re: nested tags

Posted by Andreas Bohnert <ab...@online.de>.
Erik Hatcher wrote:

> On Monday, November 24, 2003, at 09:42  AM, Andreas Bohnert wrote:
>
>> as far as I understand the tapestry localization, I have to use 
>> either html templates or properties.
>> in my case the localized strings are inside a database, so I use a 
>> simple bean method to get the localized string.
>
>
> Not true.  You can implement your own resource handling such that all 
> the builtin mechanisms for getting localized resources uses the 
> database rather than the properties files (<span key="..."> and 
> "message:...").  Look at IEngine and the hooks it offers  - we did 
> this very thing and all our messages come from a database table now.
>
>     Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
I will have a look, thanks!
andreas

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


Re: nested tags

Posted by "Kevin C. Dorff" <kd...@kcp.com>.
Nice!

Erik Hatcher wrote:

> On Monday, November 24, 2003, at 09:42  AM, Andreas Bohnert wrote:
>
>> as far as I understand the tapestry localization, I have to use 
>> either html templates or properties.
>> in my case the localized strings are inside a database, so I use a 
>> simple bean method to get the localized string.
>
>
> Not true.  You can implement your own resource handling such that all 
> the builtin mechanisms for getting localized resources uses the 
> database rather than the properties files (<span key="..."> and 
> "message:...").  Look at IEngine and the hooks it offers  - we did 
> this very thing and all our messages come from a database table now.
>
>     Erik
>
>
> ---------------------------------------------------------------------
> 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


Re: nested tags

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Monday, November 24, 2003, at 10:55  AM, ford prefect wrote:
> Doesn't that put too much pressure on the database on
> a large website? would it not be better to have a sort
> of properties file?

we're not crazy enough to hit the database for every key accessed.  all 
messages are loaded once and accessed from a cache.  i believe our 
implementation does the right thing and will flush the cache by 
responding to the right event that tapestry provides for resource 
handling - although not sure (but we will implement some type of forced 
flush to refresh the cache upon demand)


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


Re: nested tags

Posted by ford prefect <fo...@yahoo.de>.
Doesn't that put too much pressure on the database on
a large website? would it not be better to have a sort
of properties file?




 --- Erik Hatcher <er...@ehatchersolutions.com>
schrieb: > On Monday, November 24, 2003, at 09:42  AM,
Andreas
> Bohnert wrote:
> > as far as I understand the tapestry localization,
> I have to use either 
> > html templates or properties.
> > in my case the localized strings are inside a
> database, so I use a 
> > simple bean method to get the localized string.
> 
> Not true.  You can implement your own resource
> handling such that all 
> the builtin mechanisms for getting localized
> resources uses the 
> database rather than the properties files (<span
> key="..."> and 
> "message:...").  Look at IEngine and the hooks it
> offers  - we did this 
> very thing and all our messages come from a database
> table now.
> 
> 	Erik
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>  

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

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


Re: nested tags

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Monday, November 24, 2003, at 09:42  AM, Andreas Bohnert wrote:
> as far as I understand the tapestry localization, I have to use either 
> html templates or properties.
> in my case the localized strings are inside a database, so I use a 
> simple bean method to get the localized string.

Not true.  You can implement your own resource handling such that all 
the builtin mechanisms for getting localized resources uses the 
database rather than the properties files (<span key="..."> and 
"message:...").  Look at IEngine and the hooks it offers  - we did this 
very thing and all our messages come from a database table now.

	Erik


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


Re: nested tags

Posted by Andreas Bohnert <ab...@online.de>.
as far as I understand the tapestry localization, I have to use either 
html templates or properties.
in my case the localized strings are inside a database, so I use a 
simple bean method to get the localized string.

some frameworks provide an interface to implement a lookup method, I 
didn't find that in the tapestry docs.
regards
andreas


John Meredith wrote:

>If you're using localised properties, you can also use:
>
><input jwcid="@Submit" value="message:someProperty"/>
>
>  - John
>
>On Mon, 2003-11-24 at 14:36, Kevin C. Dorff wrote:
>  
>
>>If you look at the @Submit component... this should do everything you need.
>>
>>For example, the sample code says
>>
>><input type="submit" jwcid="@Submit <Submit.html>" 
>>listener="ognl:listeners.loginSubmitAction" value="Login"/>
>>
>>but you could easily say
>>
>><input type="submit" jwcid="@Submit <Submit.html>" 
>>listener="ognl:listeners.loginSubmitAction" value="ognl:mystring"/>
>>
>>The only oddity is the documentation cannot seem to decide if the label 
>>is specified with the label attribute or the value attribute. I think I 
>>have used value...
>>
>>Hope this helps...
>>Kevin
>>
>>
>>Andreas Bohnert wrote:
>>
>>    
>>
>>>hi,
>>>
>>>how can correcltly build a statement like that:
>>>
>>><input name="Submit" type="submit" id="Submit" value=<span 
>>>jwcid="@Insert" value="ognl:mystring" /> />
>>>
>>>I tried all possible variations on this but without success. Maybe 
>>>it's much simpler, but I don' get it-
>>>
>>>Do I have to build a new component for that, where I have the freedom 
>>>to arrange parameters like I wish?
>>>
>>>Thanks for any advice..
>>>Andreas
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>>    
>>


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


Re: nested tags

Posted by John Meredith <ps...@t-online.de>.
If you're using localised properties, you can also use:

<input jwcid="@Submit" value="message:someProperty"/>

  - John

On Mon, 2003-11-24 at 14:36, Kevin C. Dorff wrote:
> If you look at the @Submit component... this should do everything you need.
> 
> For example, the sample code says
> 
> <input type="submit" jwcid="@Submit <Submit.html>" 
> listener="ognl:listeners.loginSubmitAction" value="Login"/>
> 
> but you could easily say
> 
> <input type="submit" jwcid="@Submit <Submit.html>" 
> listener="ognl:listeners.loginSubmitAction" value="ognl:mystring"/>
> 
> The only oddity is the documentation cannot seem to decide if the label 
> is specified with the label attribute or the value attribute. I think I 
> have used value...
> 
> Hope this helps...
> Kevin
> 
> 
> Andreas Bohnert wrote:
> 
> > hi,
> >
> > how can correcltly build a statement like that:
> >
> > <input name="Submit" type="submit" id="Submit" value=<span 
> > jwcid="@Insert" value="ognl:mystring" /> />
> >
> > I tried all possible variations on this but without success. Maybe 
> > it's much simpler, but I don' get it-
> >
> > Do I have to build a new component for that, where I have the freedom 
> > to arrange parameters like I wish?
> >
> > Thanks for any advice..
> > Andreas
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
-- 
John Meredith <ps...@t-online.de>


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


Re: nested tags

Posted by "Kevin C. Dorff" <kd...@dorffweb.com>.
If you look at the @Submit component... this should do everything you need.

For example, the sample code says

<input type="submit" jwcid="@Submit <Submit.html>" 
listener="ognl:listeners.loginSubmitAction" value="Login"/>

but you could easily say

<input type="submit" jwcid="@Submit <Submit.html>" 
listener="ognl:listeners.loginSubmitAction" value="ognl:mystring"/>

The only oddity is the documentation cannot seem to decide if the label 
is specified with the label attribute or the value attribute. I think I 
have used value...

Hope this helps...
Kevin


Andreas Bohnert wrote:

> hi,
>
> how can correcltly build a statement like that:
>
> <input name="Submit" type="submit" id="Submit" value=<span 
> jwcid="@Insert" value="ognl:mystring" /> />
>
> I tried all possible variations on this but without success. Maybe 
> it's much simpler, but I don' get it-
>
> Do I have to build a new component for that, where I have the freedom 
> to arrange parameters like I wish?
>
> Thanks for any advice..
> Andreas
>
>
>
>
> ---------------------------------------------------------------------
> 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