Can someone help me with passing an expression like "123-456" to a hashmap key in my dataTable where 123 is userID and 456 is accountID. In my dataTable i have t:columns tag which generates checkboxes for each row in the dynamic column .The value of checkbox must be identified by a combination of userID and accountID. So i want to set value of checkbox something like this'userID-account.ID' .
But it never returns the right value since userID is taken as string instead i want the value of userID to be passed in that expression. Someone please help...iam struck with this issue from so long.Here is the code.
In this selectedUserIds iam intentionally setting up key something like "userID-accountID" so that i can split the userID and accountID for later user
somebody please to my email. If you need further information iam very happy to provide any time. Also let me know if there is another way to get this job done..
I'm having the exact same problem, and am stuck into it, probably if you can please assist me with the way
you solved your problem, or any way you managed achieving that.
Hope some one else, might have an answer also.
Actually, I don't really recommend coding up that much complexity in EL because you end up spending a lot of time on puzzles like this and you risk putting what should be Model logic into the View and violating MVC. But when you quoted your variable names, you turned them into a string literal, as you saw. What you really want is a string concatenation with 2 variables joined to a literal.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jan 18, 2008
thanks Tim for the reply, but that wouldn't work, it's throwing NumberFormatException '-' !!??
any idea why ?
Unfortunately, I'm in the middle of something complicated, so the only suggestions I can give are to either move the computations off the page and into a backing bean or to read up on the EL documentation. My recommendation is to try and get the computations off-page, as it's usually easier.
subject: Issue with passing expression to a hashmap key in a dataTable column