jsf 2 - how show view page with JSF 2.2 -


please, need code. trying make query invoice on page. on page(facturashow.xhtml) shows null. in console comes result system out.

facturabean.java

public string outcome() {      facescontext fc = facescontext.getcurrentinstance();     this.visualizarfact = integer.parseint(getnumerofacturaparam(fc));     system.out.println("factura : " + this.visualizarfact);     return "facturashow.jsf"; }  //get value "f:param" public string getnumerofacturaparam(facescontext fc) {      map<string, string> params = fc.getexternalcontext().getrequestparametermap();     return params.get("numerofactura");  } 

facturaindex.xhtml page shows invoice list invoice used print, cancel, display. near end of code, find commandlink call facturashow id="reportefactura6".

                <h:form id="formmostrafacturas">                 <p:datatable id="tablafacturas" paginator="true" paginatorposition="top" rows="20"                              var="ft" value="#{facturabean.listafacturas}" emptymessage="no hay datos de facturas"                              paginatortemplate="{currentpagereport} {firstpagelink} {previouspagelink} {pagelinks} {nextpagelink} {lastpagelink} {rowsperpagedropdown}"                              rowsperpagetemplate="5,10,15">                     <p:column headertext="nro." style="width: 40px">                         <h:outputtext value="#{ft.numerofactura}" style="display:block;text-align: center"/>                     </p:column>                      <p:column headertext="empresa" style="width: 500px">                         <h:outputtext value="#{ft.cliente.nombrecliente}"/>                     </p:column>                                              <p:column headertext="ruc" style="width: 100px" >                         <h:outputtext value="#{ft.cliente.ruccliente}" style="display:block;text-align: center"/>                     </p:column>                      <p:column headertext="moneda" style="width: 70px" >                         <h:outputtext value="#{ft.moneda.simbolomoneda}" style="display:block;text-align: center"/>                     </p:column>                      <p:column headertext="total" style="width: 100px">                         <h:outputtext value="#{ft.totalventa+(ft.totalventa*0.18)}" style="display:block;text-align: right">                             <f:convertnumber pattern="###,###,##0.00" type="currency"                                              locale="en_us" />                         </h:outputtext>                     </p:column>                     <p:column headertext="imprimir" style="width: 70px; text-align: center">                         <h:commandlink id="reportefactura1" target="_blank" actionlistener="#{facturabean.pedirfactura(ft.numerofactura, ft.totalventa, ft.moneda.simbolomoneda)}"                                                                                   title="visualizar factura pdf" action="#{facturabean.verfacturanavegadorpdf()}" >                             <h:graphicimage value="/resources/imagenes/impresora.png" width="20" height="20"/>                         </h:commandlink>                         <h:outputtext value=" "/>                         <h:commandlink id="reportefactura2" target="_blank" actionlistener="#{facturabean.pedirfactura(ft.numerofactura, ft.totalventa, ft.moneda.simbolomoneda)}"                                                                                   title="descargar factura en pdf" action="#{facturabean.verfacturaexportadapdf()}" >                             <h:graphicimage value="/resources/imagenes/descargapdf.png" width="20" height="20"/>                         </h:commandlink>                         <h:outputtext value=" "/>                         <h:commandlink id="reportefactura3" target="_blank" actionlistener="#{facturabean.pedirfactura(ft.numerofactura, ft.totalventa, ft.moneda.simbolomoneda)}"                                                                                   title="imprimir en la impresora matricial" action="#{facturabean.verfacturamatrixnavegadorpdf()}" >                             <h:graphicimage value="/resources/imagenes/impresoramatricial.png" width="20" height="20"/>                         </h:commandlink>                     </p:column>                     <p:column headertext="opciones" style="width: 70px; text-align: center">                         <p:commandlink id="reportefactura4"                                        oncomplete="pf('dialogverfactura').show();"                                        update=":formverfactura" >                             <f:setpropertyactionlistener target="#{facturabean.factura}" value="#{ft}"/>                             <h:graphicimage value="/resources/imagenes/ojo.png" width="20" height="20"/>                         </p:commandlink>                         <p:outputlabel value=" "/>                         <p:commandlink id="reportefactura5"                                        target="_blank" title="anular factura" >                             <h:graphicimage value="/resources/imagenes/anular.png" width="20" height="20"/>                         </p:commandlink>                          <h:commandlink id="reportefactura6" action="#{facturabean.outcome}">                             <f:param name="numerofactura" value="#{ft.numerofactura}"/>                             <h:graphicimage value="/resources/imagenes/ojo.png" width="20" height="20"/>                         </h:commandlink>                     </p:column>                 </p:datatable>             </h:form> 

facturashow.xhtml page invoice information displayed.

    <h:body>      <ui:composition template="./../../plantilla/plantilla.xhtml">          <ui:define name="content">             <p><h2>visualizando la factura</h2></p>             <h:form>                 <h:outputtext value="f1: #{facturabean.visualizarfact}"/>                 <p></p>                 <h:outputtext value="f2: #{facturabean.visualizarfact}"/>                 <p></p>                 <h:outputformat value="invoice : {1}">                     <f:param value="#{facturabean.visualizarfact}"/>                     <f:param value="#{facturabean.visualizarfact}"/>                 </h:outputformat>             </h:form>         </ui:define>      </ui:composition>  </h:body> 

i posting image null appears. image


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -