On 11/7/06, Ramineni Viswanath <[EMAIL PROTECTED]> wrote:
Hi, Is there a better way to get the backing bean name (not the class name) other than by building it from getFacesContext().getViewRoot().getViewId()?
This is going to be the only robust mechanism, because an application can actually replace the algorithm that Shale normally uses, which is an implementation of ViewControllerMapper stored in application scope at key "org$apache$shale$view$VIEW_MAPPER". Your processing should do the following to get the name of the relevant managed bean: * Extract the view identifier, using the formula above. * Retrieve the ViewControllerMapper implementation at the attribute name above. * Call the mapViewId() method to determine the name of the corresponding managed bean (if any). Craig I have a
BasePage class from where I extend all my backing bean classes, there are times when I need this name, especially in cases where I cannot use Clay and I have to use dynamic method binding. --Vish ____________________________________________________________________________________ Sponsored Link Try Netflix today! With plans starting at only $5.99 a month what are you waiting for? http://www.netflix.com/Signup?mqso=80010030