java.lang.Object
com.aoapps.web.framework.WebPageLayout
com.aoapps.web.framework.SearchLayout
The layout to be used during search sub-requests.
Performs minimal writes of content only.
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class com.aoapps.web.framework.WebPageLayout
DOWN, NONE, UP, UP_AND_DOWN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contentHorizontalDivider
(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int[] colspansAndDirections, boolean endsInternal) Prints a horizontal divider of the provided colspans.void
contentTitle
(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, String title, int contentColumns) Prints an entire content line including the provided title.<__ extends FlowContent<__>>
__contentVerticalDivider
(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int direction, int colspan, int rowspan, String align, String width) Ends one part of a line and starts the next.void
endContent
(WebSiteRequest req, HttpServletResponse resp, WebPage page, ContentEE<?> content, int[] contentColumnSpans) Ends the content area of a page.void
endContentLine
(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int rowspan, boolean endsInternal) Ends one line of content.void
endLightArea
(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> lightArea) Ends a lighter area of the site.void
endPage
(WebSiteRequest req, HttpServletResponse resp, WebPage page, FlowContent<?> flow) Writes all of the HTML following the content of the page.void
endWhiteArea
(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> whiteArea) Ends a white area of the site.static SearchLayout
getName()
Each layout has a name.protected <__ extends ScriptSupportingContent<__>>
voidprintJavascriptIncludes
(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ content) final <__ extends FlowContent<__>>
voidprintSearchOutput
(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ flow, String query, boolean isEntireSite, List<SearchResult> results, String[] words) Prints the content HTML that shows the output of a search.final <__ extends FlowContent<__>>
booleanprintWebPageLayoutSelector
(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ flow) Prints the layout selector.<PC extends FlowContent<PC>,
__ extends ContentEE<__>>
__startContent
(WebSiteRequest req, HttpServletResponse resp, WebPage page, PC pc, int[] contentColumnSpans, String width) Starts the content area of a page.<__ extends FlowContent<__>>
__startContentLine
(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int colspan, String align, String width) Starts one line of content with the initial colspan set to the provided colspan.<PC extends FlowContent<PC>,
__ extends FlowContent<__>>
__startLightArea
(WebSiteRequest req, HttpServletResponse resp, PC pc, String align, String width, boolean nowrap) Begins a lighter colored area of the site.<__ extends FlowContent<__>>
__startPage
(WebSiteRequest req, HttpServletResponse resp, WebPage page, DocumentEE document, String onload) Writes all of the HTML preceding the content of the page.<PC extends FlowContent<PC>,
__ extends FlowContent<__>>
__startWhiteArea
(WebSiteRequest req, HttpServletResponse resp, PC pc, String align, String width, boolean nowrap) Begins a white area of the site.Methods inherited from class com.aoapps.web.framework.WebPageLayout
configureResources, content, content, content, content, content, content, contentHorizontalDivider, contentHorizontalDivider, contentLine, contentLine, contentLine, contentLine, contentTitle, contentTitle, contentTitle, contentVerticalDivider, doPage, doPage, endContent, endContent, endContentLine, getActiveLinkColor, getBackgroundColor, getLayoutChoices, getLinkColor, getTextColor, getVisitedLinkColor, lightArea, lightArea, lightArea, lightArea, startContent, startContent, startContentLine, startLightArea, startWhiteArea, whiteArea, whiteArea, whiteArea, whiteArea
-
Constructor Details
-
SearchLayout
protected SearchLayout()
-
-
Method Details
-
getInstance
-
startPage
public <__ extends FlowContent<__>> __ startPage(WebSiteRequest req, HttpServletResponse resp, WebPage page, DocumentEE document, String onload) Description copied from class:WebPageLayout
Writes all of the HTML preceding the content of the page.Both the
Serialization
andDoctype
may have been set on the request, and these must be considered in the HTML generation.- Specified by:
startPage
in classWebPageLayout
- Parameters:
onload
- The onload script. Whennull
, the page's default onload is used.- Returns:
- The
FlowContent
that should be used to write the page contents. This is also given toWebPageLayout.endPage(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)
to finish the template. - See Also:
-
endPage
public void endPage(WebSiteRequest req, HttpServletResponse resp, WebPage page, FlowContent<?> flow) Description copied from class:WebPageLayout
Writes all of the HTML following the content of the page.Both the
Serialization
andDoctype
may have been set on the request, and these must be considered in the HTML generation.- Specified by:
endPage
in classWebPageLayout
- Parameters:
flow
- TheFlowContent
that was returned byWebPageLayout.startPage(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.DocumentEE, java.lang.String)
.- See Also:
-
printSearchOutput
public final <__ extends FlowContent<__>> void printSearchOutput(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ flow, String query, boolean isEntireSite, List<SearchResult> results, String[] words) Description copied from class:WebPageLayout
Prints the content HTML that shows the output of a search. This output must include an additional search form namedWebPage.SEARCH_TWO
, with two fields namedWebSiteRequest.SEARCH_QUERY
andWebSiteRequest.SEARCH_TARGET
.- Overrides:
printSearchOutput
in classWebPageLayout
- See Also:
-
startContent
public <PC extends FlowContent<PC>,__ extends ContentEE<__>> __ startContent(WebSiteRequest req, HttpServletResponse resp, WebPage page, PC pc, int[] contentColumnSpans, String width) Description copied from class:WebPageLayout
Starts the content area of a page. The content area provides additional features such as a nice border, and vertical and horizontal dividers.- Specified by:
startContent
in classWebPageLayout
- Type Parameters:
PC
- The parent content model this area is within__
- This content model, which will be the parent content model of child elements- Parameters:
width
- Whennull
, will use page's preferred width, if any. When""
, will force no width specified.- Returns:
- The
ContentEE
that should be used to write the area contents. This is also given toWebPageLayout.contentTitle(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, java.lang.String)
,WebPageLayout.contentTitle(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE)
,WebPageLayout.contentTitle(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, java.lang.String, int)
,WebPageLayout.contentTitle(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE, int)
,WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE)
,WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int, java.lang.String, java.lang.String)
,WebPageLayout.contentHorizontalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE)
,WebPageLayout.contentHorizontalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int, boolean)
,WebPageLayout.contentHorizontalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int[], boolean)
,WebPageLayout.endContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE)
,WebPageLayout.endContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE, int)
, andWebPageLayout.endContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE, int[])
.
-
contentTitle
public void contentTitle(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, String title, int contentColumns) Description copied from class:WebPageLayout
Prints an entire content line including the provided title. The colspan should match the total colspan in startContent for proper appearance- Specified by:
contentTitle
in classWebPageLayout
- Parameters:
content
- TheContentEE
that was returned byWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)
WebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int, java.lang.String)
orWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int[], java.lang.String)
.
-
startContentLine
public <__ extends FlowContent<__>> __ startContentLine(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int colspan, String align, String width) Description copied from class:WebPageLayout
Starts one line of content with the initial colspan set to the provided colspan.- Specified by:
startContentLine
in classWebPageLayout
- Type Parameters:
__
- This content model, which will be the parent content model of child elements- Parameters:
content
- TheContentEE
that was returned byWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)
WebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int, java.lang.String)
orWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int[], java.lang.String)
.- Returns:
- The
FlowContent
that should be used to write the line contents. This is also given toWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
,WebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String)
,WebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
, andWebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, boolean)
.
-
contentVerticalDivider
public <__ extends FlowContent<__>> __ contentVerticalDivider(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int direction, int colspan, int rowspan, String align, String width) Description copied from class:WebPageLayout
Ends one part of a line and starts the next.- Specified by:
contentVerticalDivider
in classWebPageLayout
- Parameters:
contentLine
- TheFlowContent
that was returned byWebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE)
,WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int, java.lang.String, java.lang.String)
,WebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
, orWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String)
.- Returns:
- The
FlowContent
that should be used to write the line contents. This is also given toWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
,WebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String)
,WebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
, andWebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, boolean)
.
-
endContentLine
public void endContentLine(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int rowspan, boolean endsInternal) Description copied from class:WebPageLayout
Ends one line of content.- Specified by:
endContentLine
in classWebPageLayout
- Parameters:
contentLine
- TheFlowContent
that was returned byWebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE)
,WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int, java.lang.String, java.lang.String)
,WebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
, orWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String)
.
-
contentHorizontalDivider
public void contentHorizontalDivider(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int[] colspansAndDirections, boolean endsInternal) Description copied from class:WebPageLayout
Prints a horizontal divider of the provided colspans.- Specified by:
contentHorizontalDivider
in classWebPageLayout
- Parameters:
content
- TheContentEE
that was returned byWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)
WebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int, java.lang.String)
orWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int[], java.lang.String)
.
-
endContent
public void endContent(WebSiteRequest req, HttpServletResponse resp, WebPage page, ContentEE<?> content, int[] contentColumnSpans) Description copied from class:WebPageLayout
Ends the content area of a page.- Specified by:
endContent
in classWebPageLayout
- Parameters:
content
- TheContentEE
that was returned byWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)
WebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int, java.lang.String)
orWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int[], java.lang.String)
.
-
startLightArea
public <PC extends FlowContent<PC>,__ extends FlowContent<__>> __ startLightArea(WebSiteRequest req, HttpServletResponse resp, PC pc, String align, String width, boolean nowrap) throws ServletException, IOException Description copied from class:WebPageLayout
Begins a lighter colored area of the site.- Specified by:
startLightArea
in classWebPageLayout
- Type Parameters:
PC
- The parent content model this area is within__
- This content model, which will be the parent content model of child elements- Returns:
- The
FlowContent
that should be used to write the area contents. This is also given toWebPageLayout.endLightArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
to finish the area. - Throws:
ServletException
IOException
-
endLightArea
public void endLightArea(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> lightArea) throws ServletException, IOException Description copied from class:WebPageLayout
Ends a lighter area of the site.- Specified by:
endLightArea
in classWebPageLayout
- Parameters:
lightArea
- TheFlowContent
that was returned byWebPageLayout.startLightArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
orWebPageLayout.startLightArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, java.lang.String, java.lang.String, boolean)
.- Throws:
ServletException
IOException
-
startWhiteArea
public <PC extends FlowContent<PC>,__ extends FlowContent<__>> __ startWhiteArea(WebSiteRequest req, HttpServletResponse resp, PC pc, String align, String width, boolean nowrap) throws ServletException, IOException Description copied from class:WebPageLayout
Begins a white area of the site.- Specified by:
startWhiteArea
in classWebPageLayout
- Type Parameters:
PC
- The parent content model this area is within__
- This content model, which will be the parent content model of child elements- Returns:
- The
FlowContent
that should be used to write the area contents. This is also given toWebPageLayout.endWhiteArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
to finish the area. - Throws:
ServletException
IOException
-
endWhiteArea
public void endWhiteArea(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> whiteArea) throws ServletException, IOException Description copied from class:WebPageLayout
Ends a white area of the site.- Specified by:
endWhiteArea
in classWebPageLayout
- Parameters:
whiteArea
- TheFlowContent
that was returned byWebPageLayout.startWhiteArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)
orWebPageLayout.startWhiteArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, java.lang.String, java.lang.String, boolean)
.- Throws:
ServletException
IOException
-
getName
Description copied from class:WebPageLayout
Each layout has a name.- Specified by:
getName
in classWebPageLayout
-
printWebPageLayoutSelector
public final <__ extends FlowContent<__>> boolean printWebPageLayoutSelector(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ flow) Description copied from class:WebPageLayout
Prints the layout selector.- Overrides:
printWebPageLayoutSelector
in classWebPageLayout
-
printJavascriptIncludes
protected <__ extends ScriptSupportingContent<__>> void printJavascriptIncludes(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ content) - Overrides:
printJavascriptIncludes
in classWebPageLayout
-