Form bean

Discussion in 'Software' started by chitra_banu, Apr 7, 2010.

  1. chitra_banu

    chitra_banu

    Joined:
    Mar 26, 2009
    Messages:
    9
    i have a jsp page
    it checks for emptiness for list say "tlist". the list holds java bean class property value say "employee.java"
    if it is not empty jsp displays the property.


    empname empid emprole ChangeRole
    sss 1 Designer ChangeRole
    Assistant

    mmm 2 Desinger ChangeRole
    Assistant

    On click of the ChangeRole button the select tag value from the emprole has to pass to the action class with the empid to store the emp details

    if the table has single row the value i change is getting updated...

    If two or more rows there... it always updating the first row...

    Form bean property value for emprole and id is always null...

    please help me out..


    i am using
     
    chitra_banu, Apr 7, 2010
    #1
    1. Advertising

  2. chitra_banu

    pandiaraj_4u

    Joined:
    Mar 30, 2010
    Messages:
    3
    Location:
    Chennai
    hi,
    i think ur looping process for updation is in mistake...
    if u dont mine plz post ur updation method here....


    i will try to help....
    Pandian....
     
    pandiaraj_4u, Apr 7, 2010
    #2
    1. Advertising

  3. chitra_banu

    chitra_banu

    Joined:
    Mar 26, 2009
    Messages:
    9
    <logic:notEmpty scope="request" name="TcaseList">
    <display:table name="requestScope.TcaseList" class="blackb" requestURI=" " id="TcaseList" pagesize="24" excludedParams="true">

    <%
    TmTcase tmtcase=(TmTcase)pageContext.getAttribute("TcaseList");

    request.setAttribute("ICSID", tmtcase.getICSID());
    request.setAttribute("JBPT", tmtcase.getJBPT());

    request.setAttribute("caseDesc", tmtcase.getCSDSC());
    request.setAttribute("caseId", tmtcase.getCSID());



    tmtcase.setICSID(tmtcase.getICSID());
    tmtcase = S3.loadTcaseDetails(tmtcase);
    request.setAttribute("SICSID", tmtcase.getCSID());
    %>

    <display:column title="Requirement ID" property="REQID" sortable="true"/>
    <display:column title="Scenario ID" property="SCNID" sortable="true"/>
    <display:column title="Case ID" property="CSID" sortable="true"/>
    <display:column title="Description" property="CSDSC"/>




    <display:column title="Status" property="CSSTS"></display:column>
    <display:column title="ChangeStatus">
    <c:if test="${UserDetails.USRTYP=='DEVELOPER'}">
    <select name="STAT" id="Row<%=i%>">
    <option value="NOT VERIFIED">NOT VERIFIED</option>
    <option value="VERIFIED">VERIFIED</option>
    </select>
    </c:if>
    <c:if test="${UserDetails.USRTYP=='USER'}">
    <select name="STAT" id="Row<%=i%>">
    <option value="APPROVED">APPROVED</option>
    <option value="REJECTED">REJECTED</option>
    </select>
    </c:if>
    </display:column>

    <display:column>
    <html:submit property="method" onclick="javascript:return confirm('Press OK to Schedule this Release.')" value="ChangeStatus"/>
    <input type="hidden" name="ICSID" value="<%=tmtcase.getICSID()%>"/>
    </display:column>





    =========================================================

    in on submitting changestatus button i want change the status like Approved when i change the select tag value it has to refresh the page and get updated..

    please check is anyway to do this....
     
    chitra_banu, Apr 7, 2010
    #3
  4. chitra_banu

    pandiaraj_4u

    Joined:
    Mar 30, 2010
    Messages:
    3
    Location:
    Chennai
    i think that u cannot check that page get post back or not...
    u just check page postback property and make update ....

    eg:
    <script>
    var isPostback = ${pageContext.request.method == 'POST'};
    </script>

    or refer the following

    htt://ww.servletsuite.com/servlets/postback.htm.....
     
    pandiaraj_4u, Apr 7, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jethro Bodeen

    Jelly bean Product key changer for xp

    Jethro Bodeen, Jul 13, 2005, in forum: Computer Support
    Replies:
    47
    Views:
    26,852
  2. Waterperson77

    Mr. Bean Complete Bean NOT complete!!

    Waterperson77, Dec 9, 2003, in forum: DVD Video
    Replies:
    5
    Views:
    1,707
    Mark Aldridge
    Dec 10, 2003
  3. Dan P.

    Mr Bean the Whole Bean on PAL?

    Dan P., Mar 5, 2005, in forum: DVD Video
    Replies:
    0
    Views:
    413
    Dan P.
    Mar 5, 2005
  4. chintan
    Replies:
    0
    Views:
    1,782
    chintan
    Dec 19, 2007
  5. chitra_banu

    Problem in Form-Bean Struts

    chitra_banu, May 29, 2009, in forum: Software
    Replies:
    1
    Views:
    1,183
    chitra_banu
    Jun 2, 2009
Loading...

Share This Page