-
1. Re: commandButton not working in facet
ilya_shaikovsky May 8, 2009 8:37 AM (in response to sticky007)I'll check..
b.t.w. quick question.. what you need this button to perform? -
2. Re: commandButton not working in facet
ilya_shaikovsky May 8, 2009 8:57 AM (in response to sticky007)https://jira.jboss.org/jira/browse/RF-7069 such construction seems not works at all. :(
but again desribe please in details what you want to chieve and I'll try to found a solution. -
3. Re: commandButton not working in facet
sticky007 May 8, 2009 9:45 AM (in response to sticky007)Thank for looking into this. I am trying to implement my own controls for calendar navigation in my custom "header" facet. The idea is that I have a date range, for example, 05-01-2005 to 08-31-2010 and I wish to prevent the user from navigating the calendar outside of this date range.
I've only shown one button in my example, but there would be other buttons, i.e. nextMonth, prevMonth, nextYear, prevYear . Each button would call a method in the bean, and result in a call to setCurrentDate on the HtmlCalendar calendar.
The buttons would be enabled or disabled via other methods, i.e.
<a4j:commandButton action="#{myCalendarBean.doNextYear}" value="<<" rendered="#{myCalendarBean.isNextYearEnabled}"/>
This may help too. I see that the generated A4J.AJAX.Submit code for the commandButton in the facet results in a JavaScript syntax error. The 4th argument (parameters?) is missing:
Error: syntax error
Source File: http://localhost:7001/CalTest/myCalendar.jsf
Line: 1, Column: 43
Source Code:
A4J.AJAX.Submit('_viewRoot','j_id2',event, );return false; -
4. Re: commandButton not working in facet
ilya_shaikovsky May 8, 2009 11:32 AM (in response to sticky007)check please such customization with controls substitutions like described in guide.
<f:facet name="header"> <h:panelGroup> <h:outputText value="{nextYearControl}" rendered="#{userBean.available}"/> <h:outputText value="{previousYearControl}" rendered="#{not userBean.available}"/> </h:panelGroup> </f:facet>
available just simple boolean in my case.