-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address book demonstration version 2.0 #29
Comments
The branch https://github.com/vaadin/portlet-support/tree/addressbook2 has the API demonstrations under This is a recycled example provided by @denis-anisimov, reusing the The approach uses The public class Form extends FormLayout implements HandlesPortletModes {
// ...
@Override
public void handleHelpMode(PortletRequestContext context) {
context.respondWith(FormHelpDisplay.class);
}
// ... context provides a The Vaadin portlet implementation is done via interface implementations as I feel the core experience a developer would want is to "just make a Vaadin component". The interfaces add a few methods the developer needs to implement (and provides few convenience methods) but otherwise the development would focus on building the actual components. IPC // Form.java
private void save() {
Contact contact = binder.getBean();
ContactService.getDemoService().save(contact);
makeRenderRequest().withParameter(Constants.RP_SAVED_CONTACT,
contact.getId());
} The would aim to hide the "create a new render request url from the mutable render request parameters received from the current render response object and print a link to the page". Vaadin's Portlet integration would hide all that, allowing the users to make render requests as a response to a button click. This would need to register some listener to render requests (or have the latest render request stored) to be able to construct a new render request from that context. Then we would need to be able to actually invoke the render request from server side. To be 100% honest, I did not have time to figure out if that is actually feasible. The receiving (Vaadin) portlet would handle the render request with the public parameter: // GridView.java
@Override
public void handleViewMode(PortletRequestContext context) {
String contact = context.publicParameters().get(Constants.RP_SAVED_CONTACT);
if (contact != null) {
// lets pretend the parse does not throw
int id = Integer.parseInt(contact);
refresh(id);
}
} |
I'm not entirely sure how |
Reiterate Address book demonstration (#19) to use the newer iteration of Vaadin portlet API defined by #25. Use the request parameter based IPC.
Address book has two portlets that communicate using Portlet spec IPC.
The text was updated successfully, but these errors were encountered: