Created
January 14, 2011 01:42
-
-
Save eedeebee/778998 to your computer and use it in GitHub Desktop.
Snippet #1 in Adding Maps to an AppBuilder application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare function app:get-content() | |
| { | |
| let $view := $config:CONTEXT/*:view | |
| return | |
| if ($view eq "search") | |
| then ( | |
| xdmp:apply($config:toolbar), | |
| if (data($config:RESPONSE/@total) eq 0) | |
| then xdmp:apply($config:error-message, | |
| concat("Your search for ",$config:CONTEXT/*:q, | |
| " did not match anything. Make sure all words are spelled correctly or try different keywords.")) | |
| else ( | |
| xdmp:apply($config:result-navigation), | |
| xdmp:apply($config:results), | |
| xdmp:apply($config:result-navigation))) | |
| else if ($view eq "detail") | |
| then ( | |
| xdmp:apply($config:toolbar), | |
| xdmp:apply($config:item-render) ) | |
| else if ($view eq "terms") | |
| then xdmp:apply($config:terms) | |
| else if ($view eq "help") | |
| then xdmp:apply($config:help) | |
| else if ($view eq "contact") | |
| then xdmp:apply($config:contact) | |
| else if ($view eq "intro") then | |
| <div id="map" style="width:100%; height:300px"/> | |
| else xdmp:apply($config:browse) | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment