You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Stefan Kanev (JIRA)" <ji...@apache.org> on 2007/06/25 15:41:25 UTC

[jira] Created: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Border.resolve() should not attempt to render contents if bodyVisible is false
------------------------------------------------------------------------------

                 Key: WICKET-695
                 URL: https://issues.apache.org/jira/browse/WICKET-695
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-beta1, 1.3.0-beta2, 1.3.0-beta3
            Reporter: Stefan Kanev
            Priority: Minor


Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Posted by "Stefan Kanev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510137 ] 

Stefan Kanev commented on WICKET-695:
-------------------------------------

Where does the following method come from: 

Border border = findBorder(); 

I cannot find it...

> Border.resolve() should not attempt to render contents if bodyVisible is false
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-695
>                 URL: https://issues.apache.org/jira/browse/WICKET-695
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Stefan Kanev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>
> Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alastair Maw updated WICKET-695:
--------------------------------

        Fix Version/s:     (was: 1.3.0-rc1)
                       1.3.0-beta3
    Affects Version/s:     (was: 1.3.0-beta3)

> Border.resolve() should not attempt to render contents if bodyVisible is false
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-695
>                 URL: https://issues.apache.org/jira/browse/WICKET-695
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2
>            Reporter: Stefan Kanev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.3.0-beta3
>
>
> Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509375 ] 

Juergen Donnerstag commented on WICKET-695:
-------------------------------------------

Until we find a way to solve the problems mentioned above, this is the code necessary to not render the body markup and its components

	public final boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
			final ComponentTag tag)
	{
		// Determine if tag is a <wicket:body> tag
		if (!(tag instanceof WicketTag))
		{
			return false;
		}

		final WicketTag wtag = (WicketTag)tag;
		if (!wtag.isBodyTag())
		{
			return false;
		}

		final Response originalResponse;
		if (this.bodyVisible == true)
		{
			renderBodyComponent(markupStream, wtag);
		}
		else
		{
			// skip <wicket:body> component
			markupStream.skipComponent();
			
			// skip <xxx wicket:id="myBorder">
			Border border = findBorder();
			border.haveSeenBodyTag = true;
			final MarkupStream origBorderMarkup = border.getMarkupStream();
			border.setMarkupStream(null);
			final MarkupStream borderMarkup = border.findMarkupStream();
			borderMarkup.setCurrentIndex(borderMarkup.getCurrentIndex() - 1);
			borderMarkup.skipComponent();
			borderMarkup.setCurrentIndex(borderMarkup.getCurrentIndex() - 1);
			border.setMarkupStream(origBorderMarkup);
		}

		return true;
	}


> Border.resolve() should not attempt to render contents if bodyVisible is false
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-695
>                 URL: https://issues.apache.org/jira/browse/WICKET-695
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Stefan Kanev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>
> Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509357 ] 

Juergen Donnerstag commented on WICKET-695:
-------------------------------------------

update: This is an inconsistency, correct.. Invisible components are not rendered for performance reasons. I changed the Border code on my laptop to not render <body> components if setBorderBodyVisible(false), but I have some issues with Page.checkRendering() now which I don't know how to solve yet. The reason is that we resolve the <body> tag and its content without attaching a WebMarkupContainer to it and we are not re-assigning the border child components (insight <span wicket:id="border"> to that body container. And what makes it even more difficuilt, components added to <wicket:border> are also children of the same Border container. We only find out at render time who is who.

Juergen

> Border.resolve() should not attempt to render contents if bodyVisible is false
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-695
>                 URL: https://issues.apache.org/jira/browse/WICKET-695
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Stefan Kanev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>
> Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510437 ] 

Juergen Donnerstag commented on WICKET-695:
-------------------------------------------


	/**
	 * Find the proper Border component
	 * 
	 * @return Border
	 */
	private Border findBorder()
	{
		Border border = this;
		if (border.getMarkupStream() == null)
		{
			// Find Border at or above parent of this border
			final MarkupContainer borderParent = border.getParent();
			border = (Border)((borderParent instanceof Border) ? borderParent : borderParent
					.findParent(Border.class));
		}
		return border;
	}

Juergen

> Border.resolve() should not attempt to render contents if bodyVisible is false
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-695
>                 URL: https://issues.apache.org/jira/browse/WICKET-695
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Stefan Kanev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>
> Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-695.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-rc1

new Border committed to 1.3 trunk

> Border.resolve() should not attempt to render contents if bodyVisible is false
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-695
>                 URL: https://issues.apache.org/jira/browse/WICKET-695
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Stefan Kanev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.3.0-rc1
>
>
> Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag reassigned WICKET-695:
-----------------------------------------

    Assignee: Juergen Donnerstag

> Border.resolve() should not attempt to render contents if bodyVisible is false
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-695
>                 URL: https://issues.apache.org/jira/browse/WICKET-695
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Stefan Kanev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>
> Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-695) Border.resolve() should not attempt to render contents if bodyVisible is false

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511032 ] 

Juergen Donnerstag commented on WICKET-695:
-------------------------------------------

I have new version of Border which fixes this problem. It will probably make it into 1.3 but needs some more testing.

Juergen

> Border.resolve() should not attempt to render contents if bodyVisible is false
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-695
>                 URL: https://issues.apache.org/jira/browse/WICKET-695
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2, 1.3.0-beta3
>            Reporter: Stefan Kanev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>
> Border.resolve() should not attempt to render its nested components if setBorderBodyVisible(false) has been called. This way the behavior would be similar to Component.setVisible() - when the contents are not visible, wicket would not raise an exception if there are no corresponding components for the border's markup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.