• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JSF valuechangeListener not detecting a change for values entered manually in a text field.

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have a specific scenerio

I have a form which has 2 text fileds.

One text field is actually a date field which has a date picker component. So either we can use the date picker to pick the date or enter the date manually. Based on the date that is being selected the other textfield is either enabled or disabled.

So in this scenerio the other text field should be enabled for the date i enter in the date field either manually or through the date picker component.

But when i select the date through the date picker the other text field is enabled but not when i try to add the date manually. But this should be not the case. The other text fild should be enable should be enabled irrespective of wether we select it through the date picker or enter manually.

Does anyone tell me how to do this.

For the date text field below is the code




the value change listener is as shown below





Thanks in advance for your help

With Regards
Chakravarthy
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Strange - you have <hx:inputHelperDatePicker></hx:inputHelperDatePicker> as a child
component of h:inputText. So hx:inputHelperDatePicker is a composite component you or
one of your colleagues has written to call some JS or jQuery function, yes?

Put the h:inputText inside the composite component, you'll need to use f:convertDateTime
as a child of the inputText component. The composite needs a <composite:attribute name
="value" type="java.util.Date"> attribute.

So your composite component isn't just a helper any more, it's a bona fides date input
component.

The main thing I notice is this old fashioned full page submit stuff you're doing. In all
fairness though I'm still working on putting together an input date/time composite that
is ajax enabled.

I know how to do ajax enabled composite components well enough but haven't figured
out if/how I can get a standard inputText component to generate a 'simulated' js event.

Regards,
Brendan.
 
He baked a muffin that stole my car! And this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic