You could simply create your own component witch in turn calls the Tacos:Autocompleter like any other tapestry component in the component template.
You whould then choose witch parameters to set to the encapsulated Tacos:component and witch to enable your component to accept.
Something like...

YourComponent.html

<html>
<body jwcid="$content$">
    <span jwcid="autoCompleter"/>
</body>
</html>

YourComponent.jwc

<?xml version="1.0"?>
<!DOCTYPE component-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
  " http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
<component-specification
    allow-body="no"
    allow-informal-parameters="yes">

    <parameter name="displayName" required="yes">
        <description>???</description>
    </parameter>

    <parameter name="value" required="yes">
        <description>???</description>
    </parameter>

    <component id="autoCompleter" type="tacos:Autocompleter" >
        <binding name="displayName" value="ognl:displayName" />
        <binding name="value" value="ognl:valueString" />
        <binding name="direct" value="ognl:false" />
    </component>
   
</component-specification>

Note: You have to set the direct=false because it may cause problems when working in direct mode inside other components as will be the case.

Did this myself a few weeks ago, so it works, and you don't have to copy the .jwc or extend the .java

Regards,


On 4/19/06, Jun Tsai < [EMAIL PROTECTED]> wrote:
Hi,all
    I want to write to a component to encapsulation tacos:autocompleter.I didn't want to use java extends  and copy jwc file. Have an agile method to do it?

  PS: beacause My AutoCompleter has some denominators, so I want to encapsulation tacos:autocompleter.

--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net



--
Pedro Viegas

Reply via email to