Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.BeanBlockContribution


        }

        // Let subclasses do more.
        configure(config);

        renderSupport.addInit("autocompleter", new JSONArray(id, menuId, link.toAbsoluteURI(), config));
    }
View Full Code Here


        "class", "t-autocomplete-menu");
        writer.end();

        Link link = resources.createEventLink(EVENT_NAME);

        JSONObject config = new JSONObject();
        config.put("paramName", PARAM_NAME);
        config.put("indicator", loaderId);

        if (resources.isBound("minChars"))
            config.put("minChars", minChars);

        if (resources.isBound("frequency"))
            config.put("frequency", frequency);

        if (resources.isBound("tokens"))
        {
            for (int i = 0; i < tokens.length(); i++)
            {
                config.accumulate("tokens", tokens.substring(i, i + 1));
            }
        }

        // Let subclasses do more.
        configure(config);
View Full Code Here

     * not formatted correct.
     */
    JSONObject onParse(@RequestParameter(INPUT_PARAMETER)
    String input)
    {
        JSONObject response = new JSONObject();

        try
        {
            Date date = format.parse(input);

            response.put(RESULT, date.getTime());
        }
        catch (ParseException ex)
        {
            response.put(ERROR, ex.getMessage());
        }

        return response;
    }
View Full Code Here

     * the result.
     */
    JSONObject onFormat(@RequestParameter(INPUT_PARAMETER)
    String input)
    {
        JSONObject response = new JSONObject();

        try
        {
            long millis = Long.parseLong(input);

            Date date = new Date(millis);

            response.put(RESULT, format.format(date));
        }
        catch (NumberFormatException ex)
        {
            response.put(ERROR, ex.getMessage());
        }

        return response;
    }
View Full Code Here

public class AppModule
{
    public static void contributeBeanBlockOverrideSource(Configuration<BeanBlockContribution> configuration)
    {
        configuration.add(new BeanBlockContribution("boolean", "PropertyDisplayBlockOverrides", "boolean", false));
    }
View Full Code Here

public class AppModule
{
    public static void contributeBeanBlockOverrideSource(Configuration<BeanBlockContribution> configuration)
    {
        configuration.add(new BeanBlockContribution("boolean", "PropertyDisplayBlockOverrides", "boolean", false));
    }
View Full Code Here

public class AppModule
{
    public static void contributeBeanBlockOverrideSource(Configuration<BeanBlockContribution> configuration)
    {
        configuration.add(new BeanBlockContribution("boolean", "PropertyDisplayBlockOverrides", "boolean", false));
    }
View Full Code Here

public class AppModule
{
    public static void contributeBeanBlockOverrideSource(Configuration<BeanBlockContribution> configuration)
    {
        configuration.add(new BeanBlockContribution("boolean", "PropertyDisplayBlockOverrides", "boolean", false));
    }
View Full Code Here

public class AppModule
{
    public static void contributeBeanBlockOverrideSource(Configuration<BeanBlockContribution> configuration)
    {
        configuration.add(new BeanBlockContribution("boolean", "PropertyDisplayBlockOverrides", "boolean", false));
    }
View Full Code Here

    public void found_display_block()
    {
        Block block = mockBlock();
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        BeanBlockContribution contribution = new BeanBlockContribution("mydata", "MyPage",
                                                                       "mydisplay", false);
        Collection<BeanBlockContribution> configuration = newList(contribution);

        train_get(cache, "MyPage", page);
        train_getBlock(page, "mydisplay", block);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.BeanBlockContribution

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.