Displaytag

3 respostas
J

Bom dia Pessoal,

to usando o displaytag na minha aplicação. Mas ao tentar colocar um link na tabela, ta tendo problema.
Seguindo o manual, eu devo colocar isso no meu Decorator (vo).

public String getLink()
    {
	    ListObject lObject = (ListObject) getCurrentRowObject();
	    int lId = lObject.getId();

	    return "<a href=\"details.jsp?id="
		+ lId
		+ "&action=view\">View</a> | "
		+ "<a href=\"details.jsp?id="
		+ lId
		+ "&action=edit\">Edit</a> | "
		+ "<a href=\"details.jsp?id="
		+ lId
		+ "&action=delete\">Delete</a>";
	}

mas acontece que no jar que eu baixei no site não tem a classe ListObject.

Ja procurei no site e não achei, como eu resolvo isso?

valeu

3 Respostas

J

Mas e esse método vai brotar da onde? getCurrentRowObject();

kkkkk

J

resolvi kkk

eu substitui o métod getCurrentRowObject por getCodigo e deu certinho…kkkk

foi mal ai minha ignorancia

I

kkkkkkkkk…Nossa vc é um piadista meu caro amigo !!!

Tenta isso pra ve se vc consegue. Esse ListObject ao qual vc esta falando na existe é so pra representar uma lista que vc vai receber !

public String getLink()  { 
            
          String id ;
         
          (Cliente) objeto = (Cliente)this.getCurrentRowObject();

          nome = objeto.getId();

          return "<a href=\"details.jsp?id="+ lId + "&action=view\">View</a> | " + "<a href=\"details.jsp?id="  + lId  + "&action=edit\">Edit</a> | " + "<a href=\"details.jsp?id=" + lId  + "&action=delete\">Delete</a>";  

}
Criado 30 de outubro de 2008
Ultima resposta 30 de out. de 2008
Respostas 3
Participantes 2