Richeli 27 de jul. de 2007
Método get
public double get(int i,
int j)
throws java.lang.IndexOutOfBoundsException
Returns the value of the element in row i , column j . The index i must be less than the number of rows in the table and the index j must be less than the number of variables in the table .
Parameters :
i - the row - entry index
j - the column - variable index
Returns :
the value of entry [ i , j ]
Throws :
java . lang . IndexOutOfBoundsException - If either of the indicies is out of bounds
Mas de todo jeito segue link relacionado
http://neutrons.ornl.gov/APGroup/appProg/xal/xalDoc/gov/sns/tools/data/DataTable.html
rbroz85 27 de jul. de 2007
blz mas isso nao resolve meu problema.
vou tentar explicar melhor…
em cada colum row eu tenho um
<h:commandButton action="#{EquipBean.passOne}" value=">"/>
eu queria saber o numero da linha que eu cliquei o botao!??
obrigado pela ajuda Richeli
rg_eder 27 de jul. de 2007
Uso Richfaces e commandButton e passo o objeto associado à linha para o componente de negócio.
<h:commandButton action="#{prioridadeHome.removerItem(itemprioridade)}" id=“selectitemprioridade”
value="#{messages[‘geral.desassociar’]}">
O prioridadeHome.removerItem(itemprioridade) é um método em um EJB Stateless e o argumento itemprioridade é um objeto (uma entity) dentro de um dataTable:
<rich:dataTable value="#{prioridadeHome.itemprioridades}"
var=“itemprioridade”
rendered="#{not empty prioridadeHome.itemprioridades}"
rowClasses=“rvgRowOne,rvgRowTwo”
id=“itemprioridadesTable”>
Espero ter ajudado.
lfpolli 27 de jul. de 2007
Você consegue pegar um valor através da tag <f:param>. Eu postei um exemplo aqui:
http://www.guj.com.br/posts/list/65503.java
O modo como esse parâmetro é recuperado no seu managed bean é o seguinte:
public void pegarParametro ( ActionEvent event ) {
UIParameter param =
( UIParameter ) event .getComponent () .findComponent ( "codigo" ) ;
// A String "codigo" é o id do parametro na p ágina
}
rbroz85 27 de jul. de 2007
hum mt interessante, mt maneiro!
isso mesmo que eu precisava
ambos me ajudaram !
muito obrigado !
vcs sao 10!
abraços
—>Topic is closed<—