Need to open a modal from Server side dynamically

I need to open a modal dialog dynamically through Server Side Code.

For example :

<b:modal open="true"><b:label>Modal</b:label>I am a modal</b:modal></c:create>

I want to open this modal on submit of the button
jsp
-----

<bjsf:commandButton  action="#{bean.openModal}"
                        value="Open Modal" />

bean
-----

public void openModal()
{
String client = "<b:modal open=\"true\"><b:label>Modal</b:label>I am a modal</b:modal></c:create>"


// Code to open this modal using the BackbaseContext.

}

Thanks
Nick

Hi Nick, Please see the

Hi Nick,

Please see the code below.
Index.jsp

<bjsf:commandButton id="cmdButton01" value="Open Modal" actionListener="#{myBean.openModal}" />
                               
<bjsf:modal show="#{myBean.showModal}">
<bjsf:outputText value="Backbase Modal" />
</bjsf:modal>

myBean.java
private boolean showModal = false;

public void openModal(ActionEvent event)
{
        showModal=true;
}

public boolean isShowModal() {
        return showModal;
}

public void setShowModal(boolean showModal) {
        this.showModal = showModal;
}

The “show” attribute is innitally set as false; triggering the openModal() will set the Boolean showModal to “true”.

Hope this helps,

-Senaka