07-16-2010 07:07 AM
// we almost always need this bean reference
FacesContext fc = FacesHelper.getFacesContext(req, res, getServletContext());
BrowseBean browseBean = (BrowseBean)FacesHelper.getManagedBean(fc, "BrowseBean");
outcome=OUTCOME_BROWSE;
//Create UIComponent, and the event
UISimpleSearch search = new UISimpleSearch();
search.setId("search");
//test searching the word "index"
SearchEvent sevent= new SearchEvent(search,"index",0);
search.broadcast(sevent);
// own method to set the searchContext to the event
browseBean.setSearchContext(sevent);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, outcome);
// perform the forward to the page processed by the Faces servlet
String viewId = fc.getViewRoot().getViewId();
getServletContext().getRequestDispatcher(FACES_SERVLET + viewId).forward(req, res);
07-16-2010 10:40 AM
Now the problem is that this only works if the user login in alfresco and then put the URL in the browserthis is normal alfresco does not allow to access if you are not logged in first.
07-19-2010 03:30 AM
07-19-2010 04:52 AM
browseBean.updateUILocation(nodeRef);
it finally works!Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.