URGENT Retrieving a parameter value in JSF-Portlets

Hi,

I wrote a JSF code in which I have a text-field (<h:inputText>) and I want to access the value entered in it in my portlet class which I wrote extending the MyFacesGenericPortlet. So how do I access it's value? Usually in Servlets we can do this by using the request.getParameter(). Below is my code in which I have the text-field (<h:inputText>). Now how do I access it?s value in my portlet class?

I tried the following but unable to retrieve it and it just returns null :

1)FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("ADM_USER_ID");

2)((PortletRequest)request).getParameter("ADM_USER_ID");

3)request.getParameter("ADM_USER_ID");

Below is the code:

--

<%@ page language="java" session="true" %>

<%@ page import = "javax.portlet.PortletSession" %>

<%@ page language="java" pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portlet" %>

<f:loadBundle basename="altair.adm.login.messages" var="msg"/>

<portlet:defineObjects/>

<portlet:actionURL var="loginAction">

<portlet:param name="command" value="doLogin" />

</portlet:actionURL>

<f:view>

<h:form>

<h:panelGrid columns="2">

<h:outputText value="#{msg.user_id_tag}" />

<h:inputText value="" required="true" id="ADM_USER_ID" />

<h:commandButton action="#{loginAction}"

value="#{msg.login_button_tag}" id="ADM_LOGIN_BUTTON"/>

</h:panelGrid>

</h:form>

</f:view>

Thanks,

Vijay

[1836 byte] By [vaalatia] at [2007-11-26 21:06:32]
# 1
You can use Bean for this purpose:Follow this:1) Write a bean with get and set properties for each field in form2) You can access value in inputText as follows: <inputTextvalue="#{Beanclassname.propertyname}">
Friend4evera at 2007-7-10 2:40:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...