Johan Compagner a écrit :
But your patch doesn't do much with style i believe?
It only generates a span tag where the component would be?
Sorry I made a mistake in the attachement : Here is the right one
https://issues.apache.org/jira/secure/attachment/12353648/component-real.txt
Is that allowed every where?
No it isn't allow in table for exemple

Also always just rendering the component but use the style to make in
invisible
could be a security problem. So that can't be the default.

What do you mean by security problem?

But i do like to have some option where i can say render that span (if that
is always possible) or use style

johan


On 3/19/07, Vincent Demay <[EMAIL PROTECTED]> wrote:

Hi,
    In the current implementation, going from setVisible(false) to
setVisible(true) in ajax does not work, The current workaround of this
bug is to surround the element with an other and to rerender the
surounding element. I found this way not very smart and too frustating
for the user. We actually need to surounding because nothing is render
when setVisible is false.

    In https://issues.apache.org/jira/browse/WICKET-365 issue, I propose
a fix. This fix will simply render a tag with an id and a style
display:none. I don't think it is very expensive and works well with all
browsers (IE, FF, Safari) and also in html table (often a problem in
IE). With this patch it is possible to change the visibility of a
component in a page without surounding it and adding it to the target.
    This issue has been tagged as won't fix, But I still think it is a
good stuff

    For exemple  a template(1) with foo.setVisible(false) and
bar.setVisible(false) will be render as (2). See

https://issues.apache.org/jira/secure/attachment/12353204/Component.patch.txt

(1)
<div wicket:id="bar">
    <div>Inner</div>
    <p>lsdkqjlqkdsfj</p>
    ... a lot of inner content
</div>
<table>
     <tr>
       <td>
             ....
       </td>
    </tr>
    <tr wicket:id="foo">
       <td>bla bla</td>
    </tr>
</table>



(2)
<div id="bar0" style="display:none"></div>
<table>
     <tr>
       <td>
             ....
       </td>
    </tr>
    <tr id="foo1" style="display:none"></tr>
</table>

I think this patch can make setVisible(false -> true) in ajax smarter
and more intuitive for user.

WDYT?






Reply via email to