This demo explains how ManagedBeans can be used in Html Dialogs.
In an Html Dialog it is possible to interact with normal Java classes by declaring them as ManagedBeans.
In this demo ivy project we have a ManagedBean class under ch.ivyteam.htmldialog.demo.other.managedBean.ApplicationDemoBean.java . We use the bean to show and store a simple String value in the description field of the class. Therefore we bind the value of the input text to: #{applicationDemoBean.description}
ch.ivyteam.htmldialog.demo.other.managedBean.ApplicationDemoBean.java
#{applicationDemoBean.description}
The property of this managed bean will be shared with all users on this server as it is annotated with @ApplicationScoped. Open another browser and check the property value.
MangedBeans can be annotated with a scope. The scope defines the lifecycle of a ManageBean. Currently three scopes for ivy project beans are supported:
Process: Element:
Developer-html-dialog-demos