hi,
in my application...i m facing problem with 'modify.jsp' page....i m using EL for getting the existing values.....im 'modify.jsp' page im getting values...the problem arises at 'Type' and 'No' check boxes...the problem is i used checkboxes and textboxes...here is my 'modify.jsp' code
modify.jsp
in my file...if 'TIME' values exists means it is showing correctly that means 'check box for TIME is selected and in text box the value is showing' same for 'MIGR_STATUS'
the problem im facing problem at 'YES:TYPE' checkbox and 'NO:TYPE'....checkboxes...if 'YES:TYPE' value already presents..it is not showing anything...can any one suggest me how to do...
I'm not sure what the problem is (and wow, I'd really set some temporary variables). Could you describe it again, or produce a simplified test case that reproduces the problem?
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
in my form....if for 'Type' checkbox...it is not showing values...it is getting disabled..eventhough it is having values ....the same problem im getting for 'No' checkbox also..
if i open 'modify.jsp' page...im getting the already existing values in the (checkbox)Time(textbox)(checkbox)Migr_Status(textbox) that means for example......
1) the checkbox is selected for 'Time' and corresponding value for 'Time' is displaying....same for 'Migr_Status'
2) im not getting for 'Type' and 'No'...
here is my bean program....
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
hi,
i tried it is printing correctly in console but not in the form...can anyone suggest me where the code gets wrong...
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
problem in getting values for 'YES:TYPE' and 'NO:TYPE'....any help regarding my post....
I'd make sure the values you think are in the bean are actually what's in the bean.
S2 will first create the bean then call the setters for individual properties (via OGNL). You're setting bean properties in a parameterized constructor: have you checked to see if the code is doing what you think it is?
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
hi David,
i checked each and every line...its working fine for check boxes 'TIME' and 'MIGR_STATUS' with their corresponding text boxes values....i m unable to get the values for 'YES:TYPE' and 'NO:TYPE'....can you once check my code...here im providing.....
1) modify.jsp
I think you're missing my point. I don't think the boolean values are ever getting set on your bean; you're not giving a true/false or yes/no (or whatever else OGNL will accept; I don't recall) on form submission. That's why I'm asking you to check to see that the boolean values are what you think they are.
That JavaScript is essentially illegible, by the way--I'd consider refactoring. But it has nothing to do with the problem, as far as I can tell.
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
hi,
i tried the following bean code...its working if i had given only 'YES' and 'NO'..but if im giving 'YES:TYPE' and 'NO:TYPE' it is not get selected in my modify page...can any one help me out..im unable to get out my problem...
and my modify.jsp is as follows
any help...where to get changed..inorder to get selected in modify page...
David Newton wrote:I think you're missing my point. I don't think the boolean values are ever getting set on your bean; you're not giving a true/false or yes/no (or whatever else OGNL will accept; I don't recall) on form submission. That's why I'm asking you to check to see that the boolean values are what you think they are.
What more help do you want? I told you the problem, you verified it by saying that with just "yes" or "no" it works. I don't know *why* you need the extra stuff in the checkbox value, but if you truly do, you'll have to do your own type conversion.
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
hi David,
in my form...for 'yes' and 'no' it should enter the value in textbox...im not getting it...if i provide..without textbox it is working..but i need with textbox....or suggest me what to do...
Here's another tip: making your posts harder to read than they need to be is not a good way to try and get help. In English, sentences end with a period character followed by a space character. The first letter of the next sentences is capitalized. Using three periods and running your sentences together makes your posts much harder to read than they need to be, and less likely to get responses.