Package org.apache.tapestry.form

Examples of org.apache.tapestry.form.IPropertySelectionModel


    public void pageValidate(PageEvent event)
    {
        super.pageValidate(event);

        IPropertySelectionModel model = buildBooksModel();

        if (model.getOptionCount() == 0)
        {
            IRequestCycle cycle = getRequestCycle();
            IActivate page = (IActivate) cycle.getPage("MyLibrary");

            page.activate(cycle);
View Full Code Here


        return result;
    }

    public void pageBeginRender(PageEvent event)
    {
        IPropertySelectionModel model = getBooksModel();

        if (model == null)
        {
            model = buildBooksModel();
            setBooksModel(model);
View Full Code Here

    public void pageValidate(PageEvent event)
    {
        super.pageValidate(event);

        IPropertySelectionModel model = buildBooksModel();

        if (model.getOptionCount() == 0)
        {
            IRequestCycle cycle = getRequestCycle();
            IActivate page = (IActivate) cycle.getPage("MyLibrary");

            page.activate();
View Full Code Here

        return result;
    }

    public void pageBeginRender(PageEvent event)
    {
        IPropertySelectionModel model = getBooksModel();

        if (model == null)
        {
            model = buildBooksModel();
            setBooksModel(model);
View Full Code Here

    public void pageValidate(PageEvent event)
    {
        super.pageValidate(event);

        IPropertySelectionModel model = buildBooksModel();

        if (model.getOptionCount() == 0)
        {
            IRequestCycle cycle = getRequestCycle();
            IActivate page = (IActivate) cycle.getPage("MyLibrary");

            page.activate(cycle);
View Full Code Here

        _availableWriter.println();

        // Each value specified in the model will go into either the selected or available
        // lists.

        IPropertySelectionModel model = getModel();

        int count = model.getOptionCount();
        for (int i = 0; i < count; i++)
        {
            IMarkupWriter w = _availableWriter;

            Object optionValue = model.getOption(i);

            if (selectedSet.contains(optionValue))
                w = _selectedWriter;

            w.begin("option");
            w.attribute("value", model.getValue(i));
            w.print(model.getLabel(i));
            w.end(); // <option>
            w.println();
        }

        // Close the <select> tags
View Full Code Here

        if (count == 0)
            return;

        List selected = new ArrayList(count);
        IPropertySelectionModel model = getModel();

        for (int i = 0; i < count; i++)
        {
            String value = values[i];
            Object option = model.translateValue(value);

            selected.add(option);
        }

        setSelected(selected);
View Full Code Here

        PaletteColumn selectedColumn = new PaletteColumn(getName(), getRows());

        // Each value specified in the model will go into either the selected or available
        // lists.

        IPropertySelectionModel model = getModel();

        int count = model.getOptionCount();

        for (int i = 0; i < count; i++)
        {
            Object optionValue = model.getOption(i);

            PaletteOption o = new PaletteOption(model.getValue(i), model.getLabel(i));

            int index = selected.indexOf(optionValue);
            boolean isSelected = index >= 0;

            if (sortUser && isSelected)
View Full Code Here

        if (count == 0)
            return;

        List selected = new ArrayList(count);
        IPropertySelectionModel model = getModel();

        for (int i = 0; i < count; i++)
        {
            String value = values[i];
            Object option = model.translateValue(value);

            selected.add(option);
        }

        setSelected(selected);
View Full Code Here

    {
        boolean render = !cycle.isRewinding();

        if (render)
        {
            IPropertySelectionModel model = getModel();

            writer.begin("select");

            writer.attribute("name", getName());

            renderInformalParameters(writer, cycle);

            writer.println();

            int count = model.getOptionCount();

            for (int i = 0; i < count; i++)
            {

                writer.begin("option");
                writer.attribute("value", model.getValue(i));

                writer.print(model.getLabel(i));

                writer.end();
                writer.println();
            }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.form.IPropertySelectionModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.