Fórum

Metadata based UI and Business Logic

Amit Sharma, modificado 11 Anos atrás.

Metadata based UI and Business Logic

New Member Postagens: 6 Data de Entrada: 29/08/12 Postagens Recentes
Hi, I have a requirement to display customer specific UI depending on customer data (e.g. Customer's country). Do we have something out of the box in Liferay to support this requirement so that it can identify customer attribute and trigger specific business logic and UI ?

Thanks for help in advance.

Regards,
Amit Sharma
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Metadata based UI and Business Logic

Liferay Legend Postagens: 14918 Data de Entrada: 02/09/06 Postagens Recentes
Each user has a locale that they can change in their profile page.

The locale is used by Liferay to render labels, etc., in the native language of the user, but outside of that will not alter the general 'appearance' of a page, nor does it have any impact on business logic OOTB.

That said, you can use the user's locale in your own portlets to adjust the presentation as well as the business logic...
Amit Sharma, modificado 11 Anos atrás.

RE: Metadata based UI and Business Logic

New Member Postagens: 6 Data de Entrada: 29/08/12 Postagens Recentes
Thank you David H Nebinger.
Do you suggest that I get the user locale in my portlet and trigger specific business logic and redirect to different view depending on the user locale ?

Thanks,
Amit Sharma
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Metadata based UI and Business Logic

Liferay Legend Postagens: 14918 Data de Entrada: 02/09/06 Postagens Recentes
Sure, if you need to.

For the UI, though, most times the layout/content remains the same, it's just the localization that's necessary. If this is the case for you, then a resource bundle would be the way to go (rather than multiple views, you have one view that uses the resource bundle for localization). If it is truly a different layout/content per locale, then you can use the user's locale to determine the view.

For business logic, you can use the locale to invoke different logic when necessary.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Metadata based UI and Business Logic

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Do you suggest that I get the user locale in my portlet and trigger specific business logic and redirect to different view depending on the user locale ?


The best thing to do actually is to modify liferay so page display can be determined by rules. User's locale and other attributes may be part of a rule to determine the display.

Liferay's mobile rule and business rule are in the right direction but kind of fell short. :-)