ah, so this fails when the an innerform is invisible and you called
setoutputmarkupplaceholdertag(true).

that makes sense, and you are right - we do not handle this usecase right now.

please open a jira issue, and if you do not want to wait for a
snapshot subclass your form and overide it thusly:


        @Override
        protected void renderPlaceholderTag(ComponentTag tag, Response response)
        {
                if (isRootForm())
                {
                        super.renderPlaceholderTag(tag, response);
                }
                else
                {
                        response.write("<div ");
                        if (getOutputMarkupId())
                        {
                                response.write(" id=\"");
                                response.write(getMarkupId());
                                response.write("\"");
                        }
                        response.write(" style=\"display:none\"></div>");
                }
        }


-igor

On Fri, Mar 13, 2009 at 12:22 AM, Martin Makundi
<[email protected]> wrote:
>> wicket rewrites nested form tags for you to divs
>
> Is it a bug that wicket does not rewrite if the form is not visible?
>
> Component.render(final MarkupStream markupStream) {
>
> ...
>
> if (determineVisibility()) {
>
>  // render -> replace form with div
>
> } else if (markupStream != null)
> {
>  if (getFlag(FLAG_PLACEHOLDER))
>  {
>  final ComponentTag tag = markupStream.getTag();
>  renderPlaceholderTag(tag, getResponse()); ///////////////////////
> Here form does not replace "form" with "div"
> }
> markupStream.skipComponent();
> }
>
>
> **
> Martin
>
>>
>> -igor
>>
>> On Thu, Mar 12, 2009 at 11:52 PM, Martin Makundi
>> <[email protected]> wrote:
>>> Hi!
>>>
>>> onComponentTag is not processed when a component is not visible.
>>>
>>> This has the implication that nested forms look like <form
>>> style="display:none"></form> which potentially breaks form processing
>>> in some browsers (ie7).
>>>
>>> Is it a general guideline to override renderPlaceholderTag() in such
>>> situations? Or should form override it automatically to handle nested
>>> form tag names?
>>>
>>> **
>>> 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]

Reply via email to