• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I set variable in backing bean directly from jspx page?

 
Tomas Pytlik
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have DataTable and PanelGrid in all cells of this table. When I click, PanelGrid change his color and that way i highlight one cell of my table.

Example follows:



Now to my problem: I need save value of strColor into item.days[1].color when i click. Can anyone help me?


Thanks,
Tomas Pytlik
[ September 26, 2008: Message edited by: Tomas Pytlik ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marshall, please check your private messages.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pass it as a hidden input value to the server side. You can use h:inputHidden and some piece of JS for this.
 
Tomas Pytlik
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank for your post, but i'm newbie, can you be more specific please?
 
Tomas Pytlik
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You obviously can't
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tomas Pytlik:
You obviously can't


Tomas, have you tried the suggestion? What part are you stuck on?
 
Tomas Pytlik
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was traying to wrote InputHidden, but I'm not sure how. Paul said, pass IT as a hiden input, but what IT is exactly?

I understand, that InputHidden is good for storing value. But how it help in my case?

I know, I'm foolish and I'm sorry I need big kick before my light turns on.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Bauke was suggesting that you store the the value of strColor into a h:inputHidden field and then pull it out.
 
Tomas Pytlik
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works! Thank you, everybody!
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done! Always nice to see people solving their problems
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!