Navigation problem with liferay
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Navigation problem with liferay  XML
Forum Index -> Portals & Portlets
Author Message
kezern

Joined: 24/09/2007 00:00:00
Messages: 36
Offline


I have been developing an stand alone application and now I want to convert it to a portlet in order to deploy inside liferay.
There are some navigation rules which don't work and in the stand alone application worked fine.
I have a datatable with a row selector.
Code:
			                    <ice:column>
 			                    <ice:rowSelector id="selected"
                                      multiple="false"
                                      selectionListener="#{inventoryList.rowSelectionListener}"
                                      partialSubmit="true" selectionAction="#{inventoryList.selectionAction}"/>
 			                    
 			                        <f:facet name="header">
 			                        	
 			                            <ice:outputText value="Id"/>
 			                            
 			                        </f:facet>
 			                        <ice:outputText value="#{item.id}"/>
 			                    </ice:column>

The selectionAction method in the bean is
Code:
public String selectionAction()
     {
     	return "view";
     }

And the navigation rule
Code:
  <navigation-rule> 
   	<description>from search to manage</description>	  	
  	<from-view-id>/jsp/busqueda/view.jspx</from-view-id>
  	<navigation-case>
  		<from-outcome>view</from-outcome>
  		<to-view-id>/jsp/gestion/view.iface</to-view-id> 	
  		<redirect/>
 	</navigation-case>
   </navigation-rule>
 

Now when I make click on the row nothing hapends. I can see how the rowSelectionListener and the selectionAction are fired but the page does not change.
Can anybody help me?
Thanks
deryk.sinotte


Joined: 26/10/2004 00:00:00
Messages: 958
Offline


The code for the entire page is missing so I can't tell if the <ice:portlet> component has been added or not. Can you post the code for the entire page(s) involved in the navigation?

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
kezern

Joined: 24/09/2007 00:00:00
Messages: 36
Offline


Hi deryk.sinotte,
I can't paste the code now because I'm not in the office, I'll paste it as soon as possible. I have the <ice:portlet> component.
kezern

Joined: 24/09/2007 00:00:00
Messages: 36
Offline


Hi deryk.sinotte,
Here is the view.jspx where I have the datatable.
Thanks for your help
 Filename view.jspx [Disk] Download
 Description Navigation page
 Filesize 11 Kbytes
 Downloaded:  74 time(s)

h_aptioglu

Joined: 23/06/2007 00:00:00
Messages: 45
Offline


RowSelection doesnt navigate thats why you got problem.
you can navigate by
Code:
public void taskRowSelection(RowSelectorEvent e) {
 		
 		FacesContext.getCurrentInstance().getApplication()
 				.getNavigationHandler().handleNavigation(
 						FacesContext.getCurrentInstance(), null, "pageToGo");
 
 	}

hope help you
kezern

Joined: 24/09/2007 00:00:00
Messages: 36
Offline


Hi h_aptioglu, do you mean I have to include that code in the <ice:rowSelector> component listener? In which one? In selectionListener or selectionAction?
Thanks
h_aptioglu

Joined: 23/06/2007 00:00:00
Messages: 45
Offline


kezern wrote:
Hi h_aptioglu, do you mean I have to include that code in the <ice:rowSelector> component listener? In which one? In selectionListener or selectionAction?
Thanks 

i use it for selectionListener
Code:
 <ice:rowSelector id="selected" value="#{bTaskList.selected}"
 							multiple="false"
 							selectionListener="#{taskListController.taskRowSelection}" />
 
 
 
 public void taskRowSelection(RowSelectorEvent e) {
 		
 		FacesContext.getCurrentInstance().getApplication()
 				.getNavigationHandler().handleNavigation(
 						FacesContext.getCurrentInstance(), null, "goToPage");
 
 	}
kezern

Joined: 24/09/2007 00:00:00
Messages: 36
Offline


It doesn't work. I have included the code in my listener and changed the goToPage to the name of the tag in the navigation rule
h_aptioglu

Joined: 23/06/2007 00:00:00
Messages: 45
Offline


kezern wrote:
It doesn't work. I have included the code in my listener and changed the goToPage to the name of the tag in the navigation rule 


that code works icefaces 1.7.0 and liferay 4.3.4 (i am useing too)

can you post errors
kezern

Joined: 24/09/2007 00:00:00
Messages: 36
Offline


I'm using icefaces 1.7.0 and liferay 4.3.3
deryk.sinotte


Joined: 26/10/2004 00:00:00
Messages: 958
Offline


I had an old navigation example portlet for Liferay that used a few different techniques for jumping from page to page. I added a datatable with a row selector and used the method suggested by kezern to perform the navigation. Works for me as well. I've attached the entire sample (with source but without WEB-INF/libs) to this post.
 Filename nav.zip [Disk] Download
 Description Sample of navigation techniques using ICEfaces in portlets.
 Filesize 22 Kbytes
 Downloaded:  82 time(s)


Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
petar_b


Joined: 05/06/2008 00:00:00
Messages: 74
Offline


I haven't followed this thread in detail. I will add how I did navigation from backing bean in liferay.

URL that Liferay understands to jump to sompe page is following:

http://localhost:8080/c/portal/layout?p_l_id=22903?abc=abcc

where p_l_id is value that you have to calculate in several steps.

What I like about this approach is that it preserves my additional parameters to destination page (abc=abc) and it does login (if needed) by the way.

To get p_i_id proces should look like:

long groupId=GroupLocalServiceUtil.getUserGroup(_comId, _userId).getGroupId();
List<Layout> ls=LayoutLocalServiceUtil.getLayouts(groupId, false);
Layout lo=findTabByName(ls,"Home");

This will make you jump on user's private/public page(tab) of given name, or however you implement findTabByName (that one is for you to develop)..

I am sorry if this is wrong answer, as I said, wasn't loking into your attachment. BTW, this is certainly not portable to anything else but liferay !
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team