hello, thanks
i have tried to use converter but still it gives me property not found exception when i click on edit button without ajaxsingle true on edit button.
if i set ajax single true on button than it works fine but my calendar is not working properly i mean i am not getting date from calendar in my bean & it's throwing null pointer exception . similar things happen with limittoList attribute
<rich:simpleTogglePanel id="smpltglpnl_newsdates" switchType="client" label="Event Dates">
<h:panelGrid id="pnlgrd_newsdates" columns="4">
<h:outputText binding="#{newsEvents.startdate_lablel}" id="startdate_lablel"
value="#{news['newscreate.startdate']}"/>
<rich:calendar ignoreDupResponses="true" ajaxSingle="true" limitToList="true" showWeeksBar="false" showApplyButton="true" binding="#{newsEvents.startdate_calendar}" datePattern="yyyy-MM-dd HH:mm" id="startdate_calendar">
<a4j:support event="oncollapse" ignoreDupResponses="true" ajaxSingle="true" limitToList="true" action="#{newsEvents.setdate_end}" reRender="vis_startdate_calendar1"/>
</rich:calendar>
<h:outputText binding="#{newsEvents.enddate_label}" id="enddate_label"
style=" text-align: right; width: 105px" value="#{news['newscreate.enddate']}"/>
<rich:calendar ignoreDupResponses="true" ajaxSingle="true" limitToList="true" showWeeksBar="false" showApplyButton="true" binding="#{newsEvents.enddate_calendar2}" datePattern="yyyy-MM-dd HH:mm" id="enddate_calendar2"
>
<a4j:support event="oncollapse" ignoreDupResponses="true" ajaxSingle="true" limitToList="true" action="#{newsEvents.setdate_start}" reRender="vis_enddate_calendar"/>
</rich:calendar>
<h:outputText binding="#{newsEvents.vis_startdate_label}" id="vis_startdate_label"
style=" text-align: right; width: 105px;" value="#{news['newscreate.visstartdate']}"/>
<rich:calendar ignoreDupResponses="true" ajaxSingle="true" limitToList="true" showWeeksBar="false" showApplyButton="true" binding="#{newsEvents.vis_startdate_calendar1}" datePattern="yyyy-MM-dd HH:mm" id="vis_startdate_calendar1"
/>
<h:outputText binding="#{newsEvents.vis_enddate_label}" id="vis_enddate_label"
value="#{news['newscreate.visenddate']}"/>
<rich:calendar ignoreDupResponses="true" ajaxSingle="true" limitToList="true" showWeeksBar="false" binding="#{newsEvents.vis_enddate_calendar}" showApplyButton="true" datePattern="yyyy-MM-dd HH:mm" id="vis_enddate_calendar"
/>
</h:panelGrid>
<rich:messages binding="#{newsEvents.alert3}" globalOnly="true" id="alert3" showSummary="true" ajaxRendered="true" style="font-size:14px;background-color:lightyellow;color:red;height: 30px;" />
<rich:messages binding="#{newsEvents.alert4}" globalOnly="true" id="alert4" showSummary="true" ajaxRendered="true" style="font-size:14px;background-color:lightyellow;color:red;height: 30px;" />
<rich:messages binding="#{newsEvents.alert2}" globalOnly="true" id="alert2" showSummary="true" ajaxRendered="true" style="font-size:14px;background-color:lightyellow;color:red;height: 30px;" />
<rich:messages binding="#{newsEvents.alert6}" globalOnly="true" id="alert6" showSummary="true" ajaxRendered="true" style="font-size:14px;background-color:lightyellow;color:red;height: 30px;" />
</rich:simpleTogglePanel>
<rich:tabPanel rendered="#{newsEvents.assignvalue=='0'}" id="tbpnl_assign_news" switchType="client" headerSpacing="2" width="500" style="border: 1px solid #336699; background-color: #336699" height="120">
<rich:tab label=" Class " id="tab_assign_to_class" style="font-size: 16px">
<h:panelGrid id="pnlgrid_assign_to_class" style="hight:200px;left: 0px; top: 0px; position: absolute" columns="2">
<h:outputText id="outtxt_sel_cls" value="Select Class : " style="font-size: 13px"/>
<h:outputText id="outtxt_asgn_cls" value="Assigne Class : " style="font-size: 13px"/>
<rich:listShuttle immediate="true" converter="ListConvertet" targetCaptionLabel="Currently Active Items" sourceListWidth="130" targetListWidth="130" sourceCaptionLabel="Available Items" listsHeight="100" sourceValue="#{newsEvents.clss_lst}" targetValue="#{newsEvents.target_clss_lst}" id="list_class" var="cls">
<rich:column>
<h:outputText value="#{cls.list_name}"></h:outputText>
</rich:column>
</rich:listShuttle>
</h:panelGrid>
<br/><br/>
</rich:tab>
<rich:tab id="tab_assign_to_grp" label=" Group ">
<h:panelGrid id="pnlgrid_assign_to_grp" style="left: 30px; top: 15px; position: absolute" columns="7">
<h:outputText id="outtxt_lp_sel_grp" value="Select Group : " style="font-size: 13px"/>
</h:panelGrid>
</rich:tab>
</rich:tabPanel>
<rich:toolBar id="pnl_btncntrldwn" >
<rich:separator width="250" id="sprtr-btns" lineType="none"/>
<a4j:commandButton id="news_edit"
value="#{news['admin.Edit']}" action="#{newsEvents.news_edit_action}"
/>
<a4j:commandButton id="news_del"
value="#{news['admin.delete']}" rendered="false"/>
<rich:spacer width="100" id="spc2" />
<a4j:commandButton id="news_save" style=" align:right"
value="#{news['admin.save']}" limitToList="true" reRender="startdate_calendar,vis_startdate_calendar1,enddate_calendar2,vis_enddate_calendar,smpltglpnl_newsdeyail,alert1,alert2,alert3,alert4,alert6,smpltglpnl_newsdates" process="startdate_calendar,vis_startdate_calendar1,enddate_calendar2,vis_enddate_calendar,smpltglpnl_newsdeyail,smpltglpnl_newsdates,alert1,alert2,alert3,alert4,alert6" binding="#{newsEvents.news_save}" action="#{newsEvents.news_save_action}" />
</rich:toolBar>
my convertor is below:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.my.richfaces;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
/**
*
* @author Administrator
*/
public class ListConvertet implements Converter {
public ListConvertet() {
}
@Override
public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
return (Object)arg2;
}
@Override
public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) {
return arg2.toString();
}
}
and face-contenct entry
<converter>
<converter-id>ListConvertet</converter-id>
<converter-class>org.my.richfaces.ListConvertet</converter-class>
</converter>
any idea?