This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to change attribute of a component?

 
Dmitriy Kastikovich
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

For example, I want to disable entering date in calendar for user until he not selected it. Then he can edit.

I use to disable input. But then
I want to enable manual date editing.

I remember that I can use [''], but cant remeber it. And I dont wont to use server side for this.
As a solution i can create second calendar with enabled manual input and show it after date was setted....
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just let the attribute depend from a bean property or so?

 
Dmitriy Kastikovich
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bauke Scholtz wrote:Just let the attribute depend from a bean property or so?



I think, you didnt understand me - I dont want to use server side for changing attribute. And if I understand a dependency on bean will use server.
So the question was, how to change it on client side. Or it is not possible as the page has been already rendered with all components?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understood you perfectly. You just don´t understand how JSF works. The server side must be notified of the component´s state at any way. As you´re using Ajax4jsf, you can just rerender the component without having a "flash of content" (if that is where your aversion against the "server side" is based on).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic