Package org.wicketstuff
Class RepeaterUtil
- java.lang.Object
-
- org.wicketstuff.RepeaterUtil
-
- All Implemented Interfaces:
IRepeaterUtil
public class RepeaterUtil extends Object implements IRepeaterUtil
- Author:
- Vineet Semwal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.wicketstuff.IRepeaterUtil
IRepeaterUtil.OutputMarkupIdNotTrueException, IRepeaterUtil.QuickViewNotAddedToParentException, IRepeaterUtil.ReuseStrategyNotSupportedException
-
-
Constructor Summary
Constructors Constructor Description RepeaterUtil(Application application)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
append(String tag, String markupId, String parentMarkupId, String startId, String endId)
creates a new dom tag element as the last element of parent with parentIdString
append(MarkupContainer c, MarkupContainer parent, Component start, Component end)
creates a new dom tag element as the last element of parentstatic RepeaterUtil
get()
ComponentTag
getComponentTag(Component c)
findsComponentTag
of the component passedString
isComponentScrollBarAtBottom(MarkupContainer component)
js calls which calls methods that when fired returns true if component's navigation-bar is at the bottomString
isPageScrollBarAtBottom()
js calls which calls methods that when fired returns true if page's navigation-bar is at the bottomvoid
outPutMarkupIdNotTrue(IQuickView quickView)
throws exception if outmarkupid of parent is not set true and outputMarkupPlaceholderTag is not set truevoid
parentNotSuitable(IQuickView quickView)
throws exception if no suitable unary parent is found,unary parent is one which only has one childString
prepend(String tag, String markupId, String parentMarkupId, String firstChildId, String markId)
prepend js call ,creates a new dom tag element as the first element of parentString
prepend(MarkupContainer component, MarkupContainer parent, Component start, Component end)
prepend js call ,creates a new dom tag element as the first element of parentString
removeItem(String markupId, String parentId)
removes js call for item whose markupid is passedString
removeItem(Component component, Component parent)
removes js call for component which is providedvoid
reuseStategyNotSupportedForItemsNavigation(IQuickView quickView)
throws exception if reuse strategy is not supported for items navigationint
safeLongToInt(long value)
safely converts long to intString
scrollTo(String markupId, int height)
String
scrollTo(IQuickView quickView, int height)
js call to scroll to heightString
scrollToBottom(String markupId)
String
scrollToBottom(IQuickView quickView)
js call to scroll to bottomString
scrollToTop(String markupId)
String
scrollToTop(IQuickView quickView)
js call to scroll to topString
showPageScrollBar()
-
-
-
Constructor Detail
-
RepeaterUtil
public RepeaterUtil(Application application)
-
-
Method Detail
-
get
public static RepeaterUtil get()
-
prepend
public String prepend(String tag, String markupId, String parentMarkupId, String firstChildId, String markId)
prepend js call ,creates a new dom tag element as the first element of parent- Specified by:
prepend
in interfaceIRepeaterUtil
- Parameters:
tag
- repeater tagmarkupId
- repeater markupidparentMarkupId
- parent markupid- Returns:
- prepend call of js
-
prepend
public String prepend(MarkupContainer component, MarkupContainer parent, Component start, Component end)
prepend js call ,creates a new dom tag element as the first element of parent- Specified by:
prepend
in interfaceIRepeaterUtil
- Parameters:
component
- repeaterparent
- parent to which repeater is added- Returns:
- prepend call of js
-
append
public String append(String tag, String markupId, String parentMarkupId, String startId, String endId)
creates a new dom tag element as the last element of parent with parentId- Specified by:
append
in interfaceIRepeaterUtil
- Parameters:
tag
- repeater tagmarkupId
- repeater markupidparentMarkupId
- parent markupid- Returns:
- append call of js
-
append
public String append(MarkupContainer c, MarkupContainer parent, Component start, Component end)
creates a new dom tag element as the last element of parent- Specified by:
append
in interfaceIRepeaterUtil
- Parameters:
c
- repeaterparent
- parent- Returns:
- append js call
-
getComponentTag
public ComponentTag getComponentTag(Component c)
findsComponentTag
of the component passed- Specified by:
getComponentTag
in interfaceIRepeaterUtil
- Parameters:
c
- component whose componenttag has to be found- Returns:
ComponentTag
-
removeItem
public String removeItem(String markupId, String parentId)
removes js call for item whose markupid is passed- Specified by:
removeItem
in interfaceIRepeaterUtil
- Parameters:
markupId
- markupid of the element which needs to be removedparentId
- markupId of parent- Returns:
- remove js call
-
removeItem
public String removeItem(Component component, Component parent)
removes js call for component which is provided- Specified by:
removeItem
in interfaceIRepeaterUtil
- Returns:
- remove js call
-
safeLongToInt
public int safeLongToInt(long value)
safely converts long to int- Specified by:
safeLongToInt
in interfaceIRepeaterUtil
- Returns:
- int value for long passed
-
parentNotSuitable
public final void parentNotSuitable(IQuickView quickView)
throws exception if no suitable unary parent is found,unary parent is one which only has one child- Specified by:
parentNotSuitable
in interfaceIRepeaterUtil
-
outPutMarkupIdNotTrue
public final void outPutMarkupIdNotTrue(IQuickView quickView)
throws exception if outmarkupid of parent is not set true and outputMarkupPlaceholderTag is not set true- Specified by:
outPutMarkupIdNotTrue
in interfaceIRepeaterUtil
-
reuseStategyNotSupportedForItemsNavigation
public final void reuseStategyNotSupportedForItemsNavigation(IQuickView quickView)
Description copied from interface:IRepeaterUtil
throws exception if reuse strategy is not supported for items navigation- Specified by:
reuseStategyNotSupportedForItemsNavigation
in interfaceIRepeaterUtil
-
scrollToBottom
public String scrollToBottom(String markupId)
- Specified by:
scrollToBottom
in interfaceIRepeaterUtil
-
scrollToBottom
public String scrollToBottom(IQuickView quickView)
js call to scroll to bottom- Specified by:
scrollToBottom
in interfaceIRepeaterUtil
- Returns:
- js call string
-
scrollToTop
public String scrollToTop(String markupId)
- Specified by:
scrollToTop
in interfaceIRepeaterUtil
-
scrollToTop
public String scrollToTop(IQuickView quickView)
js call to scroll to top- Specified by:
scrollToTop
in interfaceIRepeaterUtil
- Returns:
- js call string
-
scrollTo
public String scrollTo(IQuickView quickView, int height)
js call to scroll to height- Specified by:
scrollTo
in interfaceIRepeaterUtil
- Returns:
- js call string
-
scrollTo
public String scrollTo(String markupId, int height)
- Specified by:
scrollTo
in interfaceIRepeaterUtil
-
isComponentScrollBarAtBottom
public String isComponentScrollBarAtBottom(MarkupContainer component)
js calls which calls methods that when fired returns true if component's navigation-bar is at the bottom- Specified by:
isComponentScrollBarAtBottom
in interfaceIRepeaterUtil
- Returns:
- js call string
-
isPageScrollBarAtBottom
public String isPageScrollBarAtBottom()
js calls which calls methods that when fired returns true if page's navigation-bar is at the bottom- Specified by:
isPageScrollBarAtBottom
in interfaceIRepeaterUtil
- Returns:
- js call string
-
showPageScrollBar
public String showPageScrollBar()
- Specified by:
showPageScrollBar
in interfaceIRepeaterUtil
-
-