File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes problem in getting values using EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "problem in getting values using EL" Watch "problem in getting values using EL" New topic
Author

problem in getting values using EL

madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
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...
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
any help regarding my post
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

PatienceIsAVirtue -- 45 minutes is not long enough to wait for something to answer your question.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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
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..

Auto-Renewal : (checkbox)Type(textbox) (checkbox)Time(textbox) (checkbox)Migr_Status(textbox) (checkbox)No(textbox)

the above is my form...

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
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
problem in getting values for 'YES:TYPE' and 'NO:TYPE'....any help regarding my post....
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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
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


2)modify.js


3)modify.java


4)autoRenew.java


help me out regarding this issue.....

thanks,
madhu.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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
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...

thanks,
madhu.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
any help regarding my post
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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
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...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in getting values using EL
 
Similar Threads
problem in getting already existing values
how to disable if one or more check boxes selected
toggle checkbox group when the max limit is reached
save checked value in checkbox to database
problem in output format