2 Replies Latest reply on Nov 4, 2009 2:35 PM by Francis Drake

    Action on selecting rich:calendar date

    Francis Drake Newbie


        I would like to attach action, to button 'apply' or 'set' in rich:calendar, so I can get rid of additional button. I used modal panel to display calendar for given event from my a4j:repeat. Current date and id are passed by combination of componentcontrol and params, then I use outputpanel with ajaxrendered set to true. In a4j:actionparam I set up fields in my backing bean (id and date). If I don't do anything more, when I select date and click 'set' i got exception: property 'startDate' in not writable on type java.util.Date. I assume I could modify setter so it uses entity manager to set new date, but the same method is used when I initialize backing bean with original date.

      I see only one solution, use fx onchange attribute of calendar component, to click some hidden button that will trigger server side action (update via entitymanager), but it doesn't look very 'seam-like' (or perhaps richfaces-like), where most simple operations can be done without making such workarounds.

      all ideas welcome,