on 02-17-2004 2:51 PM
Hi,
I'm facing a problem when trying to retrieve an HTML element id in my DynPage, for use in JavaScript.
I've tried to call getPageContext().getParamIdForComponent(component) method inside the "doProcessBeforeOutput()" method, but kept receiving the following Jave Runtime Excpetion message:
"Component ... not found in old form"
After inspecting the matter, I found out that the method returned the id of the HTML input in the old form, the one that had submitted itself and called this IView's instance.
Instead, I would like to receive the FUTURE id of the HTML input that is to be put in the form which is built in "doProcessBeforOutput()" method.
Any ideas?
I know that calling the method in JSP from the context DOES work.
How does it work in JAVA?
thanks in advance .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The following code to get the id might help.
<hbj:inputField
id="txtBillNo"
type="STRING"
maxlength="10"
value="Sample"
required="FALSE"
width="100"
design="STANDARD"
>
<%
strBillNo=myContext.getParamIdForComponent(txtBillNo);
%>
</hbj:inputField>
Declare a variable String strBillNo at the beginning of JSP page.
Vivek
Hi,
Here is what I use:
this.pageContext.getParamIdForComponent(myInputField);
Where "myInputField" is the object not the String of the ID, which is not working for me. This returns the JS object name in the HTML page.
If you need to get the form name use the following code:
this.pageContext.getCurrentFormId();
Regards,
Kai
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.