Hi!

Bug report created and quickstart attached to jIra:
https://issues.apache.org/jira/browse/WICKET-1789


Unexpected RuntimeException:

WicketMessage: Expected close tag for <span id="show_hide_bordera"
wicket:id="show-hide-border">
[markup = 
file:/C:/workspaces/testspace/border-bug/target/classes/org/wicket/quickstart/HomePage.html


**
Martin

2008/8/10 Igor Vaynberg <[EMAIL PROTECTED]>:
> weird.
>
> create a quickstart and attach it to a jira issue
>
> -igor
>
> On Sun, Aug 10, 2008 at 9:24 AM, Martin Makundi
> <[EMAIL PROTECTED]> wrote:
>> Yes, I replaced it with <span> but it does not work if I default it to 
>> "hide".
>>
>> (border class)
>> public ShowHideBorder(String id, Form<?> form, boolean
>> maximizeByDefault, final AjaxRequestListenerInterface listener) {
>>    super(id);
>>    setOutputMarkupPlaceholderTag(true).setRenderBodyOnly(false);
>>    add(new Label<String>(LEGEND, getString(getId())));
>>
>>    final WebMarkupContainer<?> contents;
>>
>>    add(contents = new WebMarkupContainer(CONTENTS));
>>    
>> contents.setVisible(maximizeByDefault).setOutputMarkupPlaceholderTag(true).setRenderBodyOnly(false);
>>    contents.add(getBodyContainer());
>>    final MiniMaxButtonAttributeModifier toggleButtonModel = new
>> MiniMaxButtonAttributeModifier(!maximizeByDefault);
>>
>>    toggleContentsButton = new
>> AjaxFallbackButton(TOGGLE_CONTENTS_BUTTON, form) {
>>      @Override
>>      protected void onSubmit(AjaxRequestTarget target, Form form) {
>>        toggleButtonModel.toggleButton();
>>        contents.setVisible(toggleButtonModel.isVisible());
>>        if (target != null) {
>>          target.addComponent(toggleContentsButton);
>>          target.addComponent(contents);
>>          listener.addComponents(target);
>>        }
>>      }
>>    }.setDefaultFormProcessing(false).setOutputMarkupId(true).add(new
>> AttributeModifier("style", true, toggleButtonModel))
>>    .add(MarkupUtils.getTooltip(getString("toggle_information")));
>>
>>    add(toggleContentsButton);
>>  }
>>
>>
>> Somehow the renderer does not find the body tag because the "contents"
>> -block is not visible? If the content is hidden by default
>> (visible=maximizeByDefault=false) on the first time I load the page, I
>> get the same error message (Expected close tag for "border"). So it
>> only works if the contents are visible by default. If the contents is
>> visible in the beginning, it can be hidden (and shown again) using the
>> ajax toggle button... but not if the contents are hidden by default.
>>
>> **
>> Martin
>>
>> 2008/8/10 Igor Vaynberg <[EMAIL PROTECTED]>:
>>> if you are going to hide/show the body, then contain it with div
>>> instead of wicket:container, and call
>>> setoutputmarkupplaceholdertag(true) on the div component
>>>
>>> -igor
>>>
>>> On Sat, Aug 9, 2008 at 10:54 PM, Martin Makundi
>>> <[EMAIL PROTECTED]> wrote:
>>>> Hi Igor, another problem relating to the borders:
>>>>
>>>> The markup is the same now, but if the content is set to be hidden
>>>> (visible=false) on the first time I load the page, I get the same
>>>> error message (Expected close tag for "border"). So it now only works
>>>> if the contents are visible by default, but can be hidden (and shown
>>>> again) using the ajax toggle button:
>>>>
>>>> Main page:
>>>> ::::::::::::::::::::::
>>>> <span wicket:id="border">
>>>> Hide me by default (contents.setVisible=false)
>>>> </span>
>>>>
>>>>
>>>> Border page:
>>>> ::::::::::::::::::::::
>>>> <html xmlns:wicket="http://wicket.sourceforge.net";>
>>>> <head>
>>>> <title>Title</title>
>>>> </head>
>>>> <body>
>>>> <wicket:border>
>>>>  <fieldset style="padding: 0px;">
>>>>  <legend>
>>>>  <input type="button" wicket:id="toggle_contents_button" value=""/>
>>>>  <span wicket:id="legend"></span>
>>>>  </legend>
>>>>       <span wicket:id="contents">
>>>>          <wicket:body/>
>>>>       </span>
>>>>  </fieldset>
>>>> </wicket:border>
>>>> </body>
>>>> </html>
>>>>
>>>> Somehow the renderer does not find the body tag because the "contents"
>>>> -block is not visible? Is there any fix to allow hiding the border
>>>> contents by default?
>>>>
>>>> **
>>>> Martin
>>>>
>>>> 2008/8/10 Igor Vaynberg <[EMAIL PROTECTED]>:
>>>>> thanks
>>>>>
>>>>> -igor
>>>>>
>>>>> On Sat, Aug 9, 2008 at 10:19 PM, Martin Makundi
>>>>> <[EMAIL PROTECTED]> wrote:
>>>>>>> do you call contents.add(getbodycontainer()) so that <border:body/> is
>>>>>>> properly inside the "contents" container?
>>>>>>
>>>>>> Thanx.. now it works. It didn't occur to me to look into the javadoc
>>>>>> as I was following the example in the wiki. BUT, I have now updated
>>>>>> the WiKi accordingly!
>>>>>>
>>>>>> **
>>>>>> Martin
>>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> 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]
>
>

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

Reply via email to