0

I want to render UIComponent from Bean which I have defined in String.

String component = "<p:dataTable " +
"            id=\"data_table_person_tl\"    " +
"            widgetVar=\"dtpersTLWV\" " +
"            filterEvent=\"enter\"    " +
"            rowKey=\"#{personLI.id}\"        " +
"            var=\"personLI\" " +
"            value=\"#{personsTableForm.lazyModel}\" " +
"            selection=\"#{personsTableForm.uiPerson}\" " +
"            selectionMode=\"single\" " +
"            emptyMessage=\"#{localize.emptyTable}\" " +
"            resizableColumns=\"true\" " +
"            lazy=\"true\" " +
"            sortBy=\"surname\" " +
"            sortOrder=\"ASCENDING\" " +
"            rowIndexVar=\"rowIndex\"   " +
"            paginator=\"true\" rows=\"#{mainPageBean.numberOfRecords}\" " +
"            paginatorTemplate=\"#{localize.paging_rcords_on_page} {RowsPerPageDropdown} #{localize.paging_page} {JumpToPageDropdown} {PreviousPageLink} {NextPageLink} {CurrentPageReport}\" " +
"            rowsPerPageTemplate=\"#{mainPageBean.rowsPerPage}\" " +
"            currentPageReportTemplate=\"(#{localize.paging_showed} {startRecord} - {endRecord} #{localize.paging_from} {totalRecords})\"> " +
" " +
"              " +
"            <p:columns value=\"#{personsTableForm.columns}\" var=\"column\"  " +
"                       columnIndexVar=\"colIndex\"  " +
"                       id=\"colIndex\" " +
"                       sortBy=\"#{personLI[column.property]}\" " +
"                       filterBy=\"#{personLI[column.property]}\" " +
"                       filterOptions=\"||#{column.property}\" " +
"                       filterMatchMode=\"#{column.matchCase}\"> " +
"                       <f:facet name=\"header\"> " +
"                           <h:outputText value=\"#{column.header}\"/> " +
"                      </f:facet> " +
"                #{personLI[column.property]} " +
"            </p:columns> " +
"            <p:column id=\"organization\" " +
"                     var=\"organization\" " +
"                     widgetVar=\"organization\" " +
"                     sortBy=\"#{personLI.organization}\" " +
"                     filterBy=\"#{personLI.organization}\" " +
"                     filterMatchMode=\"contains\" " +
"                     filterOptions=\"||#{personLI.organization}\" " +
"                     rendered=\"#{mainPageBean.idmEnviroment != 'UPOL'}\">     " +
 "                    #{personLI.organization} " +
"                      <f:facet name=\"header\"> " +
"                           <h:outputText value=\"#    {localize.label_organization}\"/> " +
"                      </f:facet> " +
"            </p:column> " +
" " +
"            <!-- double click --> " +
"            <p:ajax event=\"rowDblselect\"  " +
"                    update=\":dialogPersonForm:displayPerson\" " +
"                    onstart=\"PF('blockOnLoad').show()\" " +
"                    listener=\"#{dialogHelper.openDialog}\" > " +
"                 " +
"            </p:ajax> " +                           " +
"        </p:dataTable> ";

Is it somehow possible to render this and force all expressions to be evaluated ?

I am getting this declaration from database and it's too complicated to create all of this components manually

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
Michal Heneš
  • 353
  • 2
  • 4
  • 19

0 Answers0