> 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:
Actually I have began using the nested form as follows:
<form wicket:id="rootForm">
<table wicket:id="nestedForm">
</table
</form>
But then I must override as follows (to avoid the form's "invalid tag
name" exception):
protected void onComponentTag(ComponentTag tag) {
tag.setName("form");
super.onComponentTag(tag);
tag.setName("tr");
}
This way I do not need to override the renderPlaceholderTag because it
uses the tag name given in the markup.
I wonder if (nested) forms should simply be allowed to have any tag
name the programmer desires?
Meanwhile, I opened the jira issue:
https://issues.apache.org/jira/browse/WICKET-2166
**
Martin
>
>
> @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]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]