on 11-27-2007 2:51 AM
Hi all:
I have one small jsp application, using htmlb.
I would like to get the htmlb inputfield value in jsp, how can I fetch it ?
Thanks a lot.
Hi sir
I have tried to use request.getParameter with id, but failed.
the id will change in html source code of my htmlb-jsp page
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jianhong,
please try following code:
...
import com.sapportals.htmlb.rendering.PageContextFactory
...
IPageContext context = PageContextFactory.createPageContext(request, response);
String my_value = ((InputField) context.getComponentForId("Your component ID as you enter it in id attribute of a field")).getValue().toString()
... and so on
hope it helps.
regards.
mz
Thanks a lot.
is there some examples about how can i call context, use table model in htmlb ?
I wish there is some examples like webdynpro for java
Really thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jianhong,
please refer to the following link https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/112df959-0d01-0010-b198-f93b0... [original link is broken] [original link is broken], which contains three business packages for Enterprise Portal with a lot of tutorials and examples related to HTMLB and Portal Content Development.
regards,
mz
hi
sir. I mean
After I define one htmlb tag - form, and one inputfield
after I click on submit button, how can I fetch the value inside that inputfield
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Once you submit the form, you can retrieve the value of InputField as:
String name = request.getParameter("in_name");
where in_name is the name/id which you have given to your InputField.
Morever, you can set the your bean value as the text entered in the InputField, and later retrieve the value from the bean.
Regards,
Prashil
Hi
I hope ur application has Java file, Bean file and JSP file. Bean file is used to set and get values for ur variables.
> Set the value for ur Inputfield in Bean using setter method.
> Create a object for ur bean class and fetch the vallue.
For example
<hbj:inputField id="name" type="string" value="<b><%=myBean.getName()%></b>"/>
Here, myBean is the object for the bean file.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.