Package org.apache.isis.viewer.html.component

Examples of org.apache.isis.viewer.html.component.Component


        for (int i = 0; i < crumbs.length; i++) {
            names[i] = crumbs[i].title();
        }

        final ComponentFactory factory = context.getComponentFactory();
        final Component breadCrumbs = factory.createBreadCrumbs(names, isLinked);

        page.setCrumbs(breadCrumbs);
    }
View Full Code Here


        final Block optionBar = context.getComponentFactory().createBlock("options", null);
        optionBar.add(context.getComponentFactory().createHeading("Options"));

        Block block = context.getComponentFactory().createBlock("item", null);
        Component option = context.getComponentFactory().createLink("logout", "Log Out", "End the current session");
        block.add(option);
        optionBar.add(block);

        block = context.getComponentFactory().createBlock("item", null);
        option = context.getComponentFactory().createLink("about", "About", "Details about this application");
View Full Code Here

        final Block taskBar = context.getComponentFactory().createBlock("history", null);
        taskBar.add(context.getComponentFactory().createHeading("History"));
        for (int i = history.size() - 1; i >= 0; i--) {
            try {
                final HistoryEntry item = history.get(i);
                Component icon;
                if (item.type == HistoryEntry.OBJECT) {
                    final ObjectAdapter object = context.getMappedObject(item.id);

                    IsisContext.getPersistenceSession().resolveImmediately(object);
View Full Code Here

            getPersistenceSession().resolveField(object, field);

            // ordering is important here;
            // look at parseable fields before objects
            final ObjectAdapter associatedObject = field.get(object);
            Component component = null;
            if (field.getSpecification().isParseable()) {
                component = factory.createParseableField(field, associatedObject, false);
            } else if (field.isOneToOneAssociation()) {
                if (associatedObject == null) {
                    component = factory.createInlineBlock("value", "", null);
View Full Code Here

    private static Component[] createMenu(final String menuName, final ObjectAdapter target, final List<ObjectAction> actions, final Context context, final String targetObjectId) {
        final List<Component> menuItems = new ArrayList<Component>();
        for (int j = 0; j < actions.size(); j++) {
            final ObjectAction action = actions.get(j);
            final String name = action.getName();
            Component menuItem = null;
            if (action.getActions().size() > 0) {
                final Component[] components = createMenu(name, target, action.getActions(), context, targetObjectId);
                menuItem = context.getComponentFactory().createSubmenu(name, components);
            } else {
                if (!action.isVisible(IsisContext.getAuthenticationSession(), target, where).isAllowed()) {
View Full Code Here

            getPersistenceSession().resolveField(object, field);

            // ordering is important here;
            // look at parseable fields before objects
            final ObjectAdapter associatedObject = field.get(object);
            Component component = null;
            if (field.getSpecification().isParseable()) {
                component = factory.createParseableField(field, associatedObject, false);
            } else if (field.isOneToOneAssociation()) {
                if (associatedObject == null) {
                    component = factory.createInlineBlock("value", "", null);
View Full Code Here

    private static Component[] createMenu(final String menuName, final ObjectAdapter target, final List<ObjectAction> actions, final Context context, final String targetObjectId) {
        final List<Component> menuItems = new ArrayList<Component>();
        for (int j = 0; j < actions.size(); j++) {
            final ObjectAction action = actions.get(j);
            final String name = action.getName();
            Component menuItem = null;
            if (action.getActions().size() > 0) {
                final Component[] components = createMenu(name, target, action.getActions(), context, targetObjectId);
                menuItem = context.getComponentFactory().createSubmenu(name, components);
            } else {
                if (!action.isVisible(IsisContext.getAuthenticationSession(), target).isAllowed()) {
View Full Code Here

        final Block taskBar = context.getComponentFactory().createBlock("history", null);
        taskBar.add(context.getComponentFactory().createHeading("History"));
        for (int i = history.size() - 1; i >= 0; i--) {
            try {
                final HistoryEntry item = history.get(i);
                Component icon;
                if (item.type == HistoryEntry.OBJECT) {
                    final ObjectAdapter object = context.getMappedObject(item.id);

                    IsisContext.getPersistenceSession().resolveImmediately(object);
View Full Code Here

        for (int i = 0; i < crumbs.length; i++) {
            names[i] = crumbs[i].title();
        }

        final ComponentFactory factory = context.getComponentFactory();
        final Component breadCrumbs = factory.createBreadCrumbs(names, isLinked);

        page.setCrumbs(breadCrumbs);
    }
View Full Code Here

        final Block optionBar = context.getComponentFactory().createBlock("options", null);
        optionBar.add(context.getComponentFactory().createHeading("Options"));

        Block block = context.getComponentFactory().createBlock("item", null);
        Component option = context.getComponentFactory().createLink("logout", "Log Out", "End the current session");
        block.add(option);
        optionBar.add(block);

        block = context.getComponentFactory().createBlock("item", null);
        option = context.getComponentFactory().createLink("about", "About", "Details about this application");
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.html.component.Component

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.