someVariable_v
2. Add a Client JavaScript Builder (Specify explicitly)
3. To access the
someVariable_v
from JavaScript, just specify something like:var variableName = '${Variable/someVariable_v}'
someVariable_v
someVariable_v
from JavaScript, just specify something like:var variableName = '${Variable/someVariable_v}'
try { PumaLocator pumaLocator = portalPumaHome.getLocator(); PumaProfile profile = portalPumaHome.getProfile(); List<User> users = pumaLocator.findUsersByAttribute(attribute, loginname); if (users != null && users.size() > 0) { // insert happy path here } else { // insert logic for "Invalid username/password" error message System.out.println("Invalud username/password"); } } catch (PumaSystemException pse) { // insert logic for communication exception with user repository System.out.println("We are currently experiencing some technical problems. Please try again later."); } catch (Exception e) { // insert logic for other exceptions System.out.println("Oops, we screwed something up."); }
PumaSystemException
is returned when the user repository could not be reached. This is only true when allowOperationIfReposDown
is set to false. When the allowOperationIfReposDown="true"
, the PumaLocator
operation would not return a PumaSystemException
on CommunicationException
with the user repository.try { PumaLocator pumaLocator = portalPumaHome.getLocator(); PumaProfile profile = portalPumaHome.getProfile(); List<User> users = pumaLocator.findUsersByAttribute(attribute, loginname); if (users != null && users.size() > 0) { // insert happy path here } else { // adding logic to check if user repository is available List<User> bindusers = pumaLocator.findUsersByAttribute(attribute, bindusername); if(bindusers != null && bindusers.size() > 0) { // Invalid username/password System.out.println("Invalid username/password"); } else { // insert logic for communication exception with user repository System.out.println("We are currently experiencing some technical problems. Please try again later."); } } } catch (Exception e) { // insert logic for other exceptions System.out.println("Oops, we screwed something up."); }