dynamic - Render action outcome to dialog. Possible? -


helo,

i ask primefaces dialog related question.

primefaces-4.0-snapshot contains new dialog framework enables dynamically generate dialog if return action outcome pretended dialog:. http://www.primefaces.org/showcase/ui/dialogframeworkdata.jsf
understand takes outcome , renders auto generated dialog contents.

because primefaces 4.0 going take time complete, wondering if similar functionality achievable in other way. similar functionality mean showing (or rendering to) view in dialog.

project working on hugely dynamic, based on bpm , ability show dialogs dynamic content useful.

update: have been investigating primefaces repository myself , found revision poc dialog framework implementation: https://code.google.com/p/primefaces/source/detail?r=8808

thanks.

yes. use jquery ui dialogs

the usage pretty simple. let's have <h:panelgroup> content wish display in dialog, re-render panelgroup first , call dialog() method on it.

 <h:panelgroup id="dialogcontainer" styleclass='dialog'>           <p:datatable var="car" value="#{tablebean.carssmall}">               <p:column headertext="model">                   <h:outputtext value="#{car.model}" />               </p:column>                <p:column headertext="year">                   <h:outputtext value="#{car.year}" />               </p:column>                <p:column headertext="manufacturer">                   <h:outputtext value="#{car.manufacturer}" />               </p:column>                <p:column headertext="color">                   <h:outputtext value="#{car.color}" />               </p:column>                <p:column headertext="color">                   <p:commandbutton icon="ui-icon-search" actionlistener="#{tablebean.selectcarfromdialog(car)}" />               </p:column>           </p:datatable>       </h:panelgroup>   

and on click of button first need re-render dialogcontent , call $('.dialog').dialog(); (please read api complete set of params dialog())

but i'm not sure mean

because primefaces 4.0 going take time complete

do mean framework take time reach final stage or learning curve steep? if it's former, using jquery ui dialogs makes sense. if it's latter, don't think taking other approach faster! anyway, hope helps :)

update: actually, re-render contents rather container itself. in example can re-render p:datatable rather container.


Comments