Examples of CellBinding


Examples of org.apache.isis.viewer.bdd.common.CellBinding

        for (int colNum = 0; colNum < getProperties().size(); colNum++) {
            final SetUpObjectResult result = setUpProperty(adapter, colNum);

            if (!result.isHandled()) {
                final CellBinding cellBinding = getCellBindings().get(colNum);
                throw ScenarioBoundValueException.current(cellBinding, result.getErrorMessage());
            }
        }

        persistIfNecessary(adapter);
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

        final ObjectAdapter onAdapter = performContext.getOnAdapter();

        final Consent valid = onAdapter.getSpecification().isValid(onAdapter);

        final CellBinding performBinding = performContext.getPeer().getPerformBinding();
        if (valid.isVetoed()) {
            throw ScenarioBoundValueException.current(performBinding, valid.getReason());
        }

        if (onAdapter.isPersistent()) {
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

    @Override
    public ObjectAdapter that(final PerformContext performContext) throws ScenarioBoundValueException {

        final ObjectAdapter onAdapter = performContext.getOnAdapter();
        final CellBinding thatItBinding = performContext.getPeer().getThatItBinding();

        if (onAdapter.isPersistent()) {
            throw ScenarioBoundValueException.current(thatItBinding, "(saved)");
        }
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

    @Override
    public ObjectAdapter that(final PerformContext performContext) throws ScenarioBoundValueException {

        final ObjectAdapter onAdapter = performContext.getOnAdapter();
        final CellBinding thatItBinding = performContext.getPeer().getThatItBinding();

        if (!onAdapter.isPersistent()) {
            throw ScenarioBoundValueException.current(thatItBinding, "(not saved)");
        }
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

    @Override
    public void doHandle(final PerformContext performContext) throws ScenarioBoundValueException {

        final ObjectAdapter onAdapter = performContext.getOnAdapter();
        final ObjectMember nakedObjectMember = performContext.getObjectMember();
        final CellBinding onMemberBinding = performContext.getPeer().getOnMemberBinding();

        final OneToManyAssociation otma = (OneToManyAssociation) nakedObjectMember;

        final CollectionAddToFacet addToFacet = nakedObjectMember.getFacet(CollectionAddToFacet.class);
        if (addToFacet == null) {
            throw ScenarioBoundValueException.current(onMemberBinding, "(cannot add to collection)");
        }

        // safe since guaranteed by superclass
        final CellBinding arg0Binding = performContext.getPeer().getArg0Binding();
        final ScenarioCell arg0Cell = arg0Binding.getCurrentCell();
        final String toAddAlias = arg0Cell.getText();

        final ObjectAdapter toAddAdapter = performContext.getPeer().getAliasRegistry().getAliased(toAddAlias);
        if (toAddAdapter == null) {
            throw ScenarioBoundValueException.current(arg0Binding, "(unknown alias)");
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

    @Override
    public void doHandle(final PerformContext performContext) throws ScenarioBoundValueException {

        final ObjectAdapter onAdapter = performContext.getOnAdapter();
        final ObjectMember nakedObjectMember = performContext.getObjectMember();
        final CellBinding onMemberBinding = performContext.getPeer().getOnMemberBinding();
        @SuppressWarnings("unused")
        final ScenarioCell onMemberCell = onMemberBinding.getCurrentCell();

        final List<ScenarioCell> argumentCells = performContext.getArgumentCells();

        final OneToManyAssociation otma = (OneToManyAssociation) nakedObjectMember;

        // safe since guaranteed by superclass
        final CellBinding arg0Binding = performContext.getPeer().getArg0Binding();
        final ScenarioCell arg0Cell = argumentCells.get(0);
        final String toRemove = arg0Cell.getText();

        final CollectionRemoveFromFacet removeFromFacet = nakedObjectMember.getFacet(CollectionRemoveFromFacet.class);
        if (removeFromFacet == null) {
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

    @Override
    public void doHandle(final PerformContext performContext) throws ScenarioBoundValueException {

        final ObjectAdapter onAdapter = performContext.getOnAdapter();
        final ObjectMember nakedObjectMember = performContext.getObjectMember();
        final CellBinding arg0Binding = performContext.getPeer().getArg0Binding();
        final ScenarioCell arg0Cell = arg0Binding.getCurrentCell();

        int requestedParamNum = -1;
        try {
            requestedParamNum = Integer.valueOf(arg0Cell.getText());
        } catch (final NumberFormatException ex) {
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

     * arguments match.
     */
    @Override
    public void perform(final PerformContext performContext) throws ScenarioBoundValueException {

        final CellBinding onMemberBinding = performContext.getPeer().getOnMemberBinding();
        final ScenarioCell onMemberCell = onMemberBinding.getCurrentCell();

        final String reason = type.ensureMemberIsOfType(performContext.getObjectMember());
        if (reason != null) {
            throw ScenarioBoundValueException.current(onMemberBinding, reason);
        }
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

        for (int colNum = 0; colNum < getProperties().size(); colNum++) {
            final SetUpObjectResult result = setUpProperty(adapter, colNum);

            if (!result.isHandled()) {
                final CellBinding cellBinding = getCellBindings().get(colNum);
                throw ScenarioBoundValueException.current(cellBinding, result.getErrorMessage());
            }
        }

        persistIfNecessary(adapter);
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.CellBinding

        }
    }

    @Override
    public void perform(final PerformContext performContext) throws ScenarioBoundValueException {
        final CellBinding thatItBinding = performContext.getPeer().getThatItBinding();
        if (!thatItBinding.isFound()) {
            final CellBinding performBinding = performContext.getPeer().getPerformBinding();
            throw ScenarioBoundValueException.current(performBinding, "(require " + IsisViewerConstants.THAT_IT_NAME
                + "' column)");
        }
        final ScenarioCell thatItCell = thatItBinding.getCurrentCell();
        final String thatIt = thatItCell.getText();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.