• Post Reply Bookmark Topic Watch Topic
  • New Topic

Visual Web JSF. Problem with the prerender() method.

 
Jose Alvarez de Lara
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Firstable I am working on NetBeans 6.5 against Glassfish v2ur2 and Derby database.
Now I am going to introduce my code,



This is the code in the prerender() method.

I have made the web app works but not so fine as I would like. My problem the first time I select a Subcategoria from its
DDL. productosDD is a nested Producto DDL son when I select a Categoria and a Subcategoria the DDL Producto is loaded with a subset
of data of the table Producto. Well, when I select a Categoria and a Subcategoria it loads Producto and I get the first Item of the Producto DDL. Later I calculate the firstProductoId and idPieza I hope that piezaDataProvider refresh with the new calculated values and my table show the new rows. But it does not work. And it does not only for the first time. The rest of the time the web app works ok.

And I do not Know what I am making wrong. I think the problem is in the prerender() method. I mean,



I do not think these are the correct sentences.
Any idea?

Here is the rest of the, needed to understand it, code,



The PK is formed by both, ID_PIEZA and ID_PRODUCTO being ID_PRODUCTO a foreign key.

Thanks in advance,
Jose Alvarez de Lara
 
Jose Alvarez de Lara
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I have been debugging the web app and everything is ok. So the problem is the order where the different methods are executed.

I mean, when I call productosDD_processValueChange(ValueChangeEvent event) {...} it gives me what I am waiting it does.

But when I call categoriasDD_processValueChange(ValueChangeEvent event) {...} or subcategoriasDD_processValueChange(ValueChangeEvent event) {...} methods, the preprender(){...} is executed after I call those methods but before... what? I do not know. But at the end I do not get what I was waiting.

So I should feel ok if someone gives me the url of a good tutorial to understand all of it. The rest falls in my hands.

Thanks
Jose Alvarez de Lara
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!