This is how the code looks (Form.java, 1.4-SNAPSHOT):
visitChildren(Component.class, new IVisitor<Component>()
{
public Object component(Component component)
{
boolean isMultiPart = false;
if (component instanceof Form)
{
Form<?> form = (Form<?>)component;
if (form.isVisibleInHierarchy() && form.isEnabledInHierarchy())
{
isMultiPart = (form.multiPart != 0);
}
}
else if (component instanceof FormComponent)
{
FormComponent<?> fc = (FormComponent<?>)component;
if (fc.isVisibleInHierarchy() && fc.isEnabledInHierarchy())
{
isMultiPart = fc.isMultiPart();
}
}
if (isMultiPart == true)
{
anyEmbeddedMultipart[0] = true;
return STOP_TRAVERSAL;
}
return CONTINUE_TRAVERSAL;
}
});
So it takes into account the visibility
On Tue, Oct 26, 2010 at 2:20 PM, Martin Makundi <
[email protected]> wrote:
> Hi!
>
> Is it a bug or a feature that
>
> form.isMultiPart().anyEmbeddedMultipart
>
> picks ismultipart also from hidden nested forms (that are not visible
> in hierarchy)?
>
> form
> modalwindow
> panel
> form-with-multipart-but-not-visible-before-modalwindow-is-opened
>
> **
> Martin
>