Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.Location


        List<TemplateToken> tokens = tokens("componentWithParameters.tml");

        assertEquals(tokens.size(), 9);

        TemplateToken templateToken = get(tokens, 2);
        Location l = templateToken.getLocation();

        AttributeToken t1 = get(tokens, 3);

        // TODO: Not sure what order the attributes appear in. Order in the XML? Sorted
        // alphabetically? Random 'cause they're hashed?
View Full Code Here


    {
        String className = member.getDeclaringClass().getName();

        String key = className + ":" + methodName + ":" + memberTypeDesc;

        Location location = memberToLocation.get(key);

        if (location == null)
        {
            location = constructMemberLocation(member, methodName, memberTypeDesc, textDescriptionCreator.createObject());
View Full Code Here

            } catch (EOFException ex)
            {
                // Expected
            } catch (Exception ex)
            {
                Location location = component == null ? null : component.getComponentResources().getLocation();

                throw new TapestryException(ex.getMessage(), location, ex);
            } finally
            {
                InternalUtils.close(ois);
View Full Code Here

     * @param classFactory used to obtain the {@link Location}
     * @return the method formatted for presentation to the user
     */
    public static String asString(Method method, ClassFactory classFactory)
    {
        Location location = classFactory.getMethodLocation(method);

        return location != null ? location.toString() : asString(method);
    }
View Full Code Here

    public void object_can_not_be_instantiated()
    {
        ComponentResources resources = mockComponentResources();
        BeanModelSource source = mockBeanModelSource();
        BeanModel model = mockBeanModel();
        Location l = mockLocation();
        Throwable exception = new RuntimeException("Fall down go boom.");
        PropertyOverrides overrides = mockPropertyOverrides();
        Messages messages = mockMessages();
        Environment env = EasyMock.createNiceMock(Environment.class);
View Full Code Here

    }

    @Test
    public void location_of_location()
    {
        Location l = mockLocation();

        replay();

        assertSame(l, InternalUtils.locationOf(l));
View Full Code Here

    }

    @Test
    public void location_of_locatable()
    {
        Location l = mockLocation();
        Locatable locatable = newMock(Locatable.class);

        expect(locatable.getLocation()).andReturn(l);

        replay();
View Full Code Here

            {
                // Expected
            }
            catch (Exception ex)
            {
                Location location = component == null ? null : component.getComponentResources().getLocation();

                throw new TapestryException(ex.getMessage(), location, ex);
            }
            finally
            {
View Full Code Here

        // Track the location of the original component for the event, even as we work our way up
        // the hierarchy. This may not be ideal if we trigger an "exception" event ... or maybe
        // it's right (it's the location of the originally thrown exception).

        Location location = component.getComponentResources().getLocation();

        while (component != null)
        {
            try
            {
View Full Code Here

        ComponentPageElement container = mockComponentPageElement();
        InternalComponentResources containerResources = mockInternalComponentResources();
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        ParameterModel pmodel = mockParameterModel();
        Location l = mockLocation();
        Logger logger = mockLogger();
        Logger eventLogger = mockLogger();
        PageResources pr = mockPageResources(logger, eventLogger);

        train_getLogger(model, logger);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.Location

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.