on 05-30-2007 5:49 PM
Hi All,
I am trying to create a PAR file that has an AbstractPortalComponent and a JSP. Problem is how do I submit from a JSP (I am not using HTMLB) to my AbstractPortalComponent. I created an event, but I am not able to read the fields in the form in JSP in this event.
Any help will be greatly appreciated
Thanks,
Preet
I was able to resolve this issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can submit using js . So you can put this line end of your JSP.
<script language ="javascript">
document.forms[0].submit();
</script>
you can get the formfields using the following code inside docontent
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {
HttpServletRequest req = request.getServletRequest();
String value = req.getParameter("<formfieldname>");
...
}
if will submit everytime it will be on loop.So were you will have the control ,Since you are not using any HTMLB components
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks a lot to all of you for replying to my question. I did give points to all of you.
Here is my problem. I am able to display the JSP from abstract portal component class. I am not able to do a submit from the jsp. If any one can please tell me how to do that? Also how to read the form fields that are being passed from the JSP. I will really appreciate it. I am not using HTMLB. I amusing HTML.
Thanks to all
Preet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
putting variables in AbstractportalComponent
com.sapportals.portal.prt.resource.IResource jspResource = request.getResource("INDEXJSP", "jsp/abc.jsp");
request.getNode().putValue("VALUE",value);
response.include(request, jspResource);
In jsp you can read the variable
String value = (String)request.getNode().getValue("VALUE");
Regards
Ganesan S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Johar,
use this code in java class..
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
{
IResource jspResource = request.getResource("jsp", "jsp/InitLogon.jsp");
response.include(request, jspResource);
}
write ur code in jsp... for eg username and password validation..
<b>InitLogon.jsp</b>
<form name="logonForm" action="/irj/portal/" method="post">
<input name="login_submit" type="hidden" value="on">
<table>
<tr><td>Username</td>
<td><input type="text" name="j_user"></td>
</tr><tr>
<td>Password</td>
<td><input type="password" name="j_password"></td>
</tr>
<tr><td colspan=2 align=right>
<input class="button" type="submit" name="Logon" value="Logon"
onmouseover="this.style.backgroundColor='#33CCCC'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
</td></tr>
</table>
</form>
hope it may help u...
regards,
Chinnadurai.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.