JSON-P Leer arhivos

Proyecto

Clonar

git clone https://avbravo@bitbucket.org/avbravo/fiscalencripter.git

En el archivo index.xhtml

<p:fieldset legend="LEER ARCHIVO JSON" style="margin-bottom:20px" toggleable="true" collapsed="true">
               
                <p:panelGrid columns="3">
            
              <p:commandButton value="Read json"
                                 update=":form, :form:datatable"
                                 action="#{jsonpController.readJson()}"/>
                </p:panelGrid>
                <p:dataTable value="#{jsonpController.licenseList}"
                             id="datatable"
                             var="item">
                
                
                    <p:column headerText="idlicense">
                        <p:outputLabel value="#{item.idlicense}"/>
                    </p:column>
                    <p:column headerText="key">
                        <p:outputLabel value="#{item.key}"/>
                    </p:column>
                    <p:column headerText="company">
                        <p:outputLabel value="#{item.company}"/>
                    </p:column>
                    <p:column headerText="description">
                        <p:outputLabel value="#{item.description}"/>
                    </p:column>
                    <p:column headerText="system">
                        <p:outputLabel value="#{item.system}"/>
                    </p:column>
                    <p:column headerText="title">
                        <p:outputLabel value="#{item.title}"/>
                    </p:column>
                </p:dataTable>
              
                </p:fieldset>

Crear la clase JsonpController.java

Salida

Archivo license.json

Entity

Last updated

Was this helpful?