Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Finally I got an answer to my question. I just replaced the invisible components with a dummy visible label with no text. </p> <p>And used it alternatively to switch between visible and invisible.</p> <p>I <a href="https://vaadin.com/forum#!/thread/3398357" rel="nofollow">asked the question in the Vaadin forum</a>, and here's the response I got, from <a href="https://vaadin.com/web/kim/home" rel="nofollow">Kim Leppanen</a>:</p> <blockquote> <p>With Vaadin 7, if you set a component's visibility to false, then the component's information is not sent to the browser at all - it is just as if the component wouldn't exist in the layout at all.</p> <p>I can quickly come up with two solutions. If you know the size of the component whose visibility you want to toggle, then you can use placeholder components - such as a Label. Put a label with the correct size in the place where you want the component. When you want to set a component as visible, then replace the label with the actual component.</p> <p>The second option is to use css. Apply the css attribute "visibility: hidden" for the component you want to hide. Note that the component is not "truly" hidden. Let's say that it is a button. A user could still inspect the DOM tree and see the button in the code, change the visibility of the component on the client side (eg using developer tools or firebug) and then see and use the button as if it would be visible in the layout.</p> </blockquote> <p>I am putting it here because people might add some more useful answers there. For a detailed explanation please see <a href="http://techieme.in/forcing-vaadin-component-to-occupy-its-space-in-invisible-state/" rel="nofollow">this</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload