Streaming live at 10am (PST)

Add the logic in javascript to call the webflow (to controller function) with return result


#1

Dear all,

I have below code in login. Could I add the logic in javascript to call the webflow (to controller function) with return result which will determine which popup dialog shown in login form when there is URL from email??

window.addEventListener('load', function (){
			var expired =  getQueryVariable('expired');
			var resetTeacherPwdExpired =  getQueryVariable('pwdexpired');
			var acctExist = getQueryVariable('acctExist');

			var result;
			// want to add logic to check in controller by ajax and spring web flow??		
			/// data-src="register-account/esta03?param1=expired&param2=resetTeacherPwdExpired&param3=acctExist ///

			if(result == '1'){
				PF('registerExpiredPopup').show();
			} else if(result == '2'){
				PF('resetTeacherPwdExpiredPopup').show();
			}else if (result == '3') {
				PF('acctExistPopup').show();
			} 
		});

// ----------------Login.xhtml popup dialog------------------------------------//

<p:dialog header="#{esLabel['lbl.common.lbl.information']}" id="registerExpiredPopup" widgetVar="registerExpiredPopup" modal="true" 
		appendTo="@(body)" resizable="false" width="30vw" position="center" onHide="reloadPage()" closeOnEscape="true">
			<p:outputLabel value="#{esLabel['lbl.estg01s1.expired']}" /> 
		</p:dialog>

		<p:dialog header="#{esLabel['lbl.common.lbl.information']}" id="resetTeacherPwdExpiredPopup" widgetVar="resetTeacherPwdExpiredPopup" modal="true"
			appendTo="@(body)" position="center" resizable="false" width="30vw" onHide="reloadPage()" closeOnEscape="true">
			<p:outputLabel value="#{esLabel['lbl.estg02s1.expired']}" /> 
		</p:dialog>
		
		<p:dialog header="#{esLabel['lbl.common.lbl.acctExist']}" id="acctExistPopup" widgetVar="acctExistPopup" modal="true"
			appendTo="@(body)" position="center" resizable="false" width="30vw" onHide="reloadPage()" closeOnEscape="true">
			<p:outputLabel value="#{esLabel['lbl.estg02s1.acctExist']}" /> 
		</p:dialog>

#2

This topic was automatically closed after 60 days. New replies are no longer allowed.