Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

UIDateInput Custom Component

 
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

I am new to JSF world. I am using JSF in Action book for JSF reference.
In their Custom Component Development chapter, they have created a custom component UIDateInput.
This component creates three html select option tag pairs filled with month, year and day parts of a date.

This component uses the java.util.Date for value attribute.

But I want to add more attributes like binding, disabled ,styleclass to this component.
But I am unable to do so..
Also there is ValueBinding and ValueExpression issues.

Please help me through this....
I am really having a tough time in dealing with this component.

Waiting for replies.
Thanks In Advance.

 
Saloon Keeper
Posts: 25467
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The easiest way to do this is to subclass an existing component that already has these features.

Just as a warning, however, creating a custom JSF binary component is something you should only attempt as an absolute last resort. JSF components started out as an extended JSP tag construct but they quickly got lost and the results these days are a mish-mash resulting from blending about 3 different and occasionally conflicting concepts, with documentation that's generally poor and out of date. For most cases, it's a lot easier to build components at the XML source level instead.
 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Tim.

But in my work area I am restricted to use any other external component library.
So for handling date fields , I need to have some kind of custom component which can reflect changes in date fields.

The example I have been through in "JSF in action" displays a date in three different parts and is pretty cool.
But I am just not able to get its binding attribute working.

I need help in this regard.
Sorry if it sounds redundant.
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic