Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 49 results.
of 3
van doan
Liferay for Mobile Web Development???
January 20, 2011 1:03 AM
Answer

van doan

Rank: New Member

Posts: 5

Join Date: January 5, 2011

Recent Posts

Hi all,

I'm taking consideration of using Liferay portal for Mobile Web Development. Therefore, it's good for me to listen to your experiences or helpful suggestions. My idea is as follows:

The portal is the "root" that will generate two different presentation layers.
1. UI for full browsers (access from laptop, pc)
2. UI for full browsers (access from smart phones or high-end phones)
3. Basic UI for very basic browsers (access from mid-end phones) Not required any more

Any replies would be highly appreciated. Thank you so much!
van doan
RE: Liferay for Mobile Web Development???
January 13, 2011 6:37 PM
Answer

van doan

Rank: New Member

Posts: 5

Join Date: January 5, 2011

Recent Posts

80 views in 10 ten days and 0 reply recorded. I didn't ask in the right thread, did I?
Mika Koivisto
RE: Liferay for Mobile Web Development???
January 18, 2011 5:23 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1513

Join Date: August 7, 2006

Recent Posts

Probably not that many people have work on multichannel publishing so that might be reason for lack of replies. I'm no expert but I would separate the smartphone and regular browse into different sites (communities) so that you can provide better experience for smartphone users.
Maarten van Heiningen
RE: Liferay for Mobile Web Development???
January 19, 2011 12:27 AM
Answer

Maarten van Heiningen

Rank: Regular Member

Posts: 173

Join Date: February 5, 2009

Recent Posts

Hi Doan,

You have option to present different types of visual presentation af the same content.

By default liferay will enable you to serve your content to fully webbrowser capable devises.
The second presentation posibility is for WAP enabled devices. This will show the same content but then stripped of all extras.

Now if you would like to create three UI versions of the same content you have to create a theme which allows you to switch layouts and styles based upon the browser or devices capabilities.

To get this done is by accessing the user agent request and based on the result present or a different sub theme or a diffent stylesheet.

If you need any help please let me know. You can always post these messages in the forum section about themes Liferay themes forum

Maarten
Milen Dyankov
RE: Liferay for Mobile Web Development???
January 19, 2011 12:34 AM
Answer

Milen Dyankov

Rank: Regular Member

Posts: 173

Join Date: September 23, 2009

Recent Posts

I'm currently working on Liferay extension that would allow to dynamically apply any installed Liferay theme based on visitor's device capabilities (like OS and version, display size, pointing method, ...). The solution uses Wurfl for device recognition and I have already successfully integrated it with Liferay. I'm also thinking about storing device capabilities in ThemeDisplay so it can be used in portlets and Velocity/Freemarker macros.

The reason this plugin is not yet available is I'm still fighting with AUI to provide the configuration view. Unfortunately since I'm extending existing Liferay functionality I have practically no other option but AUI which turned out to be the hardest part to develop due to the lack of any useful documentation.

Once I manage to figure out how to properly use AUI and thus extend the current "Look & Feel" functionality I will make the extension available as Liferay Ext plugin.
Maarten van Heiningen
RE: Liferay for Mobile Web Development???
January 19, 2011 1:07 AM
Answer

Maarten van Heiningen

Rank: Regular Member

Posts: 173

Join Date: February 5, 2009

Recent Posts

Hi Milen,

This sounds very promising! If you need any testing/help please let me know. It's sounds like a solid solution for presenting different visual presentations of the same content.

Regards,
Maarten
van doan
RE: Liferay for Mobile Web Development???
January 20, 2011 12:27 AM
Answer

van doan

Rank: New Member

Posts: 5

Join Date: January 5, 2011

Recent Posts

Thanks for your suggestion, Mika Koivisto. If so, things would be much easier. We'd like to 'merge' three into one 'cause this helps us to maintain services smoothly later on.

Image we have to deploy a new service and it's obviously double work when we have two separate sites.

However, your idea gave me another thought. Now it's only necessary to support two layers.
1. For pc/laptop browsers
2. For smart or high-end phones

Mid and low-end support is not required any more.

Mika Koivisto:
Probably not that many people have work on multichannel publishing so that might be reason for lack of replies. I'm no expert but I would separate the smartphone and regular browse into different sites (communities) so that you can provide better experience for smartphone users.
van doan
RE: Liferay for Mobile Web Development???
January 20, 2011 12:48 AM
Answer

van doan

Rank: New Member

Posts: 5

Join Date: January 5, 2011

Recent Posts

Thank you Maarten and Milen. We clearly meet two problems.

The first one is device detection as you mentioned and it's not really an impossible task if we ourselves check user-agent or use wurfl. --> solved

The second one is render that is supposed to generate right content based on user-agent. I tried in vain in finding out a third-party api.

@Milen: Please update your work if you get any progress. I'm willing to join in if you don't mind.

Now my purpose is supporting only two ui layers. One for normal browsers and the other for browsers of smart-phones or high-end phones.
Milen Dyankov
RE: Liferay for Mobile Web Development???
January 21, 2011 11:19 PM
Answer

Milen Dyankov

Rank: Regular Member

Posts: 173

Join Date: September 23, 2009

Recent Posts

I'm glad you guys are interested and willing to help. I'll do my best to put the code together and make it public during the weekend. I'll post here to let you know but you can also monitor my GitHub repo. It will be a new project.
Milen Dyankov
RE: Liferay for Mobile Web Development???
January 26, 2011 5:29 PM
Answer

Milen Dyankov

Rank: Regular Member

Posts: 173

Join Date: September 23, 2009

Recent Posts

Hi guys,

I finally managed to put all my experimental peaces of code together into a project called liferay-multi-device-ext. It took me a while to do so and while it's far from ready, it works (sometimes) and can give you an idea of what it will be one day. In case you are still willing to test/help here is mini installation tutorial:

  • make sure you have clean install of Liferay 6.0.5 (the ext plugin was not tested and may brake you liferay instance)
  • you'll need Liferay SDK 6.0.5 configured to deploy plugins to the above mentioned clean Liferay Portal
  • download or checkout liferay-multi-device-ext into <liferay-sdk-6.0.5>/ext/multi-device-ext folder
  • create ThemeRule table by executing appropriate for your database SQL script from https://github.com/azzazzel/liferay-multi-device-ext/tree/master/docroot/WEB-INF/sql/tables. If you are using Hipersonic you can start database manager like this
    1java -cp liferay-portal-6.0.5/tomcat-6.0.26/lib/ext/hsql.jar org.hsqldb.util.DatabaseManager

  • download latest WURFL repository and save the zip into <liferay-portal-6.0.5>/wurfl directory (create it). You can actually place it anywhere and add appropriate paths in portal-ext.properties:

    1# Wurfl's main devices file
    2wurfl.main=${liferay.home}/wurfl/wurfl-latest.zip
    3
    4# Wurfl's patch files
    5wurfl.patches=

  • with portal not running go to <liferay-sdk-6.0.5>/ext/multi-device-ext and execute ant direct-deploy
  • start liferay


Once the portal is running, log in and go to "Manage" > "Page" > "Look and Feel" and you should see new tab called themes-rules (I'm sorry for the name, I didn't have the time to play with resource bundles). I'm attaching a screenshot so that you know what to expect.

There you can add as many rules as you wish. If more than one rule matches the one with higher priority (lower number) is applied. For example, have a look at the second screenshot, where 4 rules are defined.

  • If user is using iPad (or any other tablet) he will see Murali theme.
  • If user is using iPhone he will see Spurt(red) theme
  • If user is using any other device with iPhoneOS (for example iPod) he will see Spurt(Blue) theme
  • If user is using any other device with Android OS he will see Coffe N Cream theme
  • all other users will see default community theme


To test it I used User Agent Switcher but if you have a chance to test it with real devices and share your results it will be great. Of course all other comments, feedback and constructive criticism are highly welcomed.
Attachment

Attachment

Attachments: liferay-theme-rules-01.png (79.5k), liferay-theme-rules-02.png (71.3k)
van doan
RE: Liferay for Mobile Web Development???
January 26, 2011 5:49 PM
Answer

van doan

Rank: New Member

Posts: 5

Join Date: January 5, 2011

Recent Posts

It sounds interesting! Bravo, Milen. I'll take a look at this asap.
Nandula Bala
RE: Liferay for Mobile Web Development???
January 27, 2011 4:44 PM
Answer

Nandula Bala

Rank: New Member

Posts: 4

Join Date: January 27, 2011

Recent Posts

Hi

I am facing a build problem. The following line in build-common-ext under ext folder is throwing the error.

..\ext\build-common-ext.xml:123: The following error occurred while executing this line:
..\ext\build-common-ext.xml:169: The following error occurred while executing this line:
..\ext\multi-device-ext\docroot\WEB-INF\ext-lib\global does not exist.

ext-lib only has portal sub folder. global subfolder is missing. Can you append the zip with the missing folder?
Milen Dyankov
RE: Liferay for Mobile Web Development???
January 27, 2011 5:12 PM
Answer

Milen Dyankov

Rank: Regular Member

Posts: 173

Join Date: September 23, 2009

Recent Posts

Ooops, my fault. I keep forgetting Git does not manage folders and files but content. And since empty folder is not a content emoticon it's not in the repo.

I'll fix the repo but meanwhile simply create an empty folder called "global" in "..\ext\multi-device-ext\docroot\WEB-INF\ext-lib\" and it should be OK.
Milen Dyankov
RE: Liferay for Mobile Web Development???
January 27, 2011 5:27 PM
Answer

Milen Dyankov

Rank: Regular Member

Posts: 173

Join Date: September 23, 2009

Recent Posts

Well actually creating empty "global" folder is not enough. It seems the same problem is with:

multi-device-ext/docroot/WEB-INF/ext-util-bridges/src
multi-device-ext/docroot/WEB-INF/ext-util-java/src
multi-device-ext/docroot/WEB-INF/ext-util-taglibs/src

folders. I just fixed the repo so please pull/download again or simply create the above folders.
Nandula Bala
RE: Liferay for Mobile Web Development???
January 27, 2011 11:08 PM
Answer

Nandula Bala

Rank: New Member

Posts: 4

Join Date: January 27, 2011

Recent Posts

While the build problem is resolved(obtained all the stuff from ext.zip already downloaded) and having deployed the extension plugin with MySQL as database server, the following errors are coming through:

1. ERROR [PluginPackageUtil:1127] Unable to load repository http://plugins.liferay.com/official - This is already reported however need to see the solution.

2. ERROR [MainServlet:310] com.liferay.portal.kernel.events.ActionException: java.lang.IllegalArgumentException

Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 2: <<Liferay Home>>\wurfl\wurfl-latest.zip
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parse(URI.java:3019)
at java.net.URI.<init>(URI.java:578)
at java.net.URI.create(URI.java:840)
Milen Dyankov
RE: Liferay for Mobile Web Development???
January 28, 2011 1:00 AM
Answer

Milen Dyankov

Rank: Regular Member

Posts: 173

Join Date: September 23, 2009

Recent Posts

Nandula Bala:

1. ERROR [PluginPackageUtil:1127] Unable to load repository http://plugins.liferay.com/official - This is already reported however need to see the solution.


This is not related to the plugin. You are probably getting the same error while running clean Liferay install. Most often it happens when there is a proxy server used to connect to internet. If this is the case add the following to JVM parameters:
1
2-Dhttp.proxyHost=<PROXY_HOSTNAME> -Dhttp.proxyPort=<PROXY_PORT>


If you are using Tomcat bundle the JAVA_OPTS are usually found in
Linux: <liferay_bundle>/<tomcat_dir>/bin/set_env.sh
Windows: <liferay_bundle>/<tomcat_dir>/bin/set_env.bat

Nandula Bala:

2. ERROR [MainServlet:310] com.liferay.portal.kernel.events.ActionException: java.lang.IllegalArgumentException

Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 2: <<Liferay Home>>\wurfl\wurfl-latest.zip
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parse(URI.java:3019)
at java.net.URI.<init>(URI.java:578)
at java.net.URI.create(URI.java:840)


Not sure if you in fact have the text <<Liferay Home>> in the logs or you replaced the actual path in the post. Anyway the problem is this path contains invalid characters. Try to place wurfl-latest.zip in a location free of white spaces and international characters. For example /home/<USERNAME>/wurfl/wurfl-latest.zip on Linux or c:\wurfl\wurfl-latest.zip on Widnows. Then overwrite the wurfl.main property in <LIFERAY_HOME>/portal-ext.properties like this:

Linux
1
2wurfl.main=/home/<USERNAME>/wurfl/wurfl-latest.zip

Windows
1
2wurfl.main=c:/wurfl/wurfl-latest.zip
Nandula Bala
RE: Liferay for Mobile Web Development???
January 28, 2011 8:05 AM
Answer

Nandula Bala

Rank: New Member

Posts: 4

Join Date: January 27, 2011

Recent Posts

Finally i could make it work. But Still not able to view the themes in the selection as highlighted in the snapshot. Have i missed adding theme related entries in configuration file or soemoticon?
Milen Dyankov
RE: Liferay for Mobile Web Development???
January 29, 2011 3:14 PM
Answer

Milen Dyankov

Rank: Regular Member

Posts: 173

Join Date: September 23, 2009

Recent Posts

I'm not sure I understand what you mean by "not able to view the themes in the selection". Do you mean no themes are showing in the dialog box? Or you simply don't see the images in the rules table?
Nandula Bala
RE: Liferay for Mobile Web Development???
February 4, 2011 10:30 PM
Answer

Nandula Bala

Rank: New Member

Posts: 4

Join Date: January 27, 2011

Recent Posts

Sorry about delayed response.

I am able to see the theme-rule navigational link and after selecting the details , under "then apply theme" condition where we need to select the theme as shown in your snapshot,"Murali / Spurt /...." these themes are not getting listed for me to select and so i am selecting the existing themes and save the options.

On completion i am seeing a rule getting created @ DB. So i wanted to check why the themes are not getting displayed for me to select as part of the second step.

Regards
Bala
Milen Dyankov
RE: Liferay for Mobile Web Development???
February 5, 2011 4:06 PM
Answer

Milen Dyankov

Rank: Regular Member

Posts: 173

Join Date: September 23, 2009

Recent Posts

The popup should contain all themes (and color schemes) installed in Liferay. Do you have Murali and Spurt themes installed? If no, then go to Control Panel > Plugin Installation > Theme Plugins and click on Install More Themes button. If you have the themes installed and still don't see them in the pop-up check if the same user has the right to apply them in the traditional way: Look and Feel > Regular Browsers > Themes
Showing 1 - 20 of 49 results.
of 3