using (Ajax.BeginForm("Action", "Controller", new AjaxOptions() { OnBegin = "alert('Replace with validation logic.')" }))
protected void encodeHiddens(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase, Object[] params) throws IOException { EncodeStrategy encodeStrategy = getHiddenContainerStrategy(dataTableBase); if (encodeStrategy != null) { encodeStrategy.begin(writer, facesContext, dataTableBase, params); encodeClientScript(writer, facesContext, dataTableBase); encodeHiddenInput(writer, facesContext, dataTableBase); encodeStrategy.end(writer, facesContext, dataTableBase, params); } }
public Attributes uri(String name, String componentAttribute) { ComponentAttribute attribute = createAttribute(name, componentAttribute); attribute.setKind(Kind.URI); return this; }
public static void addToScriptHash(Map<String, Object> hash, FacesContext facesContext, UIComponent component, Attributes attributes, ScriptHashVariableWrapper wrapper) { boolean disabled = isDisabled(component); for (ComponentAttribute knownAttribute : attributes) { if (!disabled || knownAttribute.getEventNames().length == 0) { String attributeName = knownAttribute.getComponentAttributeName(); addToScriptHash(hash, attributeName, getAttributeAndBehaviorsValue(facesContext, component, knownAttribute), knownAttribute.getDefaultValue(), wrapper); } } }
public static void renderAttributeAndBehaviors(FacesContext facesContext, UIComponent component, ComponentAttribute componentAttribute) throws IOException { Object attributeValue = getAttributeAndBehaviorsValue(facesContext, component, componentAttribute); renderAttribute(facesContext, componentAttribute.getHtmlAttributeName(), attributeValue); }
protected String getRowClass(RowHolderBase rowHolder) { String styleClass = ""; String[] rowClasses = getRowClasses(rowHolder); if (rowClasses.length > 0) { int styleIndex = rowHolder.getCurrentRow() % rowClasses.length; styleClass = rowClasses[styleIndex]; } return concatClasses(getRowClassAttribute(rowHolder), styleClass); } }
public static void renderPassThroughAttributes(FacesContext context, UIComponent component, Collection<ComponentAttribute> attributes) throws IOException { boolean disabled = isDisabled(component); for (ComponentAttribute knownAttribute : attributes) { if (!disabled || knownAttribute.getEventNames().length == 0) { renderAttributeAndBehaviors(context, component, knownAttribute); } } }
private ComponentAttribute createAttribute(String name, String componentAttribute) { ComponentAttribute attribute = new ComponentAttribute(name); attribute.setComponentAttributeName(componentAttribute); add(attribute); last = attribute; return attribute; }
public Attributes generic(String name, String componentAttribute, String... events) { ComponentAttribute attribute = createAttribute(name, componentAttribute); attribute.setEventNames(events); attribute.setKind(Kind.GENERIC); return this; }
public static void addToScriptHash(Map<String, Object> hash, FacesContext facesContext, UIComponent component, Attributes attributes, ScriptHashVariableWrapper wrapper) { boolean disabled = isDisabled(component); for (ComponentAttribute knownAttribute : attributes) { if (!disabled || knownAttribute.getEventNames().length == 0) { String attributeName = knownAttribute.getComponentAttributeName(); addToScriptHash(hash, attributeName, getAttributeAndBehaviorsValue(facesContext, component, knownAttribute), knownAttribute.getDefaultValue(), wrapper); } } }
protected void encodeHiddens(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase, Object[] params) throws IOException { EncodeStrategy encodeStrategy = getHiddenContainerStrategy(dataTableBase); if (encodeStrategy != null) { encodeStrategy.begin(writer, facesContext, dataTableBase, params); encodeClientScript(writer, facesContext, dataTableBase); encodeHiddenInput(writer, facesContext, dataTableBase); encodeStrategy.end(writer, facesContext, dataTableBase, params); } }
public static void renderPassThroughAttributes(FacesContext context, UIComponent component, Collection<ComponentAttribute> attributes) throws IOException { boolean disabled = isDisabled(component); for (ComponentAttribute knownAttribute : attributes) { if (!disabled || knownAttribute.getEventNames().length == 0) { renderAttributeAndBehaviors(context, component, knownAttribute); } } }
private ComponentAttribute createAttribute(String name, String componentAttribute) { ComponentAttribute attribute = new ComponentAttribute(name); attribute.setComponentAttributeName(componentAttribute); add(attribute); last = attribute; return attribute; }
public Attributes generic(String name, String componentAttribute, String... events) { ComponentAttribute attribute = createAttribute(name, componentAttribute); attribute.setEventNames(events); attribute.setKind(Kind.GENERIC); return this; }
public Attributes bool(String name, String componentAttribute) { ComponentAttribute attribute = createAttribute(name, componentAttribute); attribute.setKind(Kind.BOOL); return this; }
<div class="cart"> @Ajax.ActionLink("Add To Cart", "AddToCart", new { productId = Model.productId }, new AjaxOptions() { HttpMethod = "Post" }); </div>
protected void encodeHiddens(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase, Object[] params) throws IOException { EncodeStrategy encodeStrategy = getHiddenContainerStrategy(dataTableBase); if (encodeStrategy != null) { encodeStrategy.begin(writer, facesContext, dataTableBase, params); encodeClientScript(writer, facesContext, dataTableBase); encodeHiddenInput(writer, facesContext, dataTableBase); encodeStrategy.end(writer, facesContext, dataTableBase, params); } }
public static void renderPassThroughAttributes(FacesContext context, UIComponent component, Collection<ComponentAttribute> attributes) throws IOException { boolean disabled = isDisabled(component); for (ComponentAttribute knownAttribute : attributes) { if (!disabled || knownAttribute.getEventNames().length == 0) { renderAttributeAndBehaviors(context, component, knownAttribute); } } }
private ComponentAttribute createAttribute(String name, String componentAttribute) { ComponentAttribute attribute = new ComponentAttribute(name); attribute.setComponentAttributeName(componentAttribute); add(attribute); last = attribute; return attribute; }
public Attributes uri(String name, String componentAttribute) { ComponentAttribute attribute = createAttribute(name, componentAttribute); attribute.setKind(Kind.URI); return this; }