Re: [xwiki-users] Parsing textbox data
It's perfect ! Thank you, Vito. Vitantonio Messa wrote: > > hi, > > I think this should work: > #set($j = $request.formval) > > Vito > > > > V. Harikrishnan Nair wrote: >> Hello again ! >> >> I want to take a string entered into a textbox and place it into a >> MySQL >> db (which is not XWiki's RDB). For that I created a simple form shown >> below >> - >> >> >> >> >> >> >> This is the velocity page (named VelocityTest2) which is supposed to >> parse >> the string entered into the text box - >> >> #set($groovyObject = $xwiki.parseGroovyFromPage("Amrita >> IIS.GroovyTest4")) >> #set($j = $Request.getParameterValues('formval')) >> $groovyObject.SQL_conn($j) >> >> >> A Groovy page (named GroovyTest4) takes that string and enters it into >> the >> MySQL db with the SQL_conn() function and I'm positive that my groovy >> code >> works. >> >> My problem is that the string is not being parsed from the textbox into >> the >> Velocity page. I am getting a null value instead. >> >> Thanks, >> Harikrishnan > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > > -- View this message in context: http://www.nabble.com/Parsing-textbox-data-tf4724953.html#a13523140 Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Parsing textbox data
Check that you're using correct case as well. Also, you will need to be careful with quote marks, as these need to be escaped by putting two together before sending into a sql query - so for example, O'Hara Airport should read O''Hara Airport when added to a sql statement. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vitantonio Messa Sent: 31 October 2007 13:17 To: XWiki Users Subject: Re: [xwiki-users] Parsing textbox data hi, I think this should work: #set($j = $request.formval) Vito V. Harikrishnan Nair wrote: > Hello again ! > > I want to take a string entered into a textbox and place it into a > MySQL db (which is not XWiki's RDB). For that I created a simple form > shown below > - > > > > > > This is the velocity page (named VelocityTest2) which is supposed to > parse the string entered into the text box - > > #set($groovyObject = $xwiki.parseGroovyFromPage("Amrita > IIS.GroovyTest4")) #set($j = $Request.getParameterValues('formval')) > $groovyObject.SQL_conn($j) > > > A Groovy page (named GroovyTest4) takes that string and enters it into > the MySQL db with the SQL_conn() function and I'm positive that my > groovy code works. > > My problem is that the string is not being parsed from the textbox > into the Velocity page. I am getting a null value instead. > > Thanks, > Harikrishnan ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Parsing textbox data
hi, I think this should work: #set($j = $request.formval) Vito V. Harikrishnan Nair wrote: > Hello again ! > > I want to take a string entered into a textbox and place it into a MySQL > db (which is not XWiki's RDB). For that I created a simple form shown below > - > > > > > > > This is the velocity page (named VelocityTest2) which is supposed to parse > the string entered into the text box - > > #set($groovyObject = $xwiki.parseGroovyFromPage("Amrita IIS.GroovyTest4")) > #set($j = $Request.getParameterValues('formval')) > $groovyObject.SQL_conn($j) > > > A Groovy page (named GroovyTest4) takes that string and enters it into the > MySQL db with the SQL_conn() function and I'm positive that my groovy code > works. > > My problem is that the string is not being parsed from the textbox into the > Velocity page. I am getting a null value instead. > > Thanks, > Harikrishnan ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users