[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Dropdown box fetch values from JS.
From:       Rajesh <rajesh.ranganathan () cevalsoft ! com>
Date:       2010-11-23 6:49:16
Message-ID: 4CEB63BE.3060600 () cevalsoft ! com
[Download RAW message or body]

Hi All,
     Actually I have a requirement, which fetch the drop down values 
from JS and show it in jsp.
     I have to use ajax auto completer  to achieve this.
     Here the issue is, i can able to enter any value in the auto 
completer box and pass that value to database.

     My question - how can i  will not enter any value in the auto 
completer drop down? is this possible?.
     else please suggest me any other way to achieve this.

     Here is my code.

Js File

     [
     ["Hourly","Hourly"],
     ["Contract","Contract"],
     ["Permanent","Permanent"],
     ["Decide Later","Decide Later"]
]

In my JSP
<s:url var="rateOptionJSONList" value="/rateOptionJSONList.action"/>
<sx:autocompleter
                                     indicator="indicator1"
                                     href="%{rateOptionJSONList}"
                                     autoComplete="false"
                                     forceValidOption="true"
                                     value="Hourly"
                                     name="req.rateOption"/>


Here i dont want to enter any value.Just click on the drop down i will 
show the values which present in that JS file.
-- 
*Rajesh.R*
*Software Engineer*
Tel: 91-44-42115406
Email: rajesh.ranganathan@cevalsoft.com 
<mailto:rajesh.ranganathan@cevalsoft.com>
Site: http://www.cevalsoft.com

[Attachment #3 (multipart/related)]

[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hi All,<br>
    &nbsp;&nbsp;&nbsp; Actually I have a requirement, which fetch the drop down \
values  from JS and show it in jsp.<br>
    &nbsp;&nbsp;&nbsp; I have to use ajax auto completer&nbsp; to achieve this.<br>
    &nbsp;&nbsp;&nbsp; Here the issue is, i can able to enter any value in the auto
    completer box and pass that value to database.<br>
    &nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; My question - how can i&nbsp; will not enter any value in the \
auto  completer drop down? is this possible?.<br>
    &nbsp;&nbsp;&nbsp; else please suggest me any other way to achieve this.<br>
    <br>
    &nbsp;&nbsp;&nbsp; Here is my code.<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
    Js File <br>
    <br>
    &nbsp;&nbsp;&nbsp; [<br>
    &nbsp;&nbsp;&nbsp; ["Hourly","Hourly"],<br>
    &nbsp;&nbsp;&nbsp; ["Contract","Contract"],<br>
    &nbsp;&nbsp;&nbsp; ["Permanent","Permanent"],<br>
    &nbsp;&nbsp;&nbsp; ["Decide Later","Decide Later"]<br>
    ]<br>
    <br>
    In my JSP<br>
    &nbsp;&nbsp;&nbsp; &lt;s:url var="rateOptionJSONList"
    value="/rateOptionJSONList.action"/&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&lt;sx:autocompleter <br>  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; indicator="indicator1" <br>  &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
href="%{rateOptionJSONList}" <br>  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; autoComplete="false" <br>  \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; forceValidOption="true"<br>  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value="Hourly"<br>  \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; name="req.rateOption"/&gt;<br>  <br>
    <img src="cid:part1.02020303.03090707@cevalsoft.com" alt=""><br>
    Here i dont want to enter any value.Just click on the drop down i
    will show the values which present in that JS file.<br>
    <div class="moz-signature">-- <br>
      <font size="3"><b>Rajesh.R</b></font><br>
      <font size="3"><b>Software Engineer</b></font><br>
      <font size="1.5">Tel: 91-44-42115406</font><br>
      <font size="1.5">Email: <a
          href="mailto:rajesh.ranganathan@cevalsoft.com">rajesh.ranganathan@cevalsoft.com</a></font><br>
                
      <font size="1.5">Site: <a \
href="http://www.cevalsoft.com">http://www.cevalsoft.com</a></font>  </div>
  </body>
</html>


["moz-screenshot.png" (image/png)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic