2013年12月10日星期二

value jsp textbox modified spread ArrayList

You reach people :

I have a few text boxes JSP page displays the value, I would like to modify the value of a text box to change the value of a will after the spread Arraylist, how to achieve it ? Not the best Ajax, that is too complex , ah, do not understand .
------ Solution ---------------------------------------- ----
jsp page :










java class :
String text1 = requesst.getParameter ("text1");
String text2 = requesst.getParameter ("text2");
String text3 = requesst.getParameter ("text3");
List list = new ArrayList ();
list.add (text1);
list.add (text2);
list.add (text3);
------ For reference only --------------------------- ------------
way you can use the form submitted into the list in the background .


------ For reference only ---------------------------------- -----
with ajax be simple , but is asynchronous , taking the value passed to the background ,
------ For reference only ------------ ---------------------------
using struts2 it? If so , action is
List list;
jsp as


can get list form submission it
------ For reference only -------------------------- -------------
with ajax is the simplest and easiest to implement . You do not want to use ajax, then you do not have the same direct submission .
------ For reference only -------------------------------------- -
ajax quite simple , small landlord to find a simple example , let it run up , put your function can be achieved . ajax validation small example
------ For reference only ---------------------------------------
is a normal form submission can be, jsp defined name.
------ For reference only -------------------------------------- -
Thank you heroes reply !
I use jsp + servlet + javabean way to do that. Now realize the function is based on the query input display relevant information on the page , the value of modifying "Good QTY" changes in values ​​will spread Arraylist. Because the query message is associated by means of multi-table has been no physical form, and therefore do not know how UPdate, Here is what I wrote sql, but the error :
UPDATE (
SELECT / * + BYPASS_UJVC * / trim (d.key_no) key_no, b.sp_katamei, b.kura_kjn, a.katamei, a.suryo, substr (a . taping_kbn, 2) taping_kbn, a.gensankoku, a.suffix_katamei, a.label_ptn, a.naiso_maisu, a.daihyo_maisu, b.sbt_lvl, d.ssn_skkr_su, trim (e.dtcd) dtcd,
CASE
WHEN b.sbt_lvl = '1 'THEN' Pb '
WHEN b.sbt_lvl = '2 'THEN' FTPb '
WHEN b.sbt_lvl = '3 'THEN' R-Pb '
WHEN b.sbt_lvl = '4 'THEN' NoPb '
WHEN b.sbt_lvl = 'A' THEN ''
WHEN b.sbt_lvl = 'B' THEN ''
WHEN b.sbt_lvl = '' THEN ''
END sbt_desc
FROM ott0470 @ alpstest a, ott0070 @ alpstest b, ott0130 @ alpstest c, ost0090 @ alpstest d, ost0100 @ alpstest e
WHERE (b.sp_katamei | | b.kura_kjn) = a.katamei
AND a.katamei = (c.katamei_body | | c.katamei_kurakjn)
AND (c.katamei_body | | c.katamei_kurakjn) = (d.katamei_body | | d.katamei_kuraki)
AND (d.katamei_body | | d.katamei_kuraki) = e.katamei
AND d.skkr_kotei_flow_rnbn = e.kotei_flow_rnbn
AND d.key_no = e.key_no
AND (c.ksbr_cd LIKE '7% 'OR c.ksbr_cd LIKE' J% ')
) LabelData SET LabelData.ssn_skkr_su = 1000
WHERE (LabelData.key_no = 'XYL388100K' or LabelData.key_no ='' or LabelData.key_no ='' or LabelData.key_no = ;'' or LabelData.key_no ='' or LabelData.key_no ='')
Also please advise
------ For reference only ------------------------------ ---------
feeling jquery package Ajax, that would avoid a lot of knock code. . You can solve your problem.

没有评论:

发表评论