This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
12 Replies Last post: Dec 14, 2007 3:27 PM by Tatyana Matveyeva  
Matthias Bartel   32 posts since
Aug 14, 2007
Currently Being Moderated

Oct 24, 2007 10:44 AM

DateChooser

Hello everybody,

 

I've got a problem with the dateChooser component:

When I try to dynamically show the component, the value won't change in the BackingBean.

 

In the jsp I've got:

...
     <q:dateChooser id="statisticsStart"
                    dateFormat="medium"
                    showWeekNumber="true"
                    value="#{GroupStatisticsBackingBean.dataStart}"
                    todayText="today"
                    noneText="none"
                    weekText="week"
                    dayStyle="border: 1px solid white;"
                    
                    >
     </q:dateChooser>
<a4j:commandButton value="update" action="#{GroupStatisticsBackingBean.makeData}" 
                               onclick="q_showPopupLayerCentered('loadingPopup')"
                            oncomplete="q_hidePopupLayer('loadingPopup');"
                               reRender="a4jGroupStatisticsChart, a4jVehicleStatisticsChart" 
                           rendered="#{GroupStatisticsBackingBean.groupSelected}"
                           ></a4j:commandButton>
...

 

in the method GroupStatisticsBackingBean.makeData() I've put a system.out.println which prints out "dataStart". It all works fine as long as I do not include the line rendered="#{GroupStatisticsBackingBean.groupSelected}" in the DateChooser Tag. From now on, only the initial Date-Value will be printed, although I've set a completely different date in the browser.

dataStart is of type "Date" in the BackingBean.

In short: if the DateChooser is shown right from the beginning, everything works fine. But if the DateChooser is shown only when triggered by a certain event, it doesn't work at all, because "dataStart" isn't updated anymore.

 

Is there anything wrong?

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
1. Oct 24, 2007 7:33 PM in response to: Matthias Bartel
Re: DateChooser

Hello,

 

Unfortunately, the information you provided is not enough to reproduce the problem. Can you please provide us with full JSP page, so we can reproduce the issue. Please also tell us you JSF implementation and QuipuKit version.

 

Regards,

Tatyana

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
3. Oct 25, 2007 1:45 PM in response to: Matthias Bartel
Re: DateChooser

Hello Matthias,

 

I have several questions about your problem since I don't fully understand some of your sentences:

 

- "When I try to dynamically show the component". What component are you showing? What do your mean by "dynamically"? As I can see from the page source, the DateChooser is always rendered.

- "It all works fine as long as I do not include the line rendered="#{GroupStatisticsBackingBean.groupSelected}" in the DateChooser Tag." As seen from the code, I can see that the rendered attribute is specified for the a4j:commandButton, not for the DateChooser. And, can you please clarify whether the DateChooser's value is updated in the backing bean if you just remove this attribute?

- Looking at your code, I don't see updating the DateChooser by some event. Is there something that is not included in the files you provided?

 

Another point is the "loadingPopup" that should be shown when clicking the a4j:commandButton component. As a parameter for the q_shouwPopupCentered JavaScript function, you should specify the client ID of the PopupLayer component, for example "formId:popupLayerId". Does this popupLayer work fine?

 

Regards,

Tatyana

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
5. Oct 26, 2007 7:51 PM in response to: Matthias Bartel
Re: DateChooser

Hello Matthias,

 

It seems that the problem is not related to QuipuKit. We reproduced the same problem in application without QuipuKit at all. However, if you change scope of your backing bean from "request" to "session", everything should work fine.

 

Feel free to contact us if you have any further questions.

 

Regards,

Tatyana

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
8. Oct 29, 2007 6:15 PM in response to: Matthias Bartel
Re: DateChooser

Hello Matthias,

 

Unfortunately, we were unable to reproduce the problem you described. The only problem we found is the problem with a request scope backing bean. Please provide us also with your web.xml file, version of Ajax4jsf and application server. The best option to reproduce the problem would be a working application (which you can send at quipukit-support AT teamdev DOT com).

 

Regarding the ClassCastException. Most likely this exception is not related to your problem. We are aware of this exception. It appears in case when the DateChooser was loaded using the Ajax4jsf framework. We will fix this issue in one of the nearest releases of QuipuKit.

 

Regards,

Tatyana

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
10. Nov 7, 2007 5:45 PM in response to: Matthias Bartel
Re: DateChooser

Hello Matthias,

 

QuipuKit 1.3 is already available. Please try it and let us know the result.

 

Regards,

Tatyana

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
12. Dec 14, 2007 3:27 PM in response to: Matthias Bartel
Re: DateChooser

Hello Matthias,

 

Unfortunately, we were unable to reproduce the problem with ClassCastException.

 

I know, that you provided us with some of the information that could help us reproduce the problem. But just in case that something changed, please provide us with a following information:

 

- JSF implementation and version;

- State saving method;

- Do you use Facelets or not, what version;

- Ajax4jsf version;

- Application server;

- Any other component libraries or framework with versions

- web.xml file;

- pages on which the problem occurs and steps to reproduce the problem.

 

As I understand, you still have a problem with saving the value of the DateChooser component after it was loaded with Ajax4jsf framework. And there is also ClassCastException. Is it correct?

 

Regards,

Tatyana

More Like This

  • Retrieving data ...