This is the comment in viewHandler.createView(): // as of JSF spec page 7-16: // "It is the callers responsibility to ensure that setViewId() is called // on the returned view, passing the same viewId value." // so we do not set the viewId here
// ok, but the RI does so, so let's do it, too. So we do call the viewRoot.setViewId(); in createView, but then call it afterwards as well. Which really doesn't make any sense! I'll get rid of the offending statement - Adam, can you check back if there is something unclear in the spec? regards, Martin On 12/22/05, Adam Winer <[EMAIL PROTECTED]> wrote: > This is very strange code, IMO. ViewHandler.createView() should > return a UIViewRoot with the viewId already set; that last statement > (viewRoot.setViewId(newViewId)) should be a no-op. > > -- Adam > > On 12/22/05, Mario Ivankovits <[EMAIL PROTECTED]> wrote: > > Hi! > > > > In NavigationHandlerImpl around line 145 there is the following code > > > > ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); > > //create new view > > String newViewId = navigationCase.getToViewId(); > > UIViewRoot viewRoot = viewHandler.createView(facesContext, newViewId); > > viewRoot.setViewId(newViewId); > > > > now I have a problem with the last statement. > > My viewHandler create a view with a slightly different viewId. The > > setViewId(newViewId) cause the browser to view a "requested resource not > > available" message. > > > > If I cange this to: > > > > viewRoot.setViewId(viewRoot.getViewId()); > > > > it works like a charme. > > If I create a patch, is it possible to have it applied - or is it needed > > to be RI compliant? > > > > If so, I can handle my use case by overloading the NavigationHandler, > > but then I'll really appreciate if we can make > > calcMatchingNavigationCase protected instead of private. Then I can > > decorate the NavigationCase. > > > > > > Ciao, > > Mario > > > > > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
