-
1. Re: Support for updating object
jbalunas Apr 12, 2010 9:55 AM (in response to mvdurao)I am going to move this to the RichFaces forum, the RichFaces Development forum is for discussions related to the development of RichFaces project itself. You will share your question and any answers with more people from the community in the user forum.
Thanks
-
2. Re: Support for updating object
nbelaevski Apr 12, 2010 12:17 PM (in response to mvdurao)Immediate command components fully skip UPDATE_MODEL_VALUES phase, so this can be the reason of "null bean objects". Try changing this and post more page/bean code if this won't help.
-
3. Re: Support for updating object
mvdurao Apr 12, 2010 2:25 PM (in response to mvdurao)so I'm using this method to add items to an application in a grid. So I put the Immediate. Because there may be null fields in the header of the note.
Code:
<h:graphicImage value="../../imagens/icons/add.png" id="btnAddPreco">
<rich:toolTip>
<span style="white-space:nowrap">
<h:outputLabel value="#{msgs.produto_preco_adicionar}" />
</span>
</rich:toolTip>
<a4j:support action="#{produtoFc.adicionarPreco}"
event="onclick"
immediate="true"
reRender="valorProduto,tblPrecos"/>
</h:graphicImage>Bean
public void adicionarPreco() {
List<Produto_TabelaPreco> precos = new ArrayList<Produto_TabelaPreco>();
try {
Produto_TabelaPreco preco = new Produto_TabelaPreco();
if (produto.getPrecos() != null ) {
precos = produto.getPrecos();
}
preco.setValor(this.valorProduto);
preco.setTabelapreco(this.tabelaPreco);
preco.setProduto(produto);
precos.add(preco);
produto.setPrecos(precos);this.valorProduto = new Double(0);
} catch (Exception e) {
System.out.println(e);
}
}-
imagem.JPG 119.6 KB
-
-
4. Re: Support for updating object
nbelaevski Apr 12, 2010 4:10 PM (in response to mvdurao)Marcus,
The problem is still not clear to me:
- what bean values are missing?
- why do you need immediate at all?
- was immediate="true" the source of the problem?
-
5. Re: Support for updating object
mvdurao Apr 13, 2010 3:00 PM (in response to mvdurao)Belaevski,
My problem is I need to add prices for a product.
To do this routine I created a button that adds values in one table without the submit page.I created a method that takes the values and add to the collection and make a reRender in the table.
This method can not validate the form information so I used the immediate.
Except that when I used the immediate is not sending the values to the bean.
Below the screen image.
Thank you for your attention
-
imagem.JPG 119.6 KB
-
-
6. Re: Support for updating object
nbelaevski Apr 14, 2010 7:32 AM (in response to mvdurao)The problem is still not clear. Please post more bean & page code and point to the problem.