You are on page 1of 2

<p:dataTable id="findSignatureInfoTable"

value="#{signatureMB.signatures}"
var="signature" rows="15" paginator="true"
paginatorPosition="bottom"
selectionMode="single"
rowKey="#{signature.signatureId}"
paginatorTemplate="{FirstPageLink}
{PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
rowIndexVar="index"
rowsPerPageTemplate="5,10,15" emptyMessage="Nenhum
registo encontrado">

<p:column styleClass="col-width-medium text-center "


headerText="nome de imagem">
<h:outputText value="#{signature.signatureFileName}" />
</p:column>

<p:column styleClass="col-width-medium text-center "


headerText="data de criação">
<h:outputText value="#{signature.createTime}" />
</p:column>

<p:column styleClass="col-width-medium text-center "


headerText="signatários">
<h:outputText value="#{signature.signatoriesName}" />
</p:column>

<p:column styleClass="col-width-medium text-center "


headerText="departamento">
<h:outputText value="#{signature.taxOfficeCode}" />
</p:column>

<p:column styleClass="col-with-150" headerText="Operações">

<div class="ui-grid-col-3">
<p:commandLink style="text-decoration:none;
color:#0f0f0f;">
<i class="fa fa-fw fa-eye" style="font-size:
2em"></i>
</p:commandLink>
</div>
<div class="ui-grid-col-3">
<p:commandLink style="text-decoration:none;
color:#0f0f0f;">
<i class="fa fa-fw fa-remove" style="font-size:
2em"></i>
</p:commandLink>
</div>

</p:column>
</p:dataTable>

private Object httpResourcePOST(String uri, Object request, Class<?> clazz) {

RestTemplate restTemplate = new RestTemplate();


HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/json;charset=UTF-8");
headers.add("Accept", "application/json");
try {
String jsonObject = new
ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(request);
HttpEntity<Object> entity = new HttpEntity<>(jsonObject, headers);

Object response = restTemplate


.postForObject("http://10.129.194.133:8090/SIGT-CORRESPONDANCE-
1.1.0-SNAPSHOTS/" + uri,
entity, clazz);
return response;
} catch (Exception e) {
return e.getMessage();
}
}

You might also like