5 Replies Latest reply on Feb 22, 2010 10:07 AM by Jay Balunas

    Make outputPanel automatically rendered from particular components

    Ilya Shaikovsky Master

      Forgot to mention earlier one interesting feature. It's widelly used in ADF faces component library. In order to define components for updates they using:

       

      <af:link partialSubmit="true" id="link"/>
      ...
      <af:panel partialUpdate="link">
           ...
      </af:panel>
      

       

      So it's fully opposite to our definitions. And in general using this as the only possible way to design updates(as ADF does) - this aproach seems not really convinient to me(at least not transparent for any other third party or standard components). But thinking about our outputPanel component and ajaxRendered feature I think we could discuss this way as possible functionlity expansion.

       

      As outputPanel is our special component for marking updateable zones - we could add one more attribute like AjaxRenderedFrom. And allow to define id's of components which should update it in this attribute. And moreover how about to allow some container definitions like shown below: (messages component based on outputPanel)

       

      <messages ajaxRenderedFrom="userForm"/>
      <rich:panel id="userForm">
           //some inputs, validators and ajax commands there
      </rich:panel>
      
      <messages ajaxRenderedFrom="userForm"/>
      <rich:panel id="siteSearchPanel">
           //some inputs, validators and ajax commands there     
      </rich:panel>
      

       

      In this case all the submiting behaviors/ajax command components from the first panel will update automatically first messages component, and second panel children - second messages.

       

      The second case I think about - if we show some modal panel and we have messages inside the panel and at the main page - both messages will be updated automatically. Or if you will mark them not updateable automatically - you will have to use reRender's to point them to be updated.

       

      Thoughts? Does it worth some more discussion?