AnsweredAssumed Answered

How to get Current Bean Instance in a JSP

Question asked by alihammad on Nov 17, 2009
Latest reply on Nov 18, 2009 by jayjayecl
Ok I am sitting in a JSP and I want to get the reference(instance) of the current bean in a scriplet. Similar thing is already working in a repo.tld tag. Look at the following line of code

<r:propertySheetGrid id="document-props" value="#{DialogManager.bean.document}" 
var="documentProps" columns="1" mode="view" labelStyleClass="propertiesLabel" externalConfig="true" />

"r" is the prefix of "repo.tld" .

In above code DialogManager.bean returns the current instance of the bean.

Now I want the same thing in a scriptlet, but the problem is that how would I get the current bean reference?
I wanna do something like this

<%
DialogManager dm = get the current bean reference …

DocumentDetailsDialog ddd = (DocumentDetailsDialog)dm.getBean();
%>

Please help as I am stuck at this thing …

Outcomes