You could do it like this:
> <wicket:panel>
> <div class="contentTittle">
> <label wicket:id="pageTittle" />
> </div>
> <div class="pageheader">
> <div align="center">
> <table style="margin-bottom: 0.5em;">
> <tbody>
> <tr>
> <td>Audit Number:</td>go
> <td><label wicket:id="auditNumber"/></td>
> </tr>
> <tr>
> <td>Grantee:</td>
> <td><label wicket:id="grantee"/></td>
> </tr>
> </tbody>
> </table>
> </div>
> </div>
<!-- MARKUP INHERITANCE -->
<wicket:child>
<!-- here it loads the additional information when needed.
you need a new (child-)class file with the markup.
the child-class file extends the parent-class and the
child-markup starts with <wicket:extend> and ends with
</wicket:extends>.
The content is loaded when needed. -->
</wicket:child>
<!-- INHERITANCE END -->
> <div class="pagedescription">
> <p><span wicket:id="pageDescription" /></p>
> </div>
> </wicket:panel>
-----Ursprüngliche Nachricht-----
Von: Jeremy Thomerson [mailto:[email protected]]
Gesendet: Donnerstag, 28. Mai 2009 00:36
An: [email protected]
Betreff: Re: dynamically add additional components
You could use markup inheritance to allow the subclass to insert
markup in that location.
--
Jeremy Thomerson
http://www.wickettraining.com
On Wed, May 27, 2009 at 1:42 PM, tubin gen <[email protected]> wrote:
> is it possible to modify html at runtime and add new components ? for
> example I have a panel, html code below.
>
> <wicket:panel>
> <div class="contentTittle">
> <label wicket:id="pageTittle" />
> </div>
> <div class="pageheader">
> <div align="center">
> <table style="margin-bottom: 0.5em;">
> <tbody>
> <tr>
> <td>Audit Number:</td>go
> <td><label wicket:id="auditNumber"/></td>
> </tr>
> <tr>
> <td>Grantee:</td>
> <td><label wicket:id="grantee"/></td>
> </tr>
> </tbody>
> </table>
> </div>
> </div>
> <div class="pagedescription">
> <p><span wicket:id="pageDescription" /></p>
> </div>
> </wicket:panel>
>
> I use this panel in several pages, but for one page I have to add
> additional information between wicket:id="grantee" and
> wicket:id="pageDescription" , so I am wondering If I can I create a new
> class which extends from this panel and if this new class can add a new
> component to this html and add the component to hirearchy , something like
> this ,html below has a third tr tag ?
>
> <wicket:panel>
> <div class="contentTittle">
> <label wicket:id="pageTittle" />
> </div>
> <div class="pageheader">
> <div align="center">
> <table style="margin-bottom: 0.5em;">
> <tbody>
> <tr>
> <td>Audit Number:</td>go
> <td><label wicket:id="auditNumber"/></td>
> </tr>
> <tr>
> <td>Grantee:</td>
> <td><label wicket:id="grantee"/></td>
> </tr>
> <tr>
> <td>Program:</td>
> <td><label wicket:id="program"/></td>
> </tr>
>
> </tbody>
> </table>
> </div>
> </div>
> <div class="pagedescription">
> <p><span wicket:id="pageDescription" /></p>
> </div>
> </wicket:panel>
>
>
> please suggest me if it is possible to do this , I donot want to add the
> third tr tag and call set visible false for all pages and only for one page
> set it to true ?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]