Hello Jürgen,

You coulld put a <span> in the markup and add a Label to it. Don't forget to call setRenderBodyOnly(true) on the label.

Regards,
   Erik.

Jürgen Lind wrote:
Hi,

I was wondering if there is some way to rewrite the component markup before
it is rendered. My setting is as follows:

1. I have a component markup file like this

   <wicket:panel>
     <script type="text/javascript">
       someFunction( "runtime parameter" );
     </script>
   </wicket:panel>

2. The matching component overrides "onComponentTagBody" and "onRender"

protected final void onComponentTagBody(final MarkupStream markupStream,
                                          final ComponentTag openTag) {
    checkComponentTag(openTag, "textarea");
    replaceComponentTagBody(markupStream, openTag, getValue());
  }

  protected void onRender(MarkupStream markupStream) {
    super.onRender(markupStream);
    super.renderAssociatedMarkup("panel", "Some error");
  }

Now, what I would like to do is to change the value for the "runtime parameter" in the onRender Method and replace it with a value that has been given to the
component when the component was constructed.

Is there any way to achieve this?

Regards,

J.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to