Passing Parameters - Passage of Parameters

Hello Everyone, I need to pass a parameter from the class that extend the UI (The main class that is created during the vaadin project creation) to the component where i’m creating all the logic behind the various textbox messagebox buttons etc…how do i manage to do that? I tried different approaches but nothing seems work.

in the UI class:

public String giveString(){
return “test”;

in the component how do i get this info? and how do i send back a String if i need?

I’m doing that because i need to see the sessionBean from the composite and so far i’m able to see it only from the UI Class

You can do it e.g. like follows. Just add the method to your UI class for convenience:

public static YourUIClass getCurrent() {
    return (YourUIClass) CurrentInstance.get(UI.class);

Then you can call your current UI instance methods like this: