dcsimg
multibox checkbox in Logic iterator
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dicha_manmoandas
Posted On:   Tuesday, April 4, 2006 07:47 AM

i have jsp form in which bean takes values from database..Know i have to add check box or multibox in side logic iterator.my code works but the problem is i am not able to catck the value inside the check box,if it is checked or not.. eg of code <%int a=0;%> <%-- property="checkId" /> --%> know in action form how can i get the values of multibox? public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { Locale locale = getLocale(request); MessageResources messages = getResources(request); HttpSession session = request.getSessi   More>>

i have jsp form in which bean takes values from database..Know i have to add check box or multibox in side logic iterator.my code works but the problem is i am not able to catck the value inside the check box,if it is checked or not..
eg of code
<%int a=0;%>




<%--
property="checkId" /> --%>






know in action form how can i get the values of multibox?
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest
request, HttpServletResponse response) throws Exception {
Locale locale = getLocale(request);
MessageResources messages = getResources(request);
HttpSession session = request.getSession();
Vector err = new Vector();
ActionErrors errors = new ActionErrors();
String action = request.getParameter("action");
PromoExtraTranfDlpAccaoForm g1 = (PromoExtraTranfDlpAccaoForm)form;
System.out.println("rregistoo"+g1.getRegistoCCB());
}


plz give me some tips to work with multibox..

   <<Less

Re: multibox checkbox in Logic iterator

Posted By:   Ramu_G  
Posted On:   Tuesday, April 4, 2006 12:20 PM

I think mutlibox or checkbox always returns a boolean value.
In my application I handled the similar situation by creating vector of objects(each object contains stringMultibox, registoCCB and bflag(boolean) properties) in my action class and set that vector to formbean.
In the reset method of formbean you must set the boolean(bflag) property to false.
so ur jsp looks like this:



You must write get/set method to ccbsVector in Form-bean.
In the action class get the vector and iterate through vector to get the selected checkboxes based on bflag.
About | Sitemap | Contact