You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Carlos Pita (JIRA)" <ji...@apache.org> on 2007/11/20 22:28:43 UTC

[jira] Created: (WICKET-1173) Border bodycontainer doesn't render a markup placeholder

Border bodycontainer doesn't render a markup placeholder
--------------------------------------------------------

                 Key: WICKET-1173
                 URL: https://issues.apache.org/jira/browse/WICKET-1173
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-rc1
            Reporter: Carlos Pita
             Fix For: 1.3.0-rc2
         Attachments: border.tgz

A border with getBodyContainer().setOutputMarkupPlaceholderTag(true); doesn't generate a placeholder after its body is hidden. I've attached an example.

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


[jira] Updated: (WICKET-1173) Border bodycontainer doesn't render a markup placeholder

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

Carlos Pita updated WICKET-1173:
--------------------------------

    Attachment: border.tgz

> Border bodycontainer doesn't render a markup placeholder
> --------------------------------------------------------
>
>                 Key: WICKET-1173
>                 URL: https://issues.apache.org/jira/browse/WICKET-1173
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Carlos Pita
>             Fix For: 1.3.0-rc2
>
>         Attachments: border.tgz
>
>
> A border with getBodyContainer().setOutputMarkupPlaceholderTag(true); doesn't generate a placeholder after its body is hidden. I've attached an example.

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


[jira] Assigned: (WICKET-1173) Border bodycontainer doesn't render a markup placeholder

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

Igor Vaynberg reassigned WICKET-1173:
-------------------------------------

    Assignee: Juergen Donnerstag

> Border bodycontainer doesn't render a markup placeholder
> --------------------------------------------------------
>
>                 Key: WICKET-1173
>                 URL: https://issues.apache.org/jira/browse/WICKET-1173
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Carlos Pita
>            Assignee: Juergen Donnerstag
>             Fix For: 1.3.0-rc2
>
>         Attachments: border.tgz, hideableborder.zip
>
>
> A border with getBodyContainer().setOutputMarkupPlaceholderTag(true); doesn't generate a placeholder after its body is hidden. I've attached an example.

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


[jira] Resolved: (WICKET-1173) Border bodycontainer doesn't render a markup placeholder

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

Gerolf Seitz resolved WICKET-1173.
----------------------------------

    Resolution: Fixed
      Assignee: Gerolf Seitz  (was: Juergen Donnerstag)

it's fixed now in trunk.

note that you still should implement this like a suggested in my first comment.
relying on wicket:body is not a good idea, as it is stripped out anyway if the application is run in deployment mode.
also: wicket tags are not rendered in ajax request, so there's a second reason for not doing this.

please try again with the necessary modifications to your usecase (wrapping wicket:body with a WebMarkupContainer), 
and reopen this issue if it still doesn't work.

> Border bodycontainer doesn't render a markup placeholder
> --------------------------------------------------------
>
>                 Key: WICKET-1173
>                 URL: https://issues.apache.org/jira/browse/WICKET-1173
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Carlos Pita
>            Assignee: Gerolf Seitz
>             Fix For: 1.3.0-rc2
>
>         Attachments: border.tgz, hideableborder.zip
>
>
> A border with getBodyContainer().setOutputMarkupPlaceholderTag(true); doesn't generate a placeholder after its body is hidden. I've attached an example.

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


[jira] Commented: (WICKET-1173) Border bodycontainer doesn't render a markup placeholder

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

Gerolf Seitz commented on WICKET-1173:
--------------------------------------

just to save you some time, the suggested solution doesn't work.

my speculation:
when the bodycontainer is set visible and is rendered again, the "originalMarkupStream" in Border.BorderBodyContainer.onComponentTagBody(MarkupStream, ComponentTag) is still at the position like it was after the Border has been initially rendered.
as a consequence, MarkupContainer#renderComponentTagBody (which is called for the BorderBodyContainer) doesn't render the tagbody, because the call to markupStream.hasMore() (which is actually the before mentioned originalMarkupStream) returns false and does the body of the while loop for rendering the children is not executed.


> Border bodycontainer doesn't render a markup placeholder
> --------------------------------------------------------
>
>                 Key: WICKET-1173
>                 URL: https://issues.apache.org/jira/browse/WICKET-1173
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Carlos Pita
>             Fix For: 1.3.0-rc2
>
>         Attachments: border.tgz
>
>
> A border with getBodyContainer().setOutputMarkupPlaceholderTag(true); doesn't generate a placeholder after its body is hidden. I've attached an example.

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


[jira] Updated: (WICKET-1173) Border bodycontainer doesn't render a markup placeholder

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

Cafesolo updated WICKET-1173:
-----------------------------

    Attachment: hideableborder.zip

The attached code (hideableborder.zip) doesn't work unless you call getApplication().getDebugSettings().setComponentUseCheck(false);

> Border bodycontainer doesn't render a markup placeholder
> --------------------------------------------------------
>
>                 Key: WICKET-1173
>                 URL: https://issues.apache.org/jira/browse/WICKET-1173
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Carlos Pita
>             Fix For: 1.3.0-rc2
>
>         Attachments: border.tgz, hideableborder.zip
>
>
> A border with getBodyContainer().setOutputMarkupPlaceholderTag(true); doesn't generate a placeholder after its body is hidden. I've attached an example.

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


[jira] Commented: (WICKET-1173) Border bodycontainer doesn't render a markup placeholder

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

Gerolf Seitz commented on WICKET-1173:
--------------------------------------

i think you somehow misuse the bodyContainer. for one, the wicket:body tag is not even rendered when you run the application in standard deployment mode (see MarkupSettings->stripWicketTags).

as for your example:
<wicket:border>
<a wicket:id="hideLink">Hide/Show</a>
<wicket:body></wicket:body>					
</wicket:border>

i'd suggest wrapping the body in a separate container and hiding/showing the container instead:
(code based on your example)
HTML:
<wicket:border>
<a wicket:id="hideLink">Hide/Show</a>
<div wicket:id="bodyWrapper"><wicket:body></wicket:body></div>
</wicket:border>

JAVA:
public class HideableBorder extends Border {
	private WebMarkupContainer wrapper 

	public HideableBorder(String name) {
		super(name);
		addHideLink();
		wrapper= new WebMarkupContainer("bodyWrapper");
		wrapper.setOutputMarkupPlaceholderTag(true);
		wrapper.setVisible(false);
	}

	private void addHideLink() {
		add(new AjaxLink("hideLink") {
			public void onClick(AjaxRequestTarget target) {
				wrapper.setVisible(!wrapper.isVisible());
				target.addComponent(wrapper);
			}
		});
	}
}

> Border bodycontainer doesn't render a markup placeholder
> --------------------------------------------------------
>
>                 Key: WICKET-1173
>                 URL: https://issues.apache.org/jira/browse/WICKET-1173
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Carlos Pita
>             Fix For: 1.3.0-rc2
>
>         Attachments: border.tgz
>
>
> A border with getBodyContainer().setOutputMarkupPlaceholderTag(true); doesn't generate a placeholder after its body is hidden. I've attached an example.

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