on 04-26-2007 5:23 PM
Hello,
I have a bunch of htmlb components build in java code. I need the id of the components. I want to clearify that I need the id of the components not the value of the components. I know I can get the component id, if the component is created in jsp, as follows
<hbj:inputField
id="autoSave"
visible="false"
jsObjectNeeded="true"
value="FALSE">
<%
String jsAutoSave = myContext.getParamIdForComponent(autoSave);
%>
<SCRIPT>
var jsAutoSave = '<%=jsAutoSave%>';
</SCRIPT>
</hbj:inputField>
but, when the component is created in java code, I can't use the same logic to get to the component id.
If any one could help me, I really appreciate it.
Frank
I finally found my answer.
In java code when creating the component use the getParamIdForComponent(Object o) as follows.
TextEdit heCs = new TextEdit("colorSpecifications");
String temp = p.getParamIdForComponent(heCs));
p is object of IPageContext. I pass it to the method that is building the components.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kalyan,
Thanks for your reply.
Maybe I should give a little more information. The doProcessBeforeOutput() method sets the JSP to be forwarded. In the JSP, components are build by calling a method of an other class that builds the components. And I need the ids of some of the components in the JSP. Component ids are generated dynamically, so I as far as I am concerned, I can only access them in JSP, my question how in my situation?
If the component were build in JSP, I could have gotten the ids, like I showed above.
Regards,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frank
In your java code get the reference of the component and see wether the methods are present like getId() .So that you can get the ID of the component.
These links may help ful for you
/thread/62185 [original link is broken]
and
http://help.sap.com/saphelp_nw2004s/helpdata/en/44/471ce3617b14bce10000000a155369/frameset.htm
regards
kalyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.