Forums

Home » Alloy UI » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Seeya S Kudtarker
Liferay aui tabs Tag
March 21, 2013 8:51 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

I have tried using aui:tabs tag for creating tabs in liferay. I have made made a different jsp for each tab where I take input from user.

I was using the following code to change jsps:

<%
String viewtabValue = ParamUtil.getString(request, "viewtab", "viewEmpData");
PortletURL portletURL = renderResponse.createRenderURL();
portletURL.setWindowState(WindowState.NORMAL);
portletURL.setParameter("viewtab", viewtabValue);

String tabNames = "viewEmpData,viewEmpQualifications,viewEmpExperience,viewEmpHobbies";
String viewincludeURL = "/admin/" + viewtabValue.trim() + ".jsp";
%>

<liferay-ui:tabs
names="<%= tabNames %>" tabsValues="viewEmpData,viewEmpQualifications,viewEmpExperience,viewEmpHobbies"
param="tab" url="<%= portletURL.toString() %>" refresh="<%= false %>"/>

<c:if test='<%= viewtabValue.equals("viewEmpData") %>'>
<liferay-util:include page="/admin/viewEmpData.jsp" />
</c:if>
<c:if test='<%= viewtabValue.equals("viewEmpQualifications") %>'>
<liferay-util:include page="/admin/viewEmpQualifications.jsp" />
</c:if>
<c:if test='<%= viewtabValue.equals("viewEmployeeExperience") %>'>
<liferay-util:include page="/admin/viewEmpExperience.jsp"/>
</c:if>
<c:if test='<%= viewtabValue.equals("viewEmpHobbies") %>'>
<liferay-util:include page="/admin/DataviewEmpHobbies.jsp"/>
</c:if>
<c:import url="<%=viewincludeURL %>"/>


Is there a way wherein I can put everything in one jsp and still have separate tabs?
Hitoshi Ozawa
RE: Liferay aui tabs Tag
March 21, 2013 9:03 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

I think you're mixed up.

See the following page for an example on Alloy UI tabs (it's all in one page).
http://alloyui.com/examples/tabview/


From your code, you're using Liferay-ui tabs. This isn't Alloy UI tabs.
http://www.liferay.com/community/wiki/-/wiki/Main/Creating+Tabs+in+Liferay+Portlets/pop_up
Seeya S Kudtarker
RE: Liferay aui tabs Tag
March 21, 2013 9:09 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

Thanks Hitoshi for the links

Regards

Seeya
Hitoshi Ozawa
RE: Liferay aui tabs Tag
March 22, 2013 7:32 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

You're welcome.

As an additional note, I prefer to use jQuery instead of Alloy UI. The main reason is there's more documentations and related tools available. I have to write up the correct documentations if I ask my developers to use it. Also, Alloy UI is more of a set of pre-created widgets. It's nice if it fits your needs. Unfortunately, it still doesn't so I usually use it to give a demo.
Seeya S Kudtarker
RE: Liferay aui tabs Tag
March 22, 2013 9:05 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

Hitoshi,
Thanks for sharing this piece of your information and experience here.
I am a complete novice as far as liferay is concerned and am using it for my live project.

I haven't used jQuery but I have gone through some code. I will try it as an exercise and implement it. Any good tutorial link for jQuery for beginners that you know?

Will let you know the results in this thread.

Regards

Seeya
Hitoshi Ozawa
RE: Liferay aui tabs Tag
March 22, 2013 10:12 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

If you don't know jQuery have already starting to learn Alloy UI, try using the widgets. See if it meets your needs. Alloy UI pages look good now but you really can't cut and paste codes there into your portlet and make it work because the demo codes are written for standalone execution rather than for portlets. I'm sure they're working very hard but I'm really not sure what they are trying to do - are they trying to make portlet GUI easier to create or trying to create a general purpose widget to be used in web pages.

Nevertheless, it's probably better to learn one thing at a time rather than trying many different things at once.

That said, there's some nice books on jQuery at Amazon.com. It's very popular in Japan too and there are many Japanese books introducing third-party add-ons.
http://www.amazon.com/s/ref=nb_sb_noss_1/185-0681428-4088732?url=search-alias%3Daps&field-keywords=jquery

As for online tutorial, I often like the w3school to get started.
http://www.w3schools.com/jquery/

Information of using it in liferay:
http://www.liferay.com/ja/web/jonas.yuan/blog/-/blogs/applying-jquery-1-5-and-ui-1-8-9-in-liferay-6-1

FYI, jQuery is the standard js tool for Liferay 5.x. I think there's many information on using it in a portlet because of this. They switched to Alloy UI starting with Liferay 6.

There's also Vaadin which is already supported by Liferay IDE.. That's very good except they still have some I18N/L10N problems which is limiting its use in Japan.
Seeya S Kudtarker
RE: Liferay aui tabs Tag
March 22, 2013 10:31 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

Hitoshi,
Thanks for the links. I am using Liferay6.1

I may sound ignorant but I really do not know the meaning of I18N/L10N emoticon
Just fresh our from college.

I will just try a simple exercise in jQuery and if it suits the needs will go forward with it. Else will stick with AlloyUI.

Will let you know my progress or any difficulty I face here in this thread.

And thanks for the prompt replies.

Regards


Seeya
Hitoshi Ozawa
RE: Liferay aui tabs Tag
March 22, 2013 11:30 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

I really do not know the meaning of I18N/L10N


Internationalization/ Localization

Example:
Extracting message text to a property file is an example of internationalization

Creating a plugin to interact with a groupware system which is locally popular in a country is an example of localization.

Software actually doesn't have to be internationalized to be saleable in a certain culture but it has to be localized. All successful IT overseas software companies such as MS and Salesforce.com invested enormously localizing their software and service before marketing it to the local market.
Seeya S Kudtarker
RE: Liferay aui tabs Tag
March 22, 2013 11:29 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

Thanks Hitoshi!!

I guess I am learning a lot here in addition to Liferay. emoticon

Thanks for sharing your knowledge!!
Regards

Seeya
Seeya S Kudtarker
RE: Liferay aui tabs Tag
March 24, 2013 10:18 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

Hitoshi Ozawa,

Thanks for advising me about jQuery. It is pretty easy to learn and fun to work with (I mean this was my experience with jQuery over the weekend) I just went through what I I needed and got the solution. The tabs I used look pretty cool too..

Here is the pic I uploaded which I would like to share with you. Its very simple one but thought of sharing. Might help others too..

Regards

Seeya
Attachment

Attachments: sample.png (66.5k)