You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by lee shinwell <sh...@gmail.com> on 2005/06/22 01:23:00 UTC
How to implement custom binding expression?
Like OGNL expression, I need a new XML binding expression.
This XML expression can read property from XML document object and
update property to XML document object, no JavaBean object needed.
For example:
<input jwcid=" name@TextField" value="xml:doc.name <http://doc.name/>"/>
<input jwcid="age@TextField " value="xml:doc.age"/>
doc is a XML document object:
<person>
<name>Tim Robbin</name>
<age>28</age>
</person>
Re: How to implement custom binding expression?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 22, 2005, at 9:44 AM, lee shinwell wrote:
> Thanks for your reply.
> But I use Tapestry 3.03 now, can I implement new
> XML binding expression with the 3.03 version?
No... prefixes aren't customizable in Tapestry 3. But you could make
a utility that can be accessed via OGNL, perhaps in Global so that
you could get to it easily. Or have it accessible from your page
(through a base page class) so that it's readily there.
Erik
>
>
> 2005/6/22, Norbert Sándor <de...@freemail.hu>:
>
>>
>> In Tapestry 4:
>> - implement IBinding, eg. by extending AbstractBinding (you may
>> use XPath
>> (see javax.xml.xpath) to select XML nodes)
>> - implement BindingFactory, eg. by extending AbstractBindingFactory
>> - register your binding using the tapestry.bindings.BindingFactories
>> hivemind configuration point
>>
>> The build-in bindings are very good examples.
>> If you have a more concrete question....
>>
>> Br,
>> Norbi
>>
>> ----- Original Message -----
>> From: "lee shinwell" <sh...@gmail.com>
>> To: <ta...@jakarta.apache.org>
>> Sent: Wednesday, June 22, 2005 1:23 AM
>> Subject: How to implement custom binding expression?
>>
>> Like OGNL expression, I need a new XML binding expression.
>> This XML expression can read property from XML document object and
>> update property to XML document object, no JavaBean object needed.
>> For example:
>> <input jwcid=" name@TextField" value="xml:doc.name <http://
>> doc.name> <
>> http://doc.name/>"/>
>> <input jwcid="age@TextField " value="xml:doc.age"/>
>>
>> doc is a XML document object:
>> <person>
>> <name>Tim Robbin</name>
>> <age>28</age>
>> </person>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to implement custom binding expression?
Posted by lee shinwell <sh...@gmail.com>.
Thanks for your reply.
But I use Tapestry 3.03 now, can I implement new
XML binding expression with the 3.03 version?
2005/6/22, Norbert Sándor <de...@freemail.hu>:
>
> In Tapestry 4:
> - implement IBinding, eg. by extending AbstractBinding (you may use XPath
> (see javax.xml.xpath) to select XML nodes)
> - implement BindingFactory, eg. by extending AbstractBindingFactory
> - register your binding using the tapestry.bindings.BindingFactories
> hivemind configuration point
>
> The build-in bindings are very good examples.
> If you have a more concrete question....
>
> Br,
> Norbi
>
> ----- Original Message -----
> From: "lee shinwell" <sh...@gmail.com>
> To: <ta...@jakarta.apache.org>
> Sent: Wednesday, June 22, 2005 1:23 AM
> Subject: How to implement custom binding expression?
>
> Like OGNL expression, I need a new XML binding expression.
> This XML expression can read property from XML document object and
> update property to XML document object, no JavaBean object needed.
> For example:
> <input jwcid=" name@TextField" value="xml:doc.name <http://doc.name> <
> http://doc.name/>"/>
> <input jwcid="age@TextField " value="xml:doc.age"/>
>
> doc is a XML document object:
> <person>
> <name>Tim Robbin</name>
> <age>28</age>
> </person>
>
>
Re: How to implement custom binding expression?
Posted by Norbert Sándor <de...@freemail.hu>.
In Tapestry 4:
- implement IBinding, eg. by extending AbstractBinding (you may use XPath
(see javax.xml.xpath) to select XML nodes)
- implement BindingFactory, eg. by extending AbstractBindingFactory
- register your binding using the tapestry.bindings.BindingFactories
hivemind configuration point
The build-in bindings are very good examples.
If you have a more concrete question....
Br,
Norbi
----- Original Message -----
From: "lee shinwell" <sh...@gmail.com>
To: <ta...@jakarta.apache.org>
Sent: Wednesday, June 22, 2005 1:23 AM
Subject: How to implement custom binding expression?
Like OGNL expression, I need a new XML binding expression.
This XML expression can read property from XML document object and
update property to XML document object, no JavaBean object needed.
For example:
<input jwcid=" name@TextField" value="xml:doc.name <http://doc.name/>"/>
<input jwcid="age@TextField " value="xml:doc.age"/>
doc is a XML document object:
<person>
<name>Tim Robbin</name>
<age>28</age>
</person>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org