Learning and Learning!-- Java all the way!
Learning and Learning!-- Java all the way!
Bear Bibeault wrote: ....
If you want to retain the value, you actually need to restore the selection by placing the selected attribute on the appropriate option element.
Time is what we want the most, but what we use the worst. -- William Penn
Robin John wrote:
Note- you could have put the 'select' attribute in there.. but since you are iterating over the list, your code will put the selected attribute at all the option tags.. so one way I can think off is to put the selected attribute after you render the page in javascript.
Learning and Learning!-- Java all the way!
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Vic Hood wrote:
....
wouldnt the drop down be set to the one corresponding to value='3'? always?
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Bear Bibeault wrote:One: scriptlets? why not the EL?
Bear Bibeault wrote:
Two: if it's script that's failing, looking at the JSP source is not helpful. What does this turn onto on the client?
Learning and Learning!-- Java all the way!
Vic Hood wrote: I wasnt sure if EL would work in this case
Bear Bibeault wrote:Im guessing you are asking how does the HTML source of the rendered page look like ?
not shown in the source at all,
Learning and Learning!-- Java all the way!
Vic Hood wrote:
when I clicked on one of the values in the drop down , the page submitted and reloaded but the script (above) was missing in the new page().also , the table structure that displays in the page is non exsistent in the jsp page . I have no clue how this is occuring . Any ideas on where im fumbling?
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Vic Hood wrote:
However, when i do try running the program , and change the dropdown , the value is not being passed . The page always sets the "${domain.domainTypeOid}"; to 0, why is this?
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Vic Hood wrote: RequestDispatcher rd = request.getRequestDispatcher("POC.jsp?Dtype="+domainType_Oid);
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Vic Hood wrote: <FORM METHOD="POST" ACTION="DAO" NAME="crudForm" action="Main.jsp" ID="Main"><INPUT
TYPE="HIDDEN" NAME="selectedval" ID="selectedval"><!-- Hidden variable to store selected domaintype -->
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
Time is what we want the most, but what we use the worst. -- William Penn
Learning and Learning!-- Java all the way!
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|