Foren

Metadata based UI and Business Logic

Amit Sharma, geändert vor 11 Jahren.

Metadata based UI and Business Logic

New Member Beiträge: 6 Beitrittsdatum: 29.08.12 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: Metadata based UI and Business Logic

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: Metadata based UI and Business Logic

New Member Beiträge: 6 Beitrittsdatum: 29.08.12 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: Metadata based UI and Business Logic

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: Metadata based UI and Business Logic

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
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. :-)