Refine search
private String getMessage(String format) { FacesContext facesContext = FacesContext.getCurrentInstance(); String viewId = facesContext.getViewRoot().getViewId(); UIComponent component = UIComponent.getCurrentComponent(facesContext); String clientId = component == null ? "<unknown>" : component.getClientId(facesContext); return String.format(format, getClass().getName(), clientId, viewId); }
public static NavigationCase findNavigationCase(FacesContext context, String outcome) { ConfigurableNavigationHandler navHandler = (ConfigurableNavigationHandler) context.getApplication().getNavigationHandler(); String outcomeValue = (outcome == null) ? context.getViewRoot().getViewId() : outcome; return navHandler.getNavigationCase(context, null, outcomeValue); }
protected NavigationCase findNavigationCase(FacesContext context, UIOutcomeTarget outcomeTarget) { ConfigurableNavigationHandler navigationHandler = (ConfigurableNavigationHandler) context.getApplication().getNavigationHandler(); String outcome = outcomeTarget.getOutcome(); if (outcome == null) { outcome = context.getViewRoot().getViewId(); } if (PrimeApplicationContext.getCurrentInstance(context).getEnvironment().isAtLeastJsf22()) { if (outcomeTarget instanceof UIComponent) { String toFlowDocumentId = (String) ((UIComponent) outcomeTarget).getAttributes().get(ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME); if (toFlowDocumentId != null) { return navigationHandler.getNavigationCase(context, null, outcome, toFlowDocumentId); } } } return navigationHandler.getNavigationCase(context, null, outcome); }
public DataListState getDataListState(boolean create) { FacesContext fc = getFacesContext(); Map<String, Object> sessionMap = fc.getExternalContext().getSessionMap(); Map<String, DataListState> dlState = (Map) sessionMap.get(Constants.DATALIST_STATE); String viewId = fc.getViewRoot().getViewId().replaceFirst("^/*", ""); String stateKey = viewId + "_" + getClientId(fc); if (dlState == null) { dlState = new HashMap<>(); sessionMap.put(Constants.DATALIST_STATE, dlState); } DataListState ls = dlState.get(stateKey); if (ls == null && create) { ls = new DataListState(); dlState.put(stateKey, ls); } return ls; }
/** * @param facesContext * @return String A String representing the action URL */ protected String getActionUrl(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String viewId = facesContext.getViewRoot().getViewId(); return viewHandler.getActionURL(facesContext, viewId); }
public TableState getTableState(boolean create) { FacesContext fc = getFacesContext(); Map<String, Object> sessionMap = fc.getExternalContext().getSessionMap(); Map<String, TableState> dtState = (Map) sessionMap.get(Constants.TABLE_STATE); String viewId = fc.getViewRoot().getViewId().replaceFirst("^/*", ""); String stateKey = viewId + "_" + getClientId(fc); if (dtState == null) { dtState = new HashMap<>(); sessionMap.put(Constants.TABLE_STATE, dtState); } TableState ts = dtState.get(stateKey); if (ts == null && create) { ts = new TableState(); dtState.put(stateKey, ts); } return ts; }
public static NavigationCase findNavigationCase(FacesContext context, String outcome) { ConfigurableNavigationHandler navHandler = (ConfigurableNavigationHandler) context.getApplication().getNavigationHandler(); String outcomeValue = (outcome == null) ? context.getViewRoot().getViewId() : outcome; return navHandler.getNavigationCase(context, null, outcomeValue); }
region = context.getViewRoot().getViewId();
/** * @param facesContext * @return String A String representing the action URL */ public String getActionUrl(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String viewId = facesContext.getViewRoot().getViewId(); return viewHandler.getActionURL(facesContext, viewId); }
public static String getViewId(FacesContext facesContext) { if (facesContext!=null) { UIViewRoot viewRoot = facesContext.getViewRoot(); if (viewRoot!=null) return viewRoot.getViewId(); } return null; }
/** * @param facesContext * @return String A String representing the action URL */ protected String getActionUrl(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String viewId = facesContext.getViewRoot().getViewId(); return viewHandler.getActionURL(facesContext, viewId); }
/** * @see Faces#getViewId() */ public static String getViewId(FacesContext context) { UIViewRoot viewRoot = context.getViewRoot(); return (viewRoot != null) ? viewRoot.getViewId() : null; }
/** * @param facesContext * @return String A String representing the action URL */ public String getActionUrl(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String viewId = facesContext.getViewRoot().getViewId(); return viewHandler.getActionURL(facesContext, viewId); }
private static String getViewId(FacesContext facesContext) { UIViewRoot uiViewRoot = facesContext.getViewRoot(); if(uiViewRoot == null) { return null; } return uiViewRoot.getViewId(); } }
/** * @param facesContext * @return String A String representing the action URL */ protected String getActionUrl(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String viewId = facesContext.getViewRoot().getViewId(); return viewHandler.getActionURL(facesContext, viewId); }
/** * @see Faces#getViewId() */ public static String getViewId(FacesContext context) { UIViewRoot viewRoot = context.getViewRoot(); return (viewRoot != null) ? viewRoot.getViewId() : null; }
/** * @see Faces#getViewDeclarationLanguage() */ public static ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context) { return context.getApplication().getViewHandler().getViewDeclarationLanguage(context, context.getViewRoot().getViewId()); }
private static String getViewId(FacesContext facesContext) { UIViewRoot uiViewRoot = facesContext.getViewRoot(); if(uiViewRoot == null) { return null; } return uiViewRoot.getViewId(); } }
/** * @param facesContext * @return String A String representing the action URL */ protected String getActionUrl(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String viewId = facesContext.getViewRoot().getViewId(); return viewHandler.getActionURL(facesContext, viewId); }
private static String getViewId(FacesContext facesContext) { UIViewRoot uiViewRoot = facesContext.getViewRoot(); if(uiViewRoot == null) { return null; } return uiViewRoot.getViewId(); } }