public static boolean isInline(ResourceInfo resourceInfo) { if (resourceInfo != null) { return LangUtils.isValueBlank(resourceInfo.getLibrary()) && LangUtils.isValueBlank(resourceInfo.getName()); } return false; }
@Override protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { return size() > maxSize; } }
public static Class tryToLoadClassForName(String name) { try { return loadClassForName(name); } catch (ClassNotFoundException e) { return null; } }
@Override public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException { String submittedValueString = (String) submittedValue; if (LangUtils.isValueBlank(submittedValueString)) { return null; } Converter converter = ComponentUtils.getConverter(context, component); if (converter != null) { return converter.getAsObject(context, component, submittedValueString); } return submittedValue; }
public static String getValueToRender(FacesContext context, UIComponent component) { return getValueToRender(context, component, UNDEFINED_VALUE); }
@Override public Map<String, List<String>> getParams() { return ComponentUtils.getUIParams(this); } }
public static UIComponent closestNamingContainer(UIComponent component) { return (UIComponent) closest(NamingContainer.class, component); } }
public AjaxRequestBuilder process(UIComponent component, String expressions) { addExpressions(component, expressions, "p", SearchExpressionHint.NONE); return this; }
/** * @return Shared AjaxRequestBuilder instance of the current request */ public AjaxRequestBuilder getAjaxRequestBuilder() { if (this.ajaxRequestBuilder == null) { this.ajaxRequestBuilder = new AjaxRequestBuilder(context); } return ajaxRequestBuilder; }
/** * @return Shared Client Side Validation builder instance of the current request */ public CSVBuilder getCSVBuilder() { if (this.csvBuilder == null) { this.csvBuilder = new CSVBuilder(context); } return csvBuilder; }
/** * Get a shared {@link StringBuilder} instance. * This is required as e.g. 100 e.g. {@link org.primefaces.expression.SearchExpressionFacade#resolveClientId} calls would create * 300 {@link StringBuilder} instances! * * @param context The {@link FacesContext} * @param key The key for the {@link FacesContext} attributes. * @return The shared {@link StringBuilder} instance */ public static StringBuilder get(FacesContext context, String key) { return get(context, key, 16); }
private static void resolveComponentById(UIComponent source, String expression, char seperatorChar, FacesContext context, ContextCallback callback) { ComponentTraversalUtils.firstById(expression, source, seperatorChar, context, callback); }
@Override protected String getContentDisposition(String filename) { return ComponentUtils.createContentDisposition("attachment", filename + ".xlsx"); }
protected String getResourceURL(FacesContext context, String value) { return ResourceUtils.getResourceURL(context, value); }
public boolean isValueBlank(String value) { return LangUtils.isValueBlank(value); }
@Override public Map<String, List<String>> getParams() { return ComponentUtils.getUIParams(this); } }
public static UIForm closestForm(FacesContext context, UIComponent component) { return closest(UIForm.class, component); }
public AjaxRequestBuilder update(UIComponent component, String expressions) { addExpressions(component, expressions, "u", SearchExpressionHint.VALIDATE_RENDERER | SearchExpressionHint.SKIP_UNRENDERED); return this; }
@Override public Map<String, List<String>> getParams() { return ComponentUtils.getUIParams(this); } }
@Override public Map<String, List<String>> getParams() { return ComponentUtils.getUIParams(this); }