com.sapportals.htmlb

Class Link

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.Container
          extended bycom.sapportals.htmlb.EventValidationContainer
              extended bycom.sapportals.htmlb.Link
All Implemented Interfaces:
IEventValidationComponent, com.sapportals.htmlb.IJavascriptComponent, com.sapportals.htmlb.IPopupTriggerContent, LabeledComponent

public class Link
extends EventValidationContainer
implements LabeledComponent, com.sapportals.htmlb.IPopupTriggerContent

Link Control


Field Summary
static String UI_ID
           
static int VAR_BEGIN
           
static int VAR_END
           
static int VAR_TEXT
           
 
Fields inherited from class com.sapportals.htmlb.Container
elements
 
Constructor Summary
Link(String name)
          Creates a Link object with the specific name.
Link(String name, String text)
          Creates a Link object with the specific name and text.
 
Method Summary
 Component addComponent(Component c)
          add a component to this container
 String addText(String text)
          add a raw text to this container
 com.sapportals.htmlb.enum.LinkFontSize getFontSize()
           
 TextView getInnerText()
           
 LinkDesign getLinkDesign()
           
 String getOnClick()
           
 String getOnClientClick()
          get the JavaScript fragment that is executed on the client side if the user changes the selection
 String getReference()
           
 String getTarget()
           
 com.sapportals.htmlb.enum.ForcedTextDirection getTextDirection()
          Gets the text direction for the component
 String getTooltip()
           
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 boolean isLabeled()
          checks if a label has been assigned to this component.
 boolean isRequiresValidation()
          determines if the validation is required or not before submitting server event
 void preRender(IPageContext pc)
          preRender traverses the component tree right before rendering
 void removerHoverMenu(HoverMenu menu)
           
 boolean requiresForm()
          Determines if this Link requires to be placed in form.
 void setFontSize(com.sapportals.htmlb.enum.LinkFontSize fontSize)
           
 void setLabeled(boolean isLabeled)
          notify the component that a label has been assigned to it.
 void setLinkDesign(LinkDesign linkDesign)
           
 void setOnClick(String onClick)
           
 void setOnClientClick(String onClientClick)
          set a Javascript fragment that is executed when the user clicks on this button
 void setReference(String reference)
           
 void setRequiresValidation(boolean validation)
           
 void setTarget(String target)
          The target argument specifies where to display the content of the selected hyperlink.
 void setTextDirection(com.sapportals.htmlb.enum.ForcedTextDirection textDirection)
          Sets the text direction for the component
 void setTooltip(String tooltip)
           
 String toString()
           
 
Methods inherited from class com.sapportals.htmlb.EventValidationContainer
getAllValidators, getClientEvent, getClientEventMap, getErrorText, getServerEvent, getServerEventMap, getValidator, isDisabled, isEnabled, renderJavascriptInterface, setClientEvent, setDisabled, setEnabled, setErrorText, setServerEvent, setValidator
 
Methods inherited from class com.sapportals.htmlb.Container
addRawText, getChildCount, iterator, removeComponent, render
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, render, renderAsString, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
See Also:
Constant Field Values

VAR_BEGIN

public static final int VAR_BEGIN
See Also:
Constant Field Values

VAR_END

public static final int VAR_END
See Also:
Constant Field Values

VAR_TEXT

public static final int VAR_TEXT
See Also:
Constant Field Values
Constructor Detail

Link

public Link(String name)
Creates a Link object with the specific name.


Link

public Link(String name,
            String text)
Creates a Link object with the specific name and text.

Method Detail

addText

public String addText(String text)
Description copied from class: Container
add a raw text to this container

Overrides:
addText in class Container
Parameters:
text - the text to add

addComponent

public Component addComponent(Component c)
Description copied from class: Container
add a component to this container

Overrides:
addComponent in class Container
Parameters:
c - the component to add

getUI

public String getUI()
Description copied from class: Component
get a identification String for the renderer that is unique across all supported components. E.g. you could simply return the class name of the component class. The reason for using a separate method and not some internal reflection method is that you can more easily extend the functionality or your Component class without having to rewrite the view class.

Specified by:
getUI in class Component
Returns:
component identifier

getOnClick

public String getOnClick()
Returns:
onCLick event identifier

setOnClick

public void setOnClick(String onClick)

getOnClientClick

public String getOnClientClick()
get the JavaScript fragment that is executed on the client side if the user changes the selection

Returns:
the JavaScript fragment.

setOnClientClick

public void setOnClientClick(String onClientClick)
set a Javascript fragment that is executed when the user clicks on this button

Parameters:
onClientClick - the Javascript

getTarget

public String getTarget()
Returns:
target name where the hypertext link will be displayed
See Also:
setTarget(String)

setTarget

public void setTarget(String target)
The target argument specifies where to display the content of the selected hyperlink. Commonly used in conjunction with frames and multiple browser windows. Special target names: "_self" Default value. Shows content in the same frame or window as the source document. "_parent" Causes the document to be loaded into the parent window or frameset containing the frame containing the hypertext reference. If the reference is in a window or top-level frame, it is equivalent to the target _self. "_top" Causers the document to be loaded into the window containing the hypertext link, replacing any frames currently displayed intthe window. "_blank" Show in a new, unnamed top-level window. "name" Show in the frame or window named name. If a target named name does not already exist, a new top-level window with the specified name is created, and the document is shown there.


getTooltip

public String getTooltip()
Returns:
text which is displayed when the mouse pauses over the link.

setTooltip

public void setTooltip(String tooltip)

getFontSize

public com.sapportals.htmlb.enum.LinkFontSize getFontSize()

setFontSize

public void setFontSize(com.sapportals.htmlb.enum.LinkFontSize fontSize)

getLinkDesign

public LinkDesign getLinkDesign()

setLinkDesign

public void setLinkDesign(LinkDesign linkDesign)

getInnerText

public TextView getInnerText()

getReference

public String getReference()
Returns:
hyperlink definition

setReference

public void setReference(String reference)

toString

public String toString()

requiresForm

public boolean requiresForm()
Determines if this Link requires to be placed in form.

Overrides:
requiresForm in class Component
Returns:
true if a server side event action is set for this link.

setLabeled

public void setLabeled(boolean isLabeled)
Description copied from interface: LabeledComponent
notify the component that a label has been assigned to it.

Specified by:
setLabeled in interface LabeledComponent

isLabeled

public boolean isLabeled()
Description copied from interface: LabeledComponent
checks if a label has been assigned to this component.

Specified by:
isLabeled in interface LabeledComponent

removerHoverMenu

public void removerHoverMenu(HoverMenu menu)

preRender

public void preRender(IPageContext pc)
preRender traverses the component tree right before rendering

Overrides:
preRender in class Container

isRequiresValidation

public boolean isRequiresValidation()
Description copied from interface: IEventValidationComponent
determines if the validation is required or not before submitting server event

Specified by:
isRequiresValidation in interface IEventValidationComponent
Overrides:
isRequiresValidation in class EventValidationContainer

setRequiresValidation

public void setRequiresValidation(boolean validation)

getTextDirection

public com.sapportals.htmlb.enum.ForcedTextDirection getTextDirection()
Gets the text direction for the component

Returns:
com.sapportals.htmlb.enum.ForcedTextDirection

setTextDirection

public void setTextDirection(com.sapportals.htmlb.enum.ForcedTextDirection textDirection)
Sets the text direction for the component

Parameters:
textDirection - com.sapportals.htmlb.enum.ForcedTextDirection


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.