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

[jira] Created: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

Go from setVisible(false) to setVisible(true) on a component in ajax does not work
----------------------------------------------------------------------------------

                 Key: WICKET-365
                 URL: https://issues.apache.org/jira/browse/WICKET-365
             Project: Wicket
          Issue Type: Bug
            Reporter: vincent Demay
             Fix For: 1.3, 2.0


Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

vincent Demay commented on WICKET-365:
--------------------------------------

Thanks to Fred Bertin ;)

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Vincent Demay commented on WICKET-365:
--------------------------------------

The patch using setoutputmarkuptag is Component.java.365.patch.txt (3 kb)

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: component-real.txt, Component.java.365.patch.txt, Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg commented on WICKET-365:
--------------------------------------

because this is for usecases when a component is hidden initially, and is later shown

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg commented on WICKET-365:
--------------------------------------

maybe the user has css that says display:block !important; on that div, who knows.

the only foolproof way to do this is to repaint the parent

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg commented on WICKET-365:
--------------------------------------

i dont really like this. that span can mess with css,etc. if you set something as invisible it should be invisible.

the regular pattern of dealing with this is to add the invisible component's parent to the ajax target

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Johan Compagner commented on WICKET-365:
----------------------------------------

i have said this before and i do it now in my own projects:

setVisible(false) in ajax should just do :display:none

But i can do that easily in our code. I don't know we can do that generic.


> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

vincent Demay commented on WICKET-365:
--------------------------------------

Johan : Imho setVisible(false) should not render all the component to avoid the have a useless heavy html generated code.

Igor : ok, css can make some disturbing thinks on this. 
What about adding a style="display:none", style tag always overwrites css, is'nt it? 
I think putting a span tag is good (What is done in cocoon for exemple) because surounding something with a specific webMarkupContainer to make it visible or not is very annoying for developpers. On the other hand if you suround with a parent, it is the same problem because the parent should also have a html tag associated with disturbing css classes. 

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Reopened: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Vincent Demay reopened WICKET-365:
----------------------------------


According to the thread on wicket-dev : 
http://www.nabble.com/Going-from-setVisible%28false%29-to-setVisible%28true%29-does-not-work-without-surounding-element-tf3426430.html

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: component-real.txt, Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

Posted by "Frédéric Bertin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478721 ] 

Frédéric Bertin commented on WICKET-365:
----------------------------------------

then why not simply adding the style="display:none" attribute to the component tag, instead of creating an additional <span> ?

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg commented on WICKET-365:
--------------------------------------

why is the patch setting the flag to default and then turning it off?

@@ -530,7 +534,7 @@
 
 	/** Component flags. See FLAG_* for possible non-exclusive flag values. */
 	private int flags = FLAG_VISIBLE | FLAG_ESCAPE_MODEL_STRINGS | FLAG_VERSIONED | FLAG_ENABLED
-			| FLAG_IS_RENDER_ALLOWED;
+			| FLAG_IS_RENDER_ALLOWED | FLAG_PLACEHOLDER;
 
 	/** Component id. */
 	private String id;
@@ -567,6 +571,8 @@
 	{
 		setId(id);
 		getApplication().notifyComponentInstantiationListeners(this);
+		//Default behavior : do not render placeholder
+		setFlag(FLAG_PLACEHOLDER, false);
 	}


> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: component-real.txt, Component.java.365.patch.txt, Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Assigned: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg reassigned WICKET-365:
------------------------------------

    Assignee: Igor Vaynberg

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Updated: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

vincent Demay updated WICKET-365:
---------------------------------

    Attachment: Component.patch.txt

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

vincent Demay commented on WICKET-365:
--------------------------------------

I try with placeholder under safari, ff and ie, the problem comes from ff. When you try to put a non html tag in a table tag, firefox remove it to put it before the first table tag. So we can not to this kind of stuff with a wicket:placeholder.

Now I've done an other version putting the componentTag without its content but with its id and a style="display:none". It works like a charm under IE, FF and safari. Have a look at the second attached file.

Here is the test I used :

	private final TextField field;
	private final WebMarkupContainer markupContainer;
	
	public TestPlaceHolder(PageParameters parameters)
	{
		
		markupContainer = new WebMarkupContainer("markupContainer");
		markupContainer.setVisible(false);
		markupContainer.setOutputMarkupId(true);
		add(markupContainer);
		
		field = new TextField("text", new Model("foo"));
		field.setVisible(false);
		field.setOutputMarkupId(true);
		add(field);
		
		
		add(new AjaxLink("showField"){

			@Override
			public void onClick(AjaxRequestTarget target) {
				field.setVisible(true);
				markupContainer.setVisible(true);
				target.addComponent(markupContainer);
				target.addComponent(field);
				
			}
			
		});
		
	}
	



And Html file : 

        <input wicket:id="text"></input>
	<table>
		<tr>
			<td>test0</td>
		</tr>
		<tr wicket:id="markupContainer">
			<td>test1</td>
		</tr>
		<tr>
			<td>test2</td>
		</tr>
	</table>
	<a wicket:id="showField">ShowField</a> 

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg commented on WICKET-365:
--------------------------------------

what about cases where this would lead to invalid html? lets say you want to hide a row inside a table. having

<tr></tr><span style="display:none"></span><tr></tr> isnt kosher

hate to play the devils advocate on this, but we need to make sure that this is the best solution and will work for everything out there.

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Updated: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Vincent Demay updated WICKET-365:
---------------------------------

    Attachment: Component.java.365.patch.txt

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: component-real.txt, Component.java.365.patch.txt, Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Resolved: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg resolved WICKET-365.
----------------------------------

    Resolution: Won't Fix

im closing this now because i dont think this is the way to go. if you feel strongly about it please start a public discussion on @dev

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Updated: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Vincent Demay updated WICKET-365:
---------------------------------

    Attachment: component-real.txt

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: component-real.txt, Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Updated: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

vincent Demay updated WICKET-365:
---------------------------------

    Attachment: Component.patch.txt

Second version patch

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Resolved: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg resolved WICKET-365.
----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0)

implemented as setOutputMarkupPlaceholderTag()

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3
>
>         Attachments: component-real.txt, Component.java.365.patch.txt, Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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


[jira] Commented: (WICKET-365) Go from setVisible(false) to setVisible(true) on a component in ajax does not work

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

Igor Vaynberg commented on WICKET-365:
--------------------------------------

i still dont think this is a way to go. if something is hidden it should not be rendered!

one) it might be an expensive operation to render it
two) when you do call show on it the markup is not updated at that time, just made visible, so you will potentially display stale data.

i think the original way is wordier but still the best because it doesnt have any problems other then wordiness

> Go from setVisible(false) to setVisible(true) on a component in ajax does not work
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-365
>                 URL: https://issues.apache.org/jira/browse/WICKET-365
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: vincent Demay
>         Assigned To: Igor Vaynberg
>             Fix For: 1.3, 2.0
>
>         Attachments: Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not visible. The attach patch simply generates a <span id="ComponentMarkupId"></span> when component is not visible and OuputMarkupId true. So we can now use ajax on setVisible(false component)

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