You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mike D Pilsbury <mi...@pekim.co.uk> on 2003/11/14 00:05:59 UTC

Custom binding type

I need to write my own binding implementation. It will be like 
message-binding except that it will resolve the properties from a 
database instead of properties files.

I think I can see pretty much how I will need to extend the 
AbstractBinding class, but I can't figure out how I would  make the new 
type of binding available for use by components in .jwc/.page files. Any 
pointers?

I could possibly achieve a similar result by using a regular binding, 
and an OGNL expression to call a static method, passing a reference to 
the page and the property name to resolve. But that seems ugly.

Mike


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


Re: Custom binding type

Posted by Mike D Pilsbury <mi...@pekim.co.uk>.
Excellent. That looks like exactly what I need. Thank you.

I guess that's the downside to having a rich API; knowing where to look 
for things. :-) I'm sure I'll get more familiar with it over time.

Mike


Mindbridge wrote:

>Hi,
>
>Why not implement IComponentMessagesSource and override
>createComponentStringsSource() in the engine,
>or override getMessages() or getMessage() in the page/component?
>
>----- Original Message ----- 
>From: "Mike D Pilsbury" <mi...@pekim.co.uk>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Friday, November 14, 2003 1:05 AM
>Subject: Custom binding type
>
>
>  
>
>>I need to write my own binding implementation. It will be like
>>message-binding except that it will resolve the properties from a
>>database instead of properties files.
>>
>>I think I can see pretty much how I will need to extend the
>>AbstractBinding class, but I can't figure out how I would  make the new
>>type of binding available for use by components in .jwc/.page files. Any
>>pointers?
>>
>>I could possibly achieve a similar result by using a regular binding,
>>and an OGNL expression to call a static method, passing a reference to
>>the page and the property name to resolve. But that seems ugly.
>>
>>Mike
>>
>>
>>---------------------------------------------------------------------
>>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: Custom binding type

Posted by Mindbridge <mi...@yahoo.com>.
Hi,

Why not implement IComponentMessagesSource and override
createComponentStringsSource() in the engine,
or override getMessages() or getMessage() in the page/component?

----- Original Message ----- 
From: "Mike D Pilsbury" <mi...@pekim.co.uk>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, November 14, 2003 1:05 AM
Subject: Custom binding type


> I need to write my own binding implementation. It will be like
> message-binding except that it will resolve the properties from a
> database instead of properties files.
>
> I think I can see pretty much how I will need to extend the
> AbstractBinding class, but I can't figure out how I would  make the new
> type of binding available for use by components in .jwc/.page files. Any
> pointers?
>
> I could possibly achieve a similar result by using a regular binding,
> and an OGNL expression to call a static method, passing a reference to
> the page and the property name to resolve. But that seems ugly.
>
> Mike
>
>
> ---------------------------------------------------------------------
> 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