Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Coding binding attibute for my custom Component

 
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am trying to create a custom component in JSF 1.2 and JSP 2.1 .

The component gets rendered fine.
Now I want to implement the "binding" attribute for that component.

I am not having much idea about how binding attribute works for other components
like HtmlInputText etc.

This is what I am trying to implement.
My jsp page.



and this is my Managed bean.




Please help me this issue.





 
Saloon Keeper
Posts: 22524
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't work that way.

In most cases, you don't want "binding", you want "value". Binding is used to inject an actual UIComponent into a backing bean and about the only reason you need to do that is if you intend to access or modify raw JSF UI Components. The "value" attribute is what causes the actual backing bean property set/get methods to be invoked.
 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Tim,

I got your point. But now I am stuck somewhere else.
The component I was trying to make shows a java.util.Date value in form of three select <option> tags.
Now it seems like that component never gets updated.
If I try to update the component value in ValueChangeEvent of other component in the form, it never shows any updation,
But if use the updation code in the commandAction method , the component gets updated.
Is there something I am missing about these two events.

Please guide
reply
    Bookmark Topic Watch Topic
  • New Topic