Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.astamuse.asta4d.sample.snippet.form;
 
 import static com.astamuse.asta4d.render.SpecialRenderer.Clear;
 
 import java.util.List;
 
public class ListSnippet {
    public Renderer render() {
        List<PersonpersonList = PersonDbManager.instance().findAll();
        return Renderer.create(".x-row"personListnew RowRenderer<Person>() {
            @Override
            public Renderer convert(int rowIndexPerson row) {
                Renderer renderer = Renderer.create();
                renderer.add(".x-check input""value"row.getId());
                renderer.add(".x-name"row.getName());
                renderer.add(".x-age"row.getAge());
                renderer.add(".x-sex"row.getSex());
                renderer.add(".x-blood"row.getBloodType());
                renderer.add(".x-language span", Arrays.asList(row.getLanguage()));
                return renderer;
            }
        });
    }
    public Renderer showTabs(@QueryParam String type) {
        Renderer renderer = Renderer.create();
        renderer.add("li""-class""active");
        String targetLi = SelectorUtil.id("li"type);
        renderer.add(targetLi"+class""active");
        renderer.add(targetLi + " a""href");
        String targetBtn = SelectorUtil.id("div"type);
        renderer.add(targetBtn"-class""x-remove");
        renderer.add(".x-remove");
        return renderer;
    }
New to GrepCode? Check out our FAQ X