Fórum

Creation of portlet with wizard

Varun Jain, modificado 8 Anos atrás.

Creation of portlet with wizard

New Member Postagens: 10 Data de Entrada: 26/04/12 Postagens Recentes
Hello Everyone,

I need suggestion for creating portlet with wizard means portlet with multiple steps/forms and data to be saved after completion of wizard.
With liferay mvc this is very difficult.Please respond.
thumbnail
Olaf Kock, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
First of all: You're not tied to Liferay MVC for your portlet implementation. You can use the framework that you have the most experience in - many of them have ready-to-use portlet bridges or versions (JSF, Spring Portlet MVC, many others).

That being said, the easiest way to implement a multi-step-wizard is to just carry all form fields forward as hidden fields, once their step in the wizard has been completed. This way there needs to be no server-side-state and you always have all data available once a form is submitted. Though this is independent of the technology used, some of them might have ready-to-use wizard abstractions. But you'll have to check this for the framework that you end up choosing.
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
Spring Web Flow works in portlets and it can handle this kind of conversation.

JSF has a similar sort of scope.

And it is quite possible in Liferay MVC. Each forward step copies incoming param values to hidden fields on the JSF page, each backwards step restores the previously picked versions. If you wanted to allow unlimited forwards/backwards, each JSP page has fields for everything you're capturing, some visible for what can be edited and the rest are just hidden inputs.

Final "Finish" button bound to a back end action handler gets all of the form fields at once and does it's thing.

Likewise you can do a responsive implementation by making each "page" a div, most of whom are hidden. Then, with the magic of jquery, you allow "navigation" forwards and back just by hiding the one div and showing the next. Enable the "Finish" button when you get on last page and submit to back end action handler gets all of the data.

There's about a hundred and fifty other ways to skin this same cat if you know what you're doing.
thumbnail
Neil Griffin, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
David is correct, JSF @FlowScoped (which requires JSF 2.2 and CDI) might be helpful. For a demo of a wizard-like UI that uses @FlowScoped, see our jsf2-flows-portlet demo and a related blog titled Three Cheers for JSF 2.2 Faces Flows.
Varun Jain, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

New Member Postagens: 10 Data de Entrada: 26/04/12 Postagens Recentes
Thanks guys for your inputs.

I have created example using both spring webflow and primefaces. Problem i found out with webflow is lack of ajax support.
And with prime faces only problem is see is responsive issue with primefaces components.
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
You never said anything about ajax requirements or concerns about responsive widgets.

If you had, that would have adjusted the list.

Given the new requirements, the javascript div show/hide provides ajax-like performance (since it's not a full page refresh) and would work with spring mvc and liferay mvc.

For primefaces, there's absolutely nothing that may be preventing responsive except, perhaps, your implementation. Even the PF datatable widget, usually a large table, is responsive: http://www.primefaces.org/showcase/ui/data/datatable/responsive.xhtml
Varun Jain, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

New Member Postagens: 10 Data de Entrada: 26/04/12 Postagens Recentes
Thanks David.

But there is another issue which i found out using jsf (Multi language form-fields with JSF) it doesn't support that. Already for which there is separate thread in discussion
https://www.liferay.com/community/forums/-/message_boards/message/55979357.
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
So now you throw in I18N?

Are there any other requirements you want to throw out or should we keep giving suggestions for just the ones that you want to share piecemeal?

No thanks, I'm out.
Varun Jain, modificado 8 Anos atrás.

RE: Creation of portlet with wizard (Resposta)

New Member Postagens: 10 Data de Entrada: 26/04/12 Postagens Recentes
David ,

We can close this thread but for problem i am facing related to jsf i will follow that thread.
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
Going forward, if you have a question provide all of the details up front, not just selective details.

Post 1 asked about creating a wizard, which we answered.
Post 2 added an additional requirement of ajax and responsive, which we answered.
Post 3 added an additional i18n requirement.

Obviously you knew when you did the original post that you had this complete set of requirements. Releasing the details the way you did wasted my time and everyone else's who replied.
Varun Jain, modificado 8 Anos atrás.

RE: Creation of portlet with wizard

New Member Postagens: 10 Data de Entrada: 26/04/12 Postagens Recentes
Sorry David
But some of the requirements like responsiveness and internationalization were recently finalized.