• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

null pointer exception when using p:ajax with inputtext

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to get the selected date from InputField bevor without sending form. when the user change the date from the bootstrap datepicker, the new date ist wrote inside the input field. and i bind the inputfield with a bean property

here is my bean


xhtml page

namespace inside xhtml page




and here is the exception



Need help
 
Saloon Keeper
Posts: 27752
196
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
Wilkommen in the JavaRanch, Willy!

I don't actually see anything wrong with what you posted, so there may be a larger problem there.

I am curious about why you are not using the PrimeFaces Calendar control for this, however.
 
Willy Tcha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim, danke! :)

the application was designed with the bootstrap datepicker. and if i use the primfes calendar. it did not look that one from the designer. so i have to use it. if you have any other idea, will apreciate. may be passing a value from javascript to backingbean.

am really confuse.

Thanks!
 
Tim Holloway
Saloon Keeper
Posts: 27752
196
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
You cannot talk to a backing bean directly from JavaScript. That's what AJAX is for.

You can probably set up custom styles for the PrimeFaces date picker control that will make it look like Bootstrap's date picker, but you might want to look at BootFaces, which is specifically designed to make JSF look and feel more like Bootstrap.
 
reply
    Bookmark Topic Watch Topic
  • New Topic