Package org.apache.tapestry.link

Source Code of org.apache.tapestry.link.ActionLink

/* $$ Clover has instrumented this file $$ */// Copyright 2004 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package org.apache.tapestry.link;

import org.apache.tapestry.IAction;
import org.apache.tapestry.IActionListener;
import org.apache.tapestry.IBinding;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.RenderRewoundException;
import org.apache.tapestry.Tapestry;
import org.apache.tapestry.engine.ILink;

/**
*  A component for creating a link that is handled using the action service.
*
*  [<a href="../../../../../ComponentReference/ActionLink.html">Component Reference</a>]
*
*
@author Howard Lewis Ship
*
**/

public abstract class ActionLink extends AbstractLinkComponent implements IAction
{public static com.cortexeb.tools.clover.d __CLOVER_174_0 = com.cortexeb.tools.clover.aq.getRecorder(new char[] {67,58,92,119,111,114,107,115,112,97,99,101,92,106,97,107,97,114,116,97,45,116,97,112,101,115,116,114,121,92,102,114,97,109,101,119,111,114,107,92,116,97,114,103,101,116,92,99,108,111,118,101,114,45,100,98},1096998272901L);
    /**
     *  Returns true if the stateful parameter is bound to
     *  a true value.  If stateful is not bound, also returns
     *  the default, true.
     *
     *  <p>Note that this method can be called when the
     *  component is not rendering, therefore it must
     *  directly access the {@link IBinding} for the stateful
     *  parameter.
     *
     **/

    public boolean getRequiresSession()
    {try { __CLOVER_174_0.M[882]++;
      __CLOVER_174_0.S[4214]++;IBinding statefulBinding = getStatefulBinding();
     
        __CLOVER_174_0.S[4215]++;if ((((statefulBinding == null) && (++__CLOVER_174_0.CT[777] != 0)) || (++__CLOVER_174_0.CF[777] == 0))){
            __CLOVER_174_0.S[4216]++;return true;}

        __CLOVER_174_0.S[4217]++;return statefulBinding.getBoolean();
    } finally { }}

    public ILink getLink(IRequestCycle cycle)
    {try { __CLOVER_174_0.M[883]++;
        __CLOVER_174_0.S[4218]++;String actionId = cycle.getNextActionId();

        __CLOVER_174_0.S[4219]++;if ((((cycle.isRewound(this)) && (++__CLOVER_174_0.CT[778] != 0)) || (++__CLOVER_174_0.CF[778] == 0))){
        {
            __CLOVER_174_0.S[4220]++;getListener().actionTriggered(this, cycle);

            __CLOVER_174_0.S[4221]++;throw new RenderRewoundException(this);
        }}

        __CLOVER_174_0.S[4222]++;return getLink(cycle, Tapestry.ACTION_SERVICE, new Object[] { actionId });
    } finally { }}

    public abstract IBinding getStatefulBinding();

    public abstract IActionListener getListener();
}
TOP

Related Classes of org.apache.tapestry.link.ActionLink

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.