Custom ADF Application - OIM API and Account Claim Process

In this post, I will create a custom ADF application which uses OIM API to perform custom Identification logic and account claim process.


  1. User's Account is kept in Disable state at the start of the process.
  2. On the login page of OIM, provide a link for account claim process.
  3. Redirect the user to index.jsp of the custom ADF App.
  4. Forward the Account Claim page where the user provides UID, PIN, DOB and zip code.
  5. Verify all 4 values in OIM if true then forward the Change Password Page where in the challenge question are already set.
  6. User provides answers and claims the account by providing a new password in next page
  7. Failure conditions are :-
    1. No User Found with the UID.
    2. Multiple Users Found
    3. Account is already Claimed by some other user
    4. Failure in Account Claim because of failure in providing correct UID, PIN, DOB or zip code.
  8. After Claim, User account is enabled by OIM API.
  9. User is redirected back to the OIM's default login page where in he can login with the new password that he has set in step 6.
adfc-config.xml is the controller which holds together everything ADF applications.

1 <?xml version="1.0" encoding="windows-1252" ?>
  2 <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
  3   <view id="AccountClaim">
  4     <page>/view1.jspx</page>
  5   </view>
  6   <view id="view2">
  7     <page>/view2.jspx</page>
  8   </view>
  9   <view id="view3">
 10     <page>/view3.jspx</page>
 11   </view>
 12   <view id="view4">
 13     <page>/view4.jspx</page>
 14   </view>
 15   <view id="view5">
 16     <page>/view5.jspx</page>
 17   </view>
 18   <view id="ChangePassword">
 19     <page>/ChangePassword.jspx</page>
 20   </view>
 21   <view id="ClaimSuccess">
 22     <page>/ClaimSuccess.jspx</page>
 23   </view>
 24   <control-flow-rule id="__5">
 25     <from-activity-id id="__6">AccountClaim</from-activity-id>
 26     <control-flow-case id="__15">
 27       <from-outcome id="__20">false</from-outcome>
 28       <to-activity-id id="__14">AccountClaim</to-activity-id>
 29     </control-flow-case>
 30     <control-flow-case id="__22">
 31       <from-outcome id="__23">cancel</from-outcome>
 32       <to-activity-id id="__21">view3</to-activity-id>
 33     </control-flow-case>
 34     <control-flow-case id="__7">
 35       <from-outcome id="__9">true</from-outcome>
 36       <to-activity-id id="__8">ChangePassword</to-activity-id>
 37     </control-flow-case>
 38   </control-flow-rule>
 39   <control-flow-rule id="__17">
 40     <from-activity-id id="__16">*</from-activity-id>
 41     <control-flow-case id="__19">
 42       <to-activity-id id="__18">AccountClaim</to-activity-id>
 43     </control-flow-case>
 44   </control-flow-rule>
 45   <control-flow-rule id="__53">
 46     <from-activity-id id="__54">ChangePassword</from-activity-id>
 47     <control-flow-case id="__55">
 48       <from-outcome id="__57">true</from-outcome>
 49       <to-activity-id id="__56">ClaimSuccess</to-activity-id>
 50     </control-flow-case>
 51     <control-flow-case id="__59">
 52       <from-outcome id="__60">false</from-outcome>
 53       <to-activity-id id="__58">view3</to-activity-id>
 54     </control-flow-case>
 55     <control-flow-case id="__62">
 56       <from-outcome id="__63">NO_USER_FOUND</from-outcome>
 57       <to-activity-id id="__61">view4</to-activity-id>
 58     </control-flow-case>
 59     <control-flow-case id="__64">
 60       <from-outcome id="__66">CLAIMED_EARLIER</from-outcome>
 61       <to-activity-id id="__65">view2</to-activity-id>
 62     </control-flow-case>
 63     <control-flow-case id="__68">
 64       <from-outcome id="__69">MULTIPLE_USER_FOUND</from-outcome>
 65       <to-activity-id id="__67">view5</to-activity-id>
 66     </control-flow-case>
 67   </control-flow-rule>
 68   <managed-bean id="__1">
 69     <managed-bean-name id="__2">backing_view1</managed-bean-name>
 70     <managed-bean-class id="__4">view.resources.backing.View1</managed-bean-class>
 71     <managed-bean-scope id="__3">backingBean</managed-bean-scope>
 72     <!--oracle-jdev-comment:managed-bean-jsp-link:1view1.jspx-->
 73   </managed-bean>
 74   <managed-bean id="__10">
 75     <managed-bean-name id="__12">backing_view2</managed-bean-name>
 76     <managed-bean-class id="__11">view.resources.backing.View2</managed-bean-class>
 77     <managed-bean-scope id="__13">backingBean</managed-bean-scope>
 78     <!--oracle-jdev-comment:managed-bean-jsp-link:1view2.jspx-->
 79   </managed-bean>
 80   <managed-bean id="__35">
 81     <managed-bean-name id="__37">backing_view4</managed-bean-name>
 82     <managed-bean-class id="__34">view.resources.backing.View4</managed-bean-class>
 83     <managed-bean-scope id="__36">backingBean</managed-bean-scope>
 84     <!--oracle-jdev-comment:managed-bean-jsp-link:1view4.jspx-->
 85   </managed-bean>
 86   <managed-bean id="__44">
 87     <managed-bean-name id="__41">backing_view5</managed-bean-name>
 88     <managed-bean-class id="__43">view.resources.backing.View5</managed-bean-class>
 89     <managed-bean-scope id="__42">backingBean</managed-bean-scope>
 90     <!--oracle-jdev-comment:managed-bean-jsp-link:1view5.jspx-->
 91   </managed-bean>
 92   <managed-bean id="__46">
 93     <managed-bean-name id="__47">backing_ChangePassword</managed-bean-name>
 94     <managed-bean-class id="__45">view.resources.backing.ChangePassword</managed-bean-class>
 95     <managed-bean-scope id="__48">backingBean</managed-bean-scope>
 96     <!--oracle-jdev-comment:managed-bean-jsp-link:1ChangePassword.jspx-->
 97   </managed-bean>
 98   <managed-bean id="__51">
 99     <managed-bean-name id="__50">challengeQnABean</managed-bean-name>
100     <managed-bean-class id="__49">view.resources.backing.ChallengeQnABean</managed-bean-class>
101     <managed-bean-scope id="__52">none</managed-bean-scope>
102   </managed-bean>
103 </adfc-config>
104 


java code for OIMOperator.java which embeds the backend OIM API.


1 package view.resources.backing;
  2 
  3 import java.util.ArrayList;
  4 import java.util.Arrays;
  5 
  6 import oracle.iam.platform.OIMClient;
  7 
  8 import java.util.Hashtable;
  9 import java.util.List;
 10 
 11 import java.util.Map;
 12 
 13 import javax.security.auth.login.LoginException;
 14 
 15 import oracle.iam.identity.usermgmt.api.UserManager;
 16 import oracle.iam.selfservice.self.selfmgmt.api.AuthenticatedSelfService;
 17 import oracle.iam.identity.usermgmt.api.UserManager;
 18 import oracle.iam.identity.usermgmt.vo.User;
 19 import oracle.iam.identity.usermgmt.vo.UserManagerResult;
 20 import oracle.iam.platform.OIMClient;
 21 import oracle.iam.platform.Role;
 22 import oracle.iam.selfservice.exception.AuthSelfServiceException;
 23 
 24 import oracle.iam.selfservice.uself.uselfmgmt.api.UnauthenticatedSelfService;
 25 
 26 import static view.resources.backing.PropertyLoader.oimURL;
 27 
 28 public class OIMOperator {
 29 
 30     private OIMClient client = null;
 31     private String className = this.getClass().getSimpleName();
 32     private boolean error = false;
 33 
 34     OIMOperator(String user, String password) {
 35         setOIMClient(oimURL);
 36         login(user, password);
 37     }
 38 
 39     private void enter(String method) {
 40         System.out.println("Entering  " + method + " of class " + className);
 41     }
 42 
 43     private void exit(String method) {
 44         System.out.println("Exiting  " + method + " of class " + className);
 45     }
 46 
 47     AuthenticatedSelfService getAuthenticatedSelfService() {
 48         String method =
 49             Thread.currentThread().getStackTrace()[1].getMethodName();
 50         enter(method);
 51         AuthenticatedSelfService service = null;
 52         try {
 53             service = client.getService(AuthenticatedSelfService.class);
 54         } catch (Exception e) {
 55             e.printStackTrace();
 56             System.out.println("e.toString() ->" + e.toString());
 57             System.out.println("e.getMessage() ->" + e.getMessage());
 58           setError(true);
 59         }
 60         exit(method);
 61         return service;
 62     }
 63 
 64     UnauthenticatedSelfService getUnauthenticatedSelfService() {
 65         String method =
 66             Thread.currentThread().getStackTrace()[1].getMethodName();
 67         enter(method);
 68         UnauthenticatedSelfService service = null;
 69         try {
 70             service = client.getService(UnauthenticatedSelfService.class);
 71         } catch (Exception e) {
 72   
 73           e.printStackTrace();
 74           System.out.println("e.toString() ->" + e.toString());
 75           System.out.println("e.getMessage() ->" + e.getMessage());
 76           setError(true);
 77         }
 78         exit(method);
 79         return service;
 80     }
 81 
 82 
 83     UserManager getUserManager() {
 84         String method =
 85             Thread.currentThread().getStackTrace()[1].getMethodName();
 86         enter(method);
 87         UserManager service = null;
 88         try {
 89             service = client.getService(UserManager.class);
 90         } catch (Exception e) {
 91           e.printStackTrace();
 92           System.out.println("e.toString() ->" + e.toString());
 93           System.out.println("e.getMessage() ->" + e.getMessage());
 94           setError(true);
 95         }
 96         exit(method);
 97         return service;
 98     }
 99 
100 
101     public List<String> getChallengeAnswersAsList() {
102         return getChallengeQnAasList();
103     }
104 
105     private List<String> getSArrayToList(String[] s_arr) {
106         List<String> list = new ArrayList<String>(Arrays.asList(s_arr));
107         return list;
108     }
109 
110     String[] getChallengeQnA() {
111 
112         String method =
113             Thread.currentThread().getStackTrace()[1].getMethodName();
114         enter(method);
115         String[] CnA = null;
116         try {
117             AuthenticatedSelfService service = getAuthenticatedSelfService();
118             CnA = service.getSystemChallengeQuestions();
119         } catch (Exception e) {
120           e.printStackTrace();
121           System.out.println("e.toString() ->" + e.toString());
122           System.out.println("e.getMessage() ->" + e.getMessage());
123           setError(true);
124         }
125         exit(method);
126         return CnA;
127     }
128 
129     private List<String> getChallengeQnAasList() {
130         List<String> CnAList = null;
131         String method = "";
132         try {
133             method = Thread.currentThread().getStackTrace()[1].getMethodName();
134             enter(method);
135             AuthenticatedSelfService service = getAuthenticatedSelfService();
136             String[] CnA;
137             CnA = service.getSystemChallengeQuestions();
138             CnAList = getSArrayToList(CnA);
139 
140         } catch (Exception e) {
141           e.printStackTrace();
142           System.out.println("e.toString() ->" + e.toString());
143           System.out.println("e.getMessage() ->" + e.getMessage());
144           setError(true);
145         }
146         exit(method);
147         return CnAList;
148     }
149 
150 
151     private void setOIMClient(String oimURL) {
152         String method =
153             Thread.currentThread().getStackTrace()[1].getMethodName();
154         enter(method);
155         try {
156             Hashtable env = new Hashtable();
157             env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL,
158                     OIMClient.WLS_CONTEXT_FACTORY);
159             env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, oimURL);
160             client = new OIMClient(env);
161         } catch (Exception e) {
162             e.printStackTrace();
163             System.out.println("e.toString() ->" + e.toString());
164             System.out.println("e.getMessage() ->" + e.getMessage());
165             setError(true);
166         }
167         exit(method);
168 
169     }
170 
171     private void login(String user, String password) {
172         String method =
173             Thread.currentThread().getStackTrace()[1].getMethodName();
174         enter(method);
175         try {
176             System.out.println("Before Login");
177             client.login(user, password.toCharArray());
178             System.out.println("After Login");
179         } catch (Exception e) {
180             e.printStackTrace();
181             System.out.println("e.toString() ->" + e.toString());
182             System.out.println("e.getMessage() ->" + e.getMessage());
183             setError(true);
184         }
185         exit(method);
186     }
187 
188     void logout() {
189         String method =
190             Thread.currentThread().getStackTrace()[1].getMethodName();
191         enter(method);
192         try {
193             if (client != null)
194                 client.logout();
195         } catch (Exception e) {
196             e.printStackTrace();
197             System.out.println("e.toString() ->" + e.toString());
198             System.out.println("e.getMessage() ->" + e.getMessage());
199         }
200         exit(method);
201     }
202 
203     boolean resetPassword(String username, Map<String, Object> quesAnsMap,
204                           String password) {
205         String method =
206             Thread.currentThread().getStackTrace()[1].getMethodName();
207         enter(method);
208         boolean flag = false;
209         try {
210             flag =
211 getUnauthenticatedSelfService().resetPassword(username, quesAnsMap,
212                                               password.toCharArray());
213         } catch (Exception e) {
214           e.printStackTrace();
215           System.out.println("e.toString() ->" + e.toString());
216           System.out.println("e.getMessage() ->" + e.getMessage());
217           setError(true);
218         }
219         exit(method);
220 
221         return flag;
222 
223     }
224 
225     boolean setChallengeQnAValues(Map<String, Object> quesAnsMap) {
226         String method =
227             Thread.currentThread().getStackTrace()[1].getMethodName();
228         enter(method);
229         boolean flag = false;
230         try {
231             getAuthenticatedSelfService().setChallengeValues(quesAnsMap);
232             flag = true;
233         } catch (Exception e) {
234           e.printStackTrace();
235           System.out.println("e.toString() ->" + e.toString());
236           System.out.println("e.getMessage() ->" + e.getMessage());
237           setError(true);
238         }
239         exit(method);
240 
241         return flag;
242 
243     }
244 
245     boolean changePassword(String oldPwd, String newPwd, String confirmPwd) {
246         String method =
247             Thread.currentThread().getStackTrace()[1].getMethodName();
248         enter(method);
249         boolean flag = false;
250         try {
251             getAuthenticatedSelfService().changePassword(oldPwd.toCharArray(),
252                                                          newPwd.toCharArray(),
253                                                          confirmPwd.toCharArray());
254             flag = true;
255         } catch (Exception e) {
256           e.printStackTrace();
257           System.out.println("e.toString() ->" + e.toString());
258           System.out.println("e.getMessage() ->" + e.getMessage());
259           setError(true);
260         }
261         exit(method);
262         return flag;
263     }
264 
265     boolean setChallengeValues(Map<String, Object> quesAnsMap) {
266         String method =
267             Thread.currentThread().getStackTrace()[1].getMethodName();
268         enter(method);
269         boolean flag = false;
270         try {
271             getAuthenticatedSelfService().setChallengeValues(quesAnsMap);
272             flag = true;
273         } catch (Exception e) {
274           e.printStackTrace();
275           System.out.println("e.toString() ->" + e.toString());
276           System.out.println("e.getMessage() ->" + e.getMessage());
277           setError(true);
278         }
279         exit(method);
280         return flag;
281     }
282 
283 
284     public void setError(boolean error) {
285         this.error = error;
286     }
287 
288     public boolean isError() {
289         return error;
290     }
291 }
292 



ChallengeQnABean

 1 package view.resources.backing;
  2 
  3 import javax.faces.model.SelectItem;
  4 
  5 import static view.resources.backing.PropertyLoader.admin;
  6 import static view.resources.backing.PropertyLoader.password;
  7 
  8 public class ChallengeQnABean {
  9     public ChallengeQnABean() {
 10         super();
 11     }
 12 
 13     private SelectItem[] selectItems;
 14     //    private String quesValue1;
 15     //    private String quesValue2;
 16     //    private String quesValue3;
 17     //
 18     //    private String ansValue1;
 19     //    private String ansValue2;
 20     //    private String ansValue3;
 21     private String className = this.getClass().getSimpleName();
 22 
 23     private void enter(String method) {
 24         System.out.println("Entering  " + method + " of class " + className);
 25     }
 26 
 27     private void exit(String method) {
 28         System.out.println("Exiting  " + method + " of class " + className);
 29     }
 30 
 31 
 32     private String[] loadQnA() {
 33         String method =
 34             Thread.currentThread().getStackTrace()[1].getMethodName();
 35         enter(method);
 36         boolean flag = false;
 37         String[] cNa = null;
 38         try {
 39             OIMOperator oim = new OIMOperator(admin, password);
 40             cNa = oim.getChallengeQnA();
 41             oim.logout();
 42         } catch (Exception e) {
 43             e.printStackTrace();
 44             System.out.println("e.toString() ->" + e.toString());
 45             System.out.println("e.getMessage() ->" + e.getMessage());
 46         }
 47         exit(method);
 48         return cNa;
 49     }
 50 
 51 
 52     public SelectItem[] getSelectItems() {
 53          String[] cNa = loadQnA();
 54         if (selectItems == null) {
 55             selectItems = new SelectItem[cNa.length];
 56             for (int i = 0; i < cNa.length; i++) {
 57                 selectItems[i] = new SelectItem(cNa[i], cNa[i], null, false);
 58             }
 59         }
 60 
 61         return selectItems;
 62     }
 63 
 64 }

Backing Bean for Change Password Bean after the Identity has been verified.

1 package view.resources.backing;
  2 
  3 import java.util.Date;
  4 import java.util.HashMap;
  5 import java.util.List;
  6 import java.util.Map;
  7 
  8 import javax.faces.application.FacesMessage;
  9 import javax.faces.component.UIComponent;
 10 import javax.faces.component.UISelectItems;
 11 import javax.faces.context.ExternalContext;
 12 import javax.faces.context.FacesContext;
 13 import javax.faces.validator.ValidatorException;
 14 
 15 import javax.servlet.http.HttpServletResponse;
 16 
 17 import javax.servlet.http.HttpSession;
 18 
 19 import model.UpdateDb;
 20 
 21 import oracle.adf.share.ADFContext;
 22 import oracle.adf.view.rich.component.rich.RichDocument;
 23 import oracle.adf.view.rich.component.rich.RichForm;
 24 import oracle.adf.view.rich.component.rich.input.RichInputListOfValues;
 25 import oracle.adf.view.rich.component.rich.input.RichInputText;
 26 import oracle.adf.view.rich.component.rich.input.RichSelectItem;
 27 import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
 28 import oracle.adf.view.rich.component.rich.layout.RichPanelFormLayout;
 29 import oracle.adf.view.rich.component.rich.layout.RichPanelGroupLayout;
 30 import oracle.adf.view.rich.component.rich.layout.RichPanelHeader;
 31 import oracle.adf.view.rich.component.rich.layout.RichPanelLabelAndMessage;
 32 import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
 33 import oracle.adf.view.rich.component.rich.output.RichOutputLabel;
 34 import oracle.adf.view.rich.component.rich.output.RichSeparator;
 35 
 36 import oracle.iam.identity.usermgmt.api.UserManager;
 37 import oracle.iam.identity.usermgmt.vo.User;
 38 import oracle.iam.identity.usermgmt.vo.UserManagerResult;
 39 
 40 import org.apache.myfaces.trinidad.component.UIXGroup;
 41 
 42 import static view.resources.backing.PropertyLoader.admin;
 43 import static view.resources.backing.PropertyLoader.password;
 44 import static view.resources.backing.PropertyLoader.oimLogin;
 45 
 46 
 47 public class ChangePassword {
 48     private RichForm f1;
 49     private RichDocument d1;
 50     private RichInputText it1;
 51     private UIXGroup g1;
 52     private RichInputText it2;
 53     private RichInputText it3;
 54     private RichSeparator s1;
 55     private RichOutputLabel ol1;
 56     private RichInputListOfValues ilov1;
 57     private RichSelectOneChoice soc1;
 58     private RichSelectItem si1;
 59     private List challengeQnA;
 60     private RichSelectOneChoice soc2;
 61     private UISelectItems si2;
 62     private RichSelectOneChoice soc3;
 63     private UISelectItems si3;
 64     private RichCommandButton cb1;
 65     private RichCommandButton cb2;
 66     private RichInputText it5;
 67     private RichInputText it6;
 68     private RichInputText it7;
 69     private String className = this.getClass().getSimpleName();
 70     private RichPanelFormLayout pfl1;
 71     private RichPanelLabelAndMessage plam1;
 72     private RichPanelFormLayout pfl2;
 73     private UIXGroup g2;
 74 
 75     private RichPanelLabelAndMessage plam2;
 76     private UIXGroup g3;
 77 
 78     private RichPanelGroupLayout pgl4;
 79 //    private UIXGroup g1;
 80     private RichPanelHeader ph1;
 81     private RichPanelLabelAndMessage plam3;
 82     private RichInputText it4;
 83     private RichInputText it8;
 84     private RichInputText it9;
 85     private UIXGroup g4;
 86     private RichPanelLabelAndMessage plam4;
 87     private RichPanelGroupLayout pgl1;
 88     private RichSelectOneChoice soc4;
 89     private UISelectItems si4;
 90     private RichInputText it10;
 91     private RichPanelGroupLayout pgl2;
 92     private RichSelectOneChoice soc5;
 93     private UISelectItems si5;
 94     private RichInputText it11;
 95     private RichPanelGroupLayout pgl3;
 96     private RichSelectOneChoice soc6;
 97     private UISelectItems si6;
 98     private RichInputText it12;
 99     private UIXGroup g5;
100     private RichPanelGroupLayout pgl5;
101     private RichCommandButton cb3;
102     private RichCommandButton cb4;
103     private RichPanelHeader ph2;
104 //    private RichPanelFormLayout pfl2;
105     private RichPanelFormLayout pfl3;
106     //    private RichGoImageLink gil1;
107 
108     public void setF1(RichForm f1) {
109         this.f1 = f1;
110     }
111 
112     public RichForm getF1() {
113         return f1;
114     }
115 
116     public void setD1(RichDocument d1) {
117         this.d1 = d1;
118     }
119 
120     public RichDocument getD1() {
121         return d1;
122     }
123 
124     public void setIt1(RichInputText it1) {
125         this.it1 = it1;
126     }
127 
128     public RichInputText getIt1() {
129         return it1;
130     }
131 
132     public void setG1(UIXGroup g1) {
133         this.g1 = g1;
134     }
135 
136     public UIXGroup getG1() {
137         return g1;
138     }
139 
140     public void setIt2(RichInputText it2) {
141         this.it2 = it2;
142     }
143 
144     public RichInputText getIt2() {
145         return it2;
146     }
147 
148     public void setIt3(RichInputText it3) {
149         this.it3 = it3;
150     }
151 
152     public RichInputText getIt3() {
153         return it3;
154     }
155 
156     public void setS1(RichSeparator s1) {
157         this.s1 = s1;
158     }
159 
160     public RichSeparator getS1() {
161         return s1;
162     }
163 
164     public void setOl1(RichOutputLabel ol1) {
165         this.ol1 = ol1;
166     }
167 
168     public RichOutputLabel getOl1() {
169         return ol1;
170     }
171 
172     public void setIlov1(RichInputListOfValues ilov1) {
173         this.ilov1 = ilov1;
174     }
175 
176     public RichInputListOfValues getIlov1() {
177         return ilov1;
178     }
179 
180     public void setSoc1(RichSelectOneChoice soc1) {
181         this.soc1 = soc1;
182     }
183 
184     public RichSelectOneChoice getSoc1() {
185         return soc1;
186     }
187 
188     public void setSi1(RichSelectItem si1) {
189         this.si1 = si1;
190     }
191 
192     public RichSelectItem getSi1() {
193         return si1;
194     }
195 
196     public void setChallengeQnA(List challengeQnA) {
197         this.challengeQnA = challengeQnA;
198     }
199 
200     public List getChallengeQnA() {
201         OIMOperator oim = new OIMOperator(admin, password);
202         return oim.getChallengeAnswersAsList();
203         //        return challengeQnA;
204     }
205 
206     public void setSoc2(RichSelectOneChoice soc2) {
207         this.soc2 = soc2;
208     }
209 
210     public RichSelectOneChoice getSoc2() {
211         return soc2;
212     }
213 
214     public void setSi2(UISelectItems si2) {
215         this.si2 = si2;
216     }
217 
218     public UISelectItems getSi2() {
219         return si2;
220     }
221 
222     public void setSoc3(RichSelectOneChoice soc3) {
223         this.soc3 = soc3;
224     }
225 
226     public RichSelectOneChoice getSoc3() {
227         return soc3;
228     }
229 
230     public void setSi3(UISelectItems si3) {
231         this.si3 = si3;
232     }
233 
234     public UISelectItems getSi3() {
235         return si3;
236     }
237 
238     public void setCb1(RichCommandButton cb1) {
239         this.cb1 = cb1;
240     }
241 
242     public RichCommandButton getCb1() {
243         return cb1;
244     }
245 
246     public void setCb2(RichCommandButton cb2) {
247         this.cb2 = cb2;
248     }
249 
250     public RichCommandButton getCb2() {
251         return cb2;
252     }
253 
254     private void enter(String method) {
255         System.out.println("Entering  " + method + " of class " + className);
256     }
257 
258     private void exit(String method) {
259         System.out.println("Exiting  " + method + " of class " + className);
260     }
261 
262     private String getFromSession(String attr) {
263         String method =
264             Thread.currentThread().getStackTrace()[1].getMethodName();
265         enter(method);
266         String value = "";
267         try {
268             ADFContext adfCtx = ADFContext.getCurrent();
269             Map session = adfCtx.getSessionScope();
270             value = (String)session.get(attr);
271             System.out.println("retrived from session -> " + value);
272         } catch (Exception e) {
273             e.printStackTrace();
274         }
275         exit(method);
276         return value;
277     }
278 
279     public String cb1_action() {
280         String response = "false";
281         String method =
282             Thread.currentThread().getStackTrace()[1].getMethodName();
283         enter(method);
284         try {
285             String oimUserName = getFromSession("username");
286             System.out.println("oimUserName ->" + oimUserName);
287             String mail = getFromSession("email");
288             System.out.println("mail ->" + mail);
289             String oldPassword = it1.getValue().toString();
290             System.out.println("oldPassword ->" + oldPassword);
291             String newPassword = it2.getValue().toString();
292             System.out.println("newPassword ->" + newPassword);
293 
294             //Update the user in DB first and then proceed
295             UpdateDb updateDB = new UpdateDb();
296 
297             String dbResult = updateDB.updateClaimTable(oimUserName, mail);
298             System.out.println("dbResult -> " + dbResult);
299 
300             if (dbResult.equalsIgnoreCase("CLAIMED")) {
301                 String q1 = soc1.getValue().toString();
302                 System.out.println("q1 ->" + q1);
303                 String q2 = soc2.getValue().toString();
304                 System.out.println("q2 ->" + q2);
305                 String q3 = soc3.getValue().toString();
306                 System.out.println("q3 ->" + q3);
307 
308                 Object a1 = it5.getValue();
309                 System.out.println("a1 ->" + a1);
310                 Object a2 = it6.getValue();
311                 System.out.println("a2 ->" + a2);
312                 Object a3 = it7.getValue();
313                 System.out.println("a3 ->" + a3);
314                 System.out.println("enable the user first so that he can login");
315                 boolean isEnabledNow =
316                     enableUser(oimUserName); //Enable the user first
317                 System.out.println(" isEnabledNow-> Modifed the flow -> " +
318                                    isEnabledNow);
319 
320                 OIMOperator useroim =
321                     new OIMOperator(oimUserName, oldPassword);
322                 Map<String, Object> quesAnsMap = new HashMap<String, Object>();
323                 quesAnsMap.put(q1, a1);
324                 quesAnsMap.put(q2, a2);
325                 quesAnsMap.put(q3, a3);
326 
327                 if (isEnabledNow) {
328                     boolean chgPass, chgQnA = false;
329                     chgPass =
330                             useroim.changePassword(oldPassword, newPassword, newPassword);
331                     System.out.println("chgPass -> " + chgPass);
332                     if (chgPass) {
333                         chgQnA = useroim.setChallengeValues(quesAnsMap);
334                         System.out.println("chgQnA -> " + chgQnA);
335                         boolean isErrorInOIM = useroim.isError();
336                         System.out.println(" isErrorInOIM -> " + isErrorInOIM);
337                     }
338                     if (chgPass && chgQnA) {
339                         System.out.println(" Both Password Changed as well as Challenge QnA set-> ");
340                         response = "true";
341                     }
342                 }
343                 boolean isUserOimError = useroim.isError();
344                 if (isUserOimError) {
345                     disableUser(oimUserName);
346                 }
347                 useroim.logout();
348                 //                boolean isEndDateSet = setEndDate(oimUserName);
349                 //                System.out.println("isEndDateSet -> " + isEndDateSet);
350 
351                 FacesContext ctx = FacesContext.getCurrentInstance();
352                 System.out.println("ctx ->" + ctx);
353                 ExternalContext ectx = ctx.getExternalContext();
354                 System.out.println("ectx ->" + ectx);
355 
356                 HttpServletResponse hresponse;
357                 hresponse = (HttpServletResponse)ectx.getResponse();
358                 HttpSession session = (HttpSession)ectx.getSession(false);
359                 session.invalidate();
360                 hresponse.sendRedirect(oimLogin);
361                 ctx.responseComplete();
362                 System.out.println("Exiting  cb1_action () Aug 08->");
363             } else {
364                 response = dbResult;
365             }
366             System.out.println("Exiting  cb1_action () Aug 08->");
367 
368 
369         } catch (Exception e) {
370             e.printStackTrace();
371         }
372         exit(method);
373         return response;
374     }
375 
376 
377     private boolean setEndDate(String oimUserName) {
378         String method =
379             Thread.currentThread().getStackTrace()[1].getMethodName();
380         enter(method);
381         boolean isEndSet = false;
382 
383         try {
384             OIMOperator systemoim = new OIMOperator(admin, password);
385             UserManager usersvc = systemoim.getUserManager();
386             User user = usersvc.getDetails(oimUserName, null, true);
387             user.setEndDate(null);
388             UserManagerResult umr = usersvc.modify(user);
389             String status = umr.getStatus();
390             if (status.equalsIgnoreCase("COMPLETED")) {
391                 System.out.println("endDate set successfully");
392                 isEndSet = true;
393             } else {
394                 System.out.println("endDate not set  -> ");
395             }
396 
397             systemoim.logout();
398         } catch (Exception e) {
399             System.out.println("e.getMessage() ->" + e.getMessage());
400             e.printStackTrace();
401         }
402         exit(method);
403         return isEndSet;
404     }
405 
406     private boolean disableUser(String uid) {
407         String method =
408             Thread.currentThread().getStackTrace()[1].getMethodName();
409         enter(method);
410         boolean flag = false;
411         try {
412             OIMOperator oim = new OIMOperator(admin, password);
413             UserManagerResult umr = null;
414             UserManager usersvc = oim.getUserManager();
415             User user = usersvc.getDetails(uid, null, true);
416             if (user.getUserDisabled().equalsIgnoreCase("0")) {
417                 umr = usersvc.disable(uid, true);
418             }
419             String status = "";
420             if (umr != null)
421                 status = umr.getStatus();
422             System.out.println("status ->" + status);
423             if (status.equalsIgnoreCase("COMPLETED")) {
424                 flag = true;
425             }
426             oim.logout();
427         } catch (Exception e) {
428             e.printStackTrace();
429             System.out.println("e.toString() ->" + e.toString());
430             System.out.println("e.getMessage() ->" + e.getMessage());
431         }
432         exit(method);
433         return flag;
434     }
435 
436     private boolean enableUser(String uid) {
437         String method =
438             Thread.currentThread().getStackTrace()[1].getMethodName();
439         enter(method);
440         boolean flag = false;
441         try {
442             OIMOperator oim = new OIMOperator(admin, password);
443             UserManagerResult umr = null;
444             UserManager usersvc = oim.getUserManager();
445             User user = usersvc.getDetails(uid, null, true);
446             if (user.getUserDisabled().equalsIgnoreCase("1")) {
447                 umr = usersvc.enable(uid, true);
448             }
449             String status = "";
450             if (umr != null)
451                 status = umr.getStatus();
452             System.out.println("status ->" + status);
453             if (status.equalsIgnoreCase("COMPLETED")) {
454                 flag = true;
455             }
456             oim.logout();
457         } catch (Exception e) {
458             e.printStackTrace();
459             System.out.println("e.toString() ->" + e.toString());
460             System.out.println("e.getMessage() ->" + e.getMessage());
461         }
462         exit(method);
463         return flag;
464     }
465 
466     public String cb2_action() {
467         // Add event code here...
468         return null;
469     }
470 
471 
472     public void setIt5(RichInputText it5) {
473         this.it5 = it5;
474     }
475 
476     public RichInputText getIt5() {
477         return it5;
478     }
479 
480     public void setIt6(RichInputText it6) {
481         this.it6 = it6;
482     }
483 
484     public RichInputText getIt6() {
485         return it6;
486     }
487 
488     public void setIt7(RichInputText it7) {
489         this.it7 = it7;
490     }
491 
492     public RichInputText getIt7() {
493         return it7;
494     }
495 
496     public void it3_validator(FacesContext facesContext,
497                               UIComponent uIComponent, Object object) {
498 
499         String rit3 = (String)object;
500         System.out.println("rit3 ->" + rit3);
501         RichInputText rit2 = getIt2();
502         String rit2_s = (String)rit2.getValue();
503         System.out.println(" rit2_s ->" + rit2_s);
504         if (!(rit3.equalsIgnoreCase(rit2_s))) {
505             throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
506                                                           "New Password and Confirm New Password do not match.",
507                                                           null));
508         }
509     }
510 
511     public void it7_validator(FacesContext facesContext,
512                               UIComponent uIComponent, Object object) {
513         String rit7 = (String)object;
514         System.out.println("rit7 ->" + rit7);
515 
516         RichInputText rit5 = getIt5();
517         String rit5_s = (String)rit5.getValue();
518         System.out.println(" rit5_s ->" + rit5_s);
519 
520         RichInputText rit6 = getIt6();
521         String rit6_s = (String)rit6.getValue();
522         System.out.println(" rit6_s ->" + rit6_s);
523 
524         boolean a = rit7.equalsIgnoreCase(rit5_s);
525         boolean b = rit7.equalsIgnoreCase(rit6_s);
526         boolean c = rit5_s.equalsIgnoreCase(rit6_s);
527         if (a || b || c) {
528             throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
529                                                           "All Answers should be uniquely set.",
530                                                           null));
531         }
532     }
533 
534 
535     public void setPfl1(RichPanelFormLayout pfl1) {
536         this.pfl1 = pfl1;
537     }
538 
539     public RichPanelFormLayout getPfl1() {
540         return pfl1;
541     }
542 
543     public void setPlam1(RichPanelLabelAndMessage plam1) {
544         this.plam1 = plam1;
545     }
546 
547     public RichPanelLabelAndMessage getPlam1() {
548         return plam1;
549     }
550 
551     public void setPfl2(RichPanelFormLayout pfl2) {
552         this.pfl2 = pfl2;
553     }
554 
555     public RichPanelFormLayout getPfl2() {
556         return pfl2;
557     }
558 
559     public void setG2(UIXGroup g2) {
560         this.g2 = g2;
561     }
562 
563     public UIXGroup getG2() {
564         return g2;
565     }
566 
567 
568     public void setPlam2(RichPanelLabelAndMessage plam2) {
569         this.plam2 = plam2;
570     }
571 
572     public RichPanelLabelAndMessage getPlam2() {
573         return plam2;
574     }
575 
576     public void setG3(UIXGroup g3) {
577         this.g3 = g3;
578     }
579 
580     public UIXGroup getG3() {
581         return g3;
582     }
583 
584 
585     public void setPgl4(RichPanelGroupLayout pgl4) {
586         this.pgl4 = pgl4;
587     }
588 
589     public RichPanelGroupLayout getPgl4() {
590         return pgl4;
591     }
592 
593     public void soc3_validator(FacesContext facesContext,
594                                UIComponent uIComponent, Object object) {
595 
596         String soc3 = (String)object;
597         System.out.println(" soc3 -> " + soc3);
598 
599         RichSelectOneChoice soc1 = getSoc1();
600         String soc1_s = (String)soc1.getValue();
601         System.out.println(" soc1_s ->" + soc1_s);
602 
603         RichSelectOneChoice soc2 = getSoc2();
604         String soc2_s = (String)soc2.getValue();
605         System.out.println(" soc2_s ->" + soc2_s);
606 
607 
608         boolean a = soc3.equalsIgnoreCase(soc1_s);
609         boolean b = soc3.equalsIgnoreCase(soc2_s);
610         boolean c = soc1_s.equalsIgnoreCase(soc2_s);
611         if (a || b || c) {
612             throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
613                                                           "All Questions should be uniquely set.",
614                                                           null));
615         }
616 
617 
618     }
619 
620 //    public void setG1(UIXGroup g1) {
621 //        this.g1 = g1;
622 //    }
623 //
624 //    public UIXGroup getG1() {
625 //        return g1;
626 //    }
627 
628     public void setPh1(RichPanelHeader ph1) {
629         this.ph1 = ph1;
630     }
631 
632     public RichPanelHeader getPh1() {
633         return ph1;
634     }
635 
636     public void setPlam3(RichPanelLabelAndMessage plam3) {
637         this.plam3 = plam3;
638     }
639 
640     public RichPanelLabelAndMessage getPlam3() {
641         return plam3;
642     }
643 
644     public void setIt4(RichInputText it4) {
645         this.it4 = it4;
646     }
647 
648     public RichInputText getIt4() {
649         return it4;
650     }
651 
652     public void setIt8(RichInputText it8) {
653         this.it8 = it8;
654     }
655 
656     public RichInputText getIt8() {
657         return it8;
658     }
659 
660     public void setIt9(RichInputText it9) {
661         this.it9 = it9;
662     }
663 
664     public RichInputText getIt9() {
665         return it9;
666     }
667 
668     public void setG4(UIXGroup g4) {
669         this.g4 = g4;
670     }
671 
672     public UIXGroup getG4() {
673         return g4;
674     }
675 
676     public void setPlam4(RichPanelLabelAndMessage plam4) {
677         this.plam4 = plam4;
678     }
679 
680     public RichPanelLabelAndMessage getPlam4() {
681         return plam4;
682     }
683 
684     public void setPgl1(RichPanelGroupLayout pgl1) {
685         this.pgl1 = pgl1;
686     }
687 
688     public RichPanelGroupLayout getPgl1() {
689         return pgl1;
690     }
691 
692     public void setSoc4(RichSelectOneChoice soc4) {
693         this.soc4 = soc4;
694     }
695 
696     public RichSelectOneChoice getSoc4() {
697         return soc4;
698     }
699 
700     public void setSi4(UISelectItems si4) {
701         this.si4 = si4;
702     }
703 
704     public UISelectItems getSi4() {
705         return si4;
706     }
707 
708     public void setIt10(RichInputText it10) {
709         this.it10 = it10;
710     }
711 
712     public RichInputText getIt10() {
713         return it10;
714     }
715 
716     public void setPgl2(RichPanelGroupLayout pgl2) {
717         this.pgl2 = pgl2;
718     }
719 
720     public RichPanelGroupLayout getPgl2() {
721         return pgl2;
722     }
723 
724     public void setSoc5(RichSelectOneChoice soc5) {
725         this.soc5 = soc5;
726     }
727 
728     public RichSelectOneChoice getSoc5() {
729         return soc5;
730     }
731 
732     public void setSi5(UISelectItems si5) {
733         this.si5 = si5;
734     }
735 
736     public UISelectItems getSi5() {
737         return si5;
738     }
739 
740     public void setIt11(RichInputText it11) {
741         this.it11 = it11;
742     }
743 
744     public RichInputText getIt11() {
745         return it11;
746     }
747 
748     public void setPgl3(RichPanelGroupLayout pgl3) {
749         this.pgl3 = pgl3;
750     }
751 
752     public RichPanelGroupLayout getPgl3() {
753         return pgl3;
754     }
755 
756     public void setSoc6(RichSelectOneChoice soc6) {
757         this.soc6 = soc6;
758     }
759 
760     public RichSelectOneChoice getSoc6() {
761         return soc6;
762     }
763 
764     public void setSi6(UISelectItems si6) {
765         this.si6 = si6;
766     }
767 
768     public UISelectItems getSi6() {
769         return si6;
770     }
771 
772     public void setIt12(RichInputText it12) {
773         this.it12 = it12;
774     }
775 
776     public RichInputText getIt12() {
777         return it12;
778     }
779 
780     public void setG5(UIXGroup g5) {
781         this.g5 = g5;
782     }
783 
784     public UIXGroup getG5() {
785         return g5;
786     }
787 
788     public void setPgl5(RichPanelGroupLayout pgl5) {
789         this.pgl5 = pgl5;
790     }
791 
792     public RichPanelGroupLayout getPgl5() {
793         return pgl5;
794     }
795 
796     public void setCb3(RichCommandButton cb3) {
797         this.cb3 = cb3;
798     }
799 
800     public RichCommandButton getCb3() {
801         return cb3;
802     }
803 
804     public void setCb4(RichCommandButton cb4) {
805         this.cb4 = cb4;
806     }
807 
808     public RichCommandButton getCb4() {
809         return cb4;
810     }
811 
812     public void setPh2(RichPanelHeader ph2) {
813         this.ph2 = ph2;
814     }
815 
816     public RichPanelHeader getPh2() {
817         return ph2;
818     }
819 
820 
821     public void setPfl3(RichPanelFormLayout pfl3) {
822         this.pfl3 = pfl3;
823     }
824 
825     public RichPanelFormLayout getPfl3() {
826         return pfl3;
827     }
828 }
829 


Change Password.jspx View File

 1 <?xml version='1.0' encoding='windows-1252'?>
  2 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
  3           xmlns:f="http://java.sun.com/jsf/core"
  4           xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
  5            xmlns:c="http://java.sun.com/jsp/jstl/core">
  6           <c:set var="viewcontrollerBundle"
  7          value="#{adfBundle['view.resources.ViewControllerBundle']}"/>    
  8     <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  9   <f:view>
 10     <af:document id="d1" title="Change Password Page"
 11                  binding="#{backingBeanScope.backing_ChangePassword.d1}">
 12       <af:form id="f1" binding="#{backingBeanScope.backing_ChangePassword.f1}">
 13         <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx"
 14                          id="pt1">
 15           <f:facet name="center">
 16           
 17             <af:panelFormLayout binding="#{backingBeanScope.backing_ChangePassword.pfl1}"
 18                                 id="pfl1" rows="99" maxColumns="1">
 19               
 20                 <af:panelLabelAndMessage label="Password Information"
 21                                          binding="#{backingBeanScope.backing_ChangePassword.plam1}"
 22                                          id="plam1"/>
 23                 <af:inputText label="Password            "
 24                               binding="#{backingBeanScope.backing_ChangePassword.it1}"
 25                               id="it1" showRequired="true" secret="true"
 26                               required="true"/>
 27                 <af:inputText label="New Password        "
 28                               binding="#{backingBeanScope.backing_ChangePassword.it2}"
 29                               id="it2" secret="true" showRequired="true"
 30                               required="true"/>
 31                 <af:inputText label="Confirm New Password"
 32                               binding="#{backingBeanScope.backing_ChangePassword.it3}"
 33                               id="it3" secret="true" showRequired="true"
 34                               validator="#{backingBeanScope.backing_ChangePassword.it3_validator}"
 35                               required="true"/>
 36               
 37                 <af:panelLabelAndMessage label="Challenge Question and Answers"
 38                                          binding="#{backingBeanScope.backing_ChangePassword.plam2}"
 39                                          id="plam2"/>
 40 
 41               <af:panelGroupLayout id="pgl1" layout="horizontal">
 42                 <af:selectOneChoice label="Question 1 : "
 43                                     binding="#{backingBeanScope.backing_ChangePassword.soc1}"
 44                                     id="soc1" showRequired="true"
 45                                     required="true">
 46                   <f:selectItems value="#{challengeQnABean.selectItems}"
 47                                  id="si1"/>
 48                 </af:selectOneChoice>
 49                 <af:inputText label="Answer 1 : "
 50                               binding="#{backingBeanScope.backing_ChangePassword.it5}"
 51                               id="it5" showRequired="true" required="true"/>
 52               </af:panelGroupLayout>
 53               <af:panelGroupLayout id="pgl2" layout="horizontal">
 54                 <af:selectOneChoice label="Question 2 : "
 55                                     binding="#{backingBeanScope.backing_ChangePassword.soc2}"
 56                                     id="soc2" showRequired="true"
 57                                     required="true">
 58                   <f:selectItems value="#{challengeQnABean.selectItems}"
 59                                  id="si2"/>
 60                 </af:selectOneChoice>
 61                 <af:inputText label="Answer 2 : "
 62                               binding="#{backingBeanScope.backing_ChangePassword.it6}"
 63                               id="it6" showRequired="true" required="true"/>
 64               </af:panelGroupLayout>
 65               <af:panelGroupLayout id="pgl3" layout="horizontal">
 66                 <af:selectOneChoice label="Question 3 : "
 67                                     binding="#{backingBeanScope.backing_ChangePassword.soc3}"
 68                                     id="soc3" showRequired="true"
 69                                     validator="#{backingBeanScope.backing_ChangePassword.soc3_validator}"
 70                                     required="true">
 71                   <f:selectItems value="#{challengeQnABean.selectItems}"
 72                                  id="si3"/>
 73                 </af:selectOneChoice>
 74                 <af:inputText label="Answer 3 : "
 75                               binding="#{backingBeanScope.backing_ChangePassword.it7}"
 76                               id="it7" showRequired="true"
 77                               validator="#{backingBeanScope.backing_ChangePassword.it7_validator}"
 78                               required="true"/>
 79               </af:panelGroupLayout>
 80              
 81                 <af:panelGroupLayout binding="#{backingBeanScope.backing_ChangePassword.pgl4}"
 82                                      id="pgl4">
 83                 <af:commandButton text="Submit"
 84                                   binding="#{backingBeanScope.backing_ChangePassword.cb1}"
 85                                   id="cb1"
 86                                   action="#{backingBeanScope.backing_ChangePassword.cb1_action}"/>
 87                 <af:commandButton text="Cancel"
 88                                   binding="#{backingBeanScope.backing_ChangePassword.cb2}"
 89                                   id="cb2"
 90                                   action="#{backingBeanScope.backing_ChangePassword.cb2_action}"/>
 91                                   </af:panelGroupLayout>
 92              
 93             </af:panelFormLayout>
 94           </f:facet>
 95           <f:facet name="header"/>
 96           <f:facet name="end"/>
 97           <f:facet name="start"/>
 98           <f:facet name="branding"/>
 99           <f:facet name="copyright"/>
100           <f:facet name="status"/>
101         </af:pageTemplate>
102       </af:form>
103     </af:document>
104   </f:view>
105   <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_ChangePassword-->
106 </jsp:root>
107 

Account Verification Page view which asks for DOB, Zip Code, UID and PIN.

 1 <?xml version='1.0' encoding='windows-1252'?>
  2 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
  3           xmlns:f="http://java.sun.com/jsf/core"
  4           xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
  5           xmlns:c="http://java.sun.com/jsp/jstl/core">
  6   <c:set var="viewcontrollerBundle"
  7          value="#{adfBundle['view.resources.ViewControllerBundle']}"/>    
  8     <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  9   <f:view>
 10     <af:document id="d1" binding="#{backingBeanScope.backing_view1.d1}"
 11                  title="#{viewcontrollerBundle.ACCOUNT_CLAIM_VALIDATION}">
 12       <af:form id="f1" binding="#{backingBeanScope.backing_view1.f1}">
 13         <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx"
 14                          id="pt1">
 15           <f:facet name="center">
 16             
 17               
 18 
 19   
 20             <af:panelFormLayout binding="#{backingBeanScope.backing_view1.pfl1}"
 21                                 id="pfl1" rows="10">    
 22          <af:panelLabelAndMessage label="#{viewcontrollerBundle.ACCOUNT_INFORMATION}"
 23                                          binding="#{backingBeanScope.backing_view1.plam1}"
 24                                          id="plam1"/>
 25 
 26                 <af:inputText label="#{viewcontrollerBundle.UID}"
 27                               binding="#{backingBeanScope.backing_view1.it1}"
 28                               id="it1" showRequired="true" required="true"
 29                               validator="#{backingBeanScope.backing_view1.it1_validator}"/>
 30                 <af:inputText label="#{viewcontrollerBundle.PIN}"
 31                               binding="#{backingBeanScope.backing_view1.it2}"
 32                               id="it2" secret="true" showRequired="true"
 33                               required="true"
 34                               validator="#{backingBeanScope.backing_view1.it2_validator}"/>
 35                 <af:inputText
 36                               binding="#{backingBeanScope.backing_view1.it3}"
 37                               id="it3" showRequired="true" required="true"
 38                               validator="#{backingBeanScope.backing_view1.it3_validator}"
 39                               label="#{viewcontrollerBundle.ZIP_CODE}"/>
 40                 <af:inputDate
 41                               binding="#{backingBeanScope.backing_view1.id2}"
 42                               id="id2" showRequired="true" required="true"
 43                               label="#{viewcontrollerBundle.DATE_OF_BIRTH}"
 44                               validator="#{backingBeanScope.backing_view1.id2_validator2}"/>
 45               
 46               <af:panelGroupLayout binding="#{backingBeanScope.backing_view1.pgl1}"
 47                                    id="pgl1">
 48                 <af:commandButton text="#{viewcontrollerBundle.NEXT}"
 49                                   binding="#{backingBeanScope.backing_view1.cb1}"
 50                                   id="cb1"
 51                                   action="#{backingBeanScope.backing_view1.cb1_action}"/>
 52                 <af:commandButton text="#{viewcontrollerBundle.CANCEL}"
 53                                   binding="#{backingBeanScope.backing_view1.cb2}"
 54                                   id="cb2" action="cancel"/>
 55                                    
 56               </af:panelGroupLayout>
 57                
 58             </af:panelFormLayout>
 59            
 60           </f:facet>
 61           <f:facet name="header"/>
 62           <f:facet name="end"/>
 63           <f:facet name="start"/>
 64           <f:facet name="branding"/>
 65           <f:facet name="copyright"/>
 66           <f:facet name="status"/>
 67         </af:pageTemplate>
 68       </af:form>
 69     </af:document>
 70   </f:view>
 71   <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_view1-->
 72 </jsp:root>
 73 


Successfully account claim view message page

1 <?xml version='1.0' encoding='UTF-8'?>
  2 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
  3           xmlns:f="http://java.sun.com/jsf/core"
  4           xmlns:h="http://java.sun.com/jsf/html"
  5           xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  6   <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  7   <f:view>
  8     <af:document id="d1">
  9       <af:form id="f1">
 10         <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx"
 11                          id="pt1">
 12           <f:facet name="center">
 13             <af:outputText value="Account Successfully Claimed" id="ot1"/>
 14           </f:facet>
 15           <f:facet name="header"/>
 16           <f:facet name="end"/>
 17           <f:facet name="start"/>
 18           <f:facet name="branding"/>
 19           <f:facet name="copyright"/>
 20           <f:facet name="status"/>
 21         </af:pageTemplate>
 22       </af:form>
 23     </af:document>
 24   </f:view>
 25 </jsp:root>
 26 



View 2 : Account is aleady Claimed 
View 3 : Failure to Validate Account Information
View 4 : No User was Found
View 5 : Multiple Users were Found.

Comments

  1. Sir,
    Is this for 12c or 11g?

    Can you please share the application?

    ReplyDelete

Post a Comment

Popular posts from this blog

OIM 11g R2 PS2 : SOA Approval Workflow Sample

Oracle Identity Manager (OIM) Interview Questions

OHS 12c (12.1.3) webgate deployment and configuration