This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
1 Replies Last post: Mar 11, 2008 8:11 PM by Darya Shumilina  
Mauricio Kniz   2 posts since
Mar 8, 2008
Currently Being Moderated

Mar 8, 2008 4:22 AM

How can I call a backbase bean function after a 'confirmation component' yes button?

 

Here are the code. In this code when I click in the RemoveButton they create show de confirmation window, but after the yes button pressed they don´t call the backbase function of the command button

 

 

 

 

<q:tabbedPaneItem>

 

 

<f:facet name="tab">

 

 

<h:outputText value="Solicitação alteração"

 

 

styleClass="tab_name" />

 

 

</f:facet>

 

 

<q:foldingPanel>

 

 

<f:facet name="caption">

 

 

<h:outputText value="Marcações" />

 

 

</f:facet>

 

 

<table border="0" cellpadding="2" cellspacing="0">

 

 

<tr>

 

 

<td width="100%">

 

 

<table border="0" cellpadding="2" cellspacing="0">

 

 

<tr>

 

 

<td>

 

 

<q:dateChooser id="dcDefault" stylClass="defaultWidth"

 

 

dateFormat="medium"

 

 

value="#{WorkRecord.selectedSolDate}"

 

 

dayStyle="border: 1px solid white;" todayText="Hoje"

 

 

title="Seleção de data" noneText="Limpar"

 

 

disabled="#{WorkRecord.solDisabled == true}" />

 

 

</td>

 

 

<td>

 

 

<h:commandButton value="Atualizar" type="submit"

 

 

image="/images/calendarrefresh.png"

 

 

style="width: 24px; height: 24px"

 

 

disabled="#{WorkRecord.solDisabled == true}"

 

 

action="#{WorkRecord.doRefreshSolicitacao}">

 

 

</h:commandButton>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

<q:dataTable id="solTable" var="workHour"

 

 

value="#{WorkRecord.solHoraries}"

 

 

headerClass="tableHeader" cellpadding="2" cellspacing="0"

 

 

width="100%" border="0"

 

 

rolloverRowStyle="background: #f1f1f1;"

 

 

applyDefaultStyle="false">

 

 

<f:facet name="noDataMessage">

 

 

<h:outputText value="Nenhuma marcação efetuada" />

 

 

</f:facet>

 

 

 

 

<q:row condition="#{WorkRecord.addingOrEditingLink}">

 

 

<q:cell align="left">

 

 

<h:panelGrid

 

 

rendered="#{WorkRecord.addingOrEditingLink}"

 

 

columns="2"

 

 

style="width: 80px; background: #f8f8f8; border: 1px solid #bbbbbb; padding-left: 3px; white-space: nowrap;">

 

 

<h:outputText value="Horário:" />

 

 

<h:inputText value="#{workHour.mark}"

 

 

style="width: 60px">

 

 

<f:converter converterId="PubTimeConverter" />

 

 

<q:customValidator

 

 

clientFunction="return (value.length>0);"

 

 

detail="valor da data nao pode ser zero."

 

 

summary="Erro na validação do campo.">

 

 

</q:customValidator>

 

 

<q:customValidator

 

 

serverFunction="#{WorkRecord.testMark}"

 

 

detail="O valor digitado está incorreto"

 

 

summary="Validação dos campos de hora.">

 

 

</q:customValidator>

 

 

</h:inputText>

 

 

<h:outputText value="Justificativa:" />

 

 

<h:inputText value="#{workHour.justify}" id="justifyId">

 

 

<q:customValidator

 

 

clientFunction="return (value.length > 0);"

 

 

summary="A justificativa tem de ser informada"

 

 

detail="É necessário informar a justificativa para a troca de horário" />

 

 

<q:customValidator

 

 

serverFunction="#{WorkRecord.testJustificativa}"

 

 

detail="A justificativa tem de ser informada"

 

 

summary="É necessário informar a justificativa para a troca de horário" />

 

 

<q:floatingIconMessage for="justifyId" />

 

 

</h:inputText>

 

 

</h:panelGrid>

 

 

</q:cell>

 

 

<q:cell align="left">

 

 

<h:commandButton value="Save"

 

 

action="#{WorkRecord.saveSolicitacao}"

 

 

onclick="return q_validateFormById('marcacaoForm');"

 

 

styleClass="edit_remove" image="/images/save.png"

 

 

style="width: 16px; height: 16px;" />

 

 

</q:cell>

 

 

<q:cell align="left">

 

 

<h:commandButton value="Cancel"

 

 

action="#{WorkRecord.cancelSolicitacao}"

 

 

styleClass="edit_remove" image="/images/savecancel.png"

 

 

style="width: 16px; height: 16px;" />

 

 

</q:cell>

 

 

</q:row>

 

 

 

 

<q:column align="left" width="100%">

 

 

<f:facet name="header">

 

 

<h:outputText value="Marcação" />

 

 

</f:facet>

 

 

<h:outputText value="#{workHour.mark}">

 

 

<f:converter converterId="PubTimeConverter" />

 

 

</h:outputText>

 

 

</q:column>

 

 

<q:column align="left">

 

 

<h:commandButton value="Editar" type="submit"

 

 

image="/images/edit.png"

 

 

style="width: 16px; height: 16px"

 

 

disabled="#{WorkRecord.solDisabled == true}"

 

 

action="#{WorkRecord.doEditSolicitacao}">

 

 

</h:commandButton>

 

 

</q:column>

 

 

<q:column align="left">

 

 

<h:commandButton value="Remover" id="removeMarcacaoId"

 

 

image="/images/delete.png"

 

 

style="width: 16px; height: 16px"

 

 

disabled="#{WorkRecord.solDisabled == true}"

 

 

action="#{WorkRecord.doRemoveSolicitacao}"

 

 

onclick="q_runConfirmedFunctionByName('marcacaoForm:imageConfirm'); return false;"

 

 

>

 

 

</h:commandButton>

 

 

</q:column>

 

 

</q:dataTable>

 

 

<table border="0" cellspacing="4" cellpadding="0">

 

 

<tr>

 

 

<td>

 

 

<h:commandButton value="Adicionar" type="submit"

 

 

style="width: 80px"

 

 

disabled="#{WorkRecord.solDisabled == true}"

 

 

action="#{WorkRecord.doAddSolicitacao}">

 

 

</h:commandButton>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<q:confirmation id="imageConfirm"

 

 

invokerEventName="onclick" draggable="true"

 

 

invokerId="marcacaoForm:removeMarcacaoId"

 

 

captionStyle="font-size: 13px; color: black; font-weight: normal;"

 

 

captionText="Confirmação"

 

 

modalLayerClass="confirmationLayer"

 

 

okButtonText="Yes"

 

 

cancelButtonText="NO"

 

 

details="Pressione o botão 'Sim' para remover a marcação"

 

 

okButtonStyle="width: 85px; background: #d4d0c8; color: black;"

 

 

cancelButtonStyle="width: 85px; background: #d4d0c8; color: black;"

 

 

detailsStyle="color: #0e4966; font-family: Franclin Gothic;"

 

 

middleAreaStyle="font-size: 13px; color: #a48010;"

 

 

message="Remover esta marcação?" />

 

 

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</q:foldingPanel>

 

 

<br />

 

 

<q:foldingPanel>

 

 

<f:facet name="caption">

 

 

<h:outputText value="Solicitações" />

 

 

</f:facet>

 

 

</q:foldingPanel>

 

 

 

 

</q:tabbedPaneItem>

 

 

Darya Shumilina TeamDev Ltd. 24 posts since
Jan 4, 2007

Hello Mauricio,

 

Sorry for the answer delay. The information you provided is not enough to reproduce the problem. Please, provide us with the following information:

 

- The whole page on which we can reproduce the problem

- Backing bean

- Scenario to reproduce the problem

- Are there any JavaScript errors

- Are there any exceptions in the server log

- QuipuKit version

- JSF implementation and version

- Application server and version

- Your web.xml file

- Whether or not you are using Facelets, any other component libraries (such Richfaces, Tomahawk), JBoss Seam framework etc. Please also provide us with versions of used libraries

- If you are using Portlets, provide us with a portlet.xml file

 

It would be ideal if you can send us war-file that contains the reproducing example and more detailed description of the expected work scenario.

 

Regards,

Darya

More Like This

  • Retrieving data ...