Hi everyone ...
I have the following problem:
I have on a page .jsp a 'Selectonechoice' and a button ... when that Button is clicked, there is a redirection for another page .. and on this page there is a form .. Where data is entered in the bank ... After the user puts the data, it should click on a button .. that gives a commit and redirects the user to previous page (that page that had the selectonchoice), on this page the selectonechoice should present some intens .. among them the one that has just been inserted ... but it does not show .. ie .. it does not update ...
But if I close the browser and open the page again it updates ...
He is not updating at run time ...
Someone knows how to tell me .. What would be the best solution for this problem? ...
Thank you from now any help ...
Update a component
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:
I do not know how you are doing your commit but you will have to make your vê load again ...
after your]
If you still do not give way do this in your bean, but it is very likely that the code above already solves
after your
getDBTransaction().commit();
there in your am
voCombo.executeQuery();
If you still do not give way do this in your bean, but it is very likely that the code above already solves
AdfFacesContext adfContext = AdfFacesContext.getCurrentInstance();
adfContext.addPartialTarget(bindingSelectOneChoice);
But if I do this ... he will insert on the bench twice will not go?
This is my button that inserts the data in the bank:
0]]
And this is the method he calls ...
Note: The Commit I give inside the procedure I called ..
This second option can be done even if the button is on a page and the component to be updated in another? ...
It has to be done in the Bean Button Inserts, right?
This is my button that inserts the data in the bank:
0]]
And this is the method he calls ...
public void gerar_os_transporte (
String wplaca,
int wid_user_motorista,
int wid_user_conferente,
String wobservacao
)
{
PreparedStatement plsqlBlock = null ;
String statement;
statement = "BEGIN pc_gerar_os_transporte(" +
":1,"+
":2," +
":3," +
":4 ) ;" +
"END;";
plsqlBlock = getDBTransaction().createPreparedStatement(statement,0);
try
{
plsqlBlock.setString(1,wplaca);
plsqlBlock.setInt(2,wid_user_motorista);
plsqlBlock.setInt(3,wid_user_conferente);
plsqlBlock.setString(4,wobservacao);
plsqlBlock.execute ();
}
.
.
.
This second option can be done even if the button is on a page and the component to be updated in another? ...
It has to be done in the Bean Button Inserts, right?
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:
Why do not you make a method in the bean that returns 'mount_transport' in the fianl and before call a method in the AM that makes your insert?!?!
and then simply call it in action
is not a good practice using actionlistener and action
as if the values ??of your ' Selectonechoice '?!?!!
Is not it by way of Vo and EO?!?!
and then simply call it in action
is not a good practice using actionlistener and action
as if the values ??of your ' Selectonechoice '?!?!!
Is not it by way of Vo and EO?!?!
ahh está .. about this td well ...
I even changed:
My Selectonechoice:
I even changed:
<af:commandButton
text="Gerar O.S. do Transporte"
disabled="#{!bindings[\'gerar_os_transporte\'].enabled}"
action="#{backing_OSTransporte.Gerar}"/>
public String Gerar() {
// Add event code here...
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("gerar_os_transporte");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
}
return "montagem_transporte";
}
<af:selectOneChoice value="#{bindings.wplaca1.inputValue}"
label="O.S." id="pesquisa_placa"
requiredMessageDetail="Selecione uma O.S.">
<f:selectItems value="#{bindings.wplaca1.items}"
id="valor_selecionado"/>
</af:selectOneChoice>
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:
My selector is based on your own form.
JSP
Page Definition
Where 'SECOOQSTVO1' is an instance of a vo in my am
then what I said to you do is
Soon after your insert
JSP
<af:selectOneChoice value="#{bindings.SeqsChvSecaoQst.inputValue}"
simple="true" disabled="false">
<af:forEach items="#{bindings.SecaoQstVO1.rangeSet}"
var="row">
<af:selectItem value="#{row.SeqsChvSecaoQst.sequenceNumber}"
label="#{row.SeqsNomSecao}"/>
</af:forEach>
</af:selectOneChoice>
<iterator id="SecaoQstVO1Iterator" RangeSize="-1" Binds="SecaoQstVO1"
DataControl="SegmentoClienteAMDataControl"/>
Where 'SECOOQSTVO1' is an instance of a vo in my am
then what I said to you do is
getSecaoQstVO1().executeQuery();
Hi Victor ...
I'm trying to do what you gave me ...
and even the JSP code and the paidefinition all right ... but ]
Where do you shoot this method:
?
I'm trying to do what you gave me ...
and even the JSP code and the paidefinition all right ... but ]
Where do you shoot this method:
getSecaoQstVO1()
-
- Moderador
- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:
getNomedoVO()
that you put on your am-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest