Manipulate attribute values

  • set checked attribute to no button
  • delete disabled attribute
  • add "red" to class value
  • remove "bold" to class value
/templates/attributevalues.html
<section>
	<article>
		<afd:snippet render="SimpleSnippet:manipulateAttrValues">
			<ul>
				<li>set checked attribute to no button<br/>
					<input type="radio" id="yes" name="yesno" value="YES"/><label for="yes">YES</label>
					<input type="radio" id="no" name="yesno" value="NO"/><label for="no">NO</label>
				<li>delete disabled attribute<br/>
					<button type="button" id="delete" disabled="disabled">button</button>
				<li id="plus" class="bold italic">add "red" to class value
				<li id="minus" class="bold italic">remove "bold" to class value
			</ul>
		</afd:snippet>
	</article>
</section>
/snippet/SimpleSnippet.java
public Renderer manipulateAttrValues() {
    Renderer render = new GoThroughRenderer();
    render.add("input#yes", "checked", "checked");
    render.add("button#delete", "disabled", Clear);
    render.add("li#plus", "+class", "red");
    render.add("li#minus", "-class", "bold");
    return render;
}