56 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<?xml version='1.0' encoding='UTF-8' ?>
 | 
						|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 | 
						|
<html xmlns="http://www.w3.org/1999/xhtml"
 | 
						|
      xmlns:h="http://xmlns.jcp.org/jsf/html"
 | 
						|
      xmlns:f="http://xmlns.jcp.org/jsf/core"
 | 
						|
      xmlns:p="http://primefaces.org/ui">
 | 
						|
    <h:head>
 | 
						|
        <title>MatriX A</title>
 | 
						|
        <h:outputStylesheet name="css/layout-css/dataTable.css" />
 | 
						|
        <h:outputScript library="js" name="do_validation.js"/> 
 | 
						|
 | 
						|
    </h:head>
 | 
						|
    <h:body>
 | 
						|
        <h:form id="form_matrix_A">
 | 
						|
            <p:tooltip globalSelector="true"/>
 | 
						|
            <p:growl id="id_messageA" showDetail="true"/>
 | 
						|
 | 
						|
            <p:dataTable class="dataTables"
 | 
						|
                         id="datatableA" 
 | 
						|
 | 
						|
                         value="#{matrixOperations.getMatrixA().matrix}" 
 | 
						|
                         var="row" 
 | 
						|
                         rowIndexVar="i"  
 | 
						|
                         scrollable="true"
 | 
						|
                         paginatorAlwaysVisible="true"
 | 
						|
                         paginator="true" 
 | 
						|
                         paginatorPosition="top" 
 | 
						|
                         rows="10"                 
 | 
						|
                         lazy="true" >
 | 
						|
                <f:facet name="header"  > Matrix A  </f:facet>
 | 
						|
                <p:columns    
 | 
						|
                    value="#{matrixOperations.getMatrixA().getMatrix().get(i)}"  
 | 
						|
                    var="arrayListElement" columnIndexVar="j">
 | 
						|
                    <h:inputText 
 | 
						|
 | 
						|
                        converterMessage="Invalid format!"
 | 
						|
                        title= "(#{i},#{j})" 
 | 
						|
                        style="margin-left: 2px;" class="input" 
 | 
						|
                        value="#{row[j]}" >
 | 
						|
                        <f:ajax event="keyup" 
 | 
						|
                                listener="#{matrixOperations.getMatrixA().listenForKeyUp(i,j, row.get(j) )}"/>
 | 
						|
                    </h:inputText> 
 | 
						|
                </p:columns>
 | 
						|
                <f:facet name="footer">
 | 
						|
                        columns:
 | 
						|
                        <h:inputText id="columns" value="#{matrixOperations.getMatrixA().columns}"/>
 | 
						|
                        rows:
 | 
						|
                        <h:inputText id="rows" value="#{matrixOperations.getMatrixA().rows}"/>
 | 
						|
                        <h:commandButton value="Change Sizes" action="#{matrixOperations.getMatrixA().changeRowsColumns()}"/>
 | 
						|
                </f:facet>
 | 
						|
            </p:dataTable>
 | 
						|
        </h:form>
 | 
						|
    </h:body>
 | 
						|
</html>
 | 
						|
 |