There have been some updates to the jQuery platform recently that I want to help promote. Here is a little history (my point: development is ongoing, it is not a dead end project): January 14th, 2009 jQuery 1.3 released January 16th, 2009 jQuery UI 1.6 RC5 released January 21sth, 2009 jQuery 1.3.1 released February 20th, 2009 jQuery 1.3.2 released March 6th, 2009 jQuery UI 1.7 released March 19th, 2009 jQuery UI 1.7.1 released jQuery is a very neat framework (my opinion). It allows you to easily manipulate the page, introduce effects and interact with the server. jQuery also makes it easy to extend with a rich community of plug-ins already available. A lot of other frameworks can make similar promises and even deliver on those promises, including but not limited to script.aculo.us, prototype, EXT, etc. These libraries (including jQuery) are not the answer to every problem you will ever have but they certainly provide solutions for many issues. With these kinds of tools all around should you not seriously consider using them instead of rolling your own? You might say? That's? nice Stortz, but how does this relate to content server?? There are currently two components provided by our community of UCM blogs that grant support for a few of the previously mentioned frameworks. John Sim has a component to add EXT support at his blog. Obviously I did not want to be left out, did I? I am partial to jQuery, so I wanted a component to add jQuery support to Content Server. Install this Sample jQuery Component and restart your Content Server service. At this point jQuery 1.3.2 and jQuery UI 1.7.1 are available (in no conflict mode, so please use "jQuery" instead of "$"). To get to the supplied jQuery/JSON playground go to the Administration menu and look for the JSON Lab menu item. A fully patched 7.5.x and 10gR3 Content Server adds the ability to invoke services on Content Server with the IsJson=1 request variable, similar to the IsJava=1 variable. But, instead of returning HDA format data (IsJava=1), or SOAP (IsSoap=1) the IsJson=1 parameter and value will kick back the data in JavaScript Object Notation format (JSON). The JSON Lab provides a venue for you to execute services, review results and script against those results. The Request tab executes services uses jQuery in the background to interact with Content Server. When the service call you executed by clicking 'Send Request' returns you are automatically flipped over to the Response tab where the JSON Data returned by Content Server is displayed and the data is also assigned to a variable named jsonData that you can utilize later in the Work Bench. Finally, the Help tab provides a little extra information. The Request tab presents a text area in which you can enter key/value pairs for the request one to a line, kind of like a properties file. Use the Samples button to populate the request text area with prefabricated requests to learn more about what kinds of requests could be performed. Once you click 'Send Request' jQuery kicks in some AJAX to go get the response from Content Server in JSON format. That response is plugged into a text area on the Response tab. At this time that is meant only for review. At some point I will get around to allowing editing of the response data and making those edits stick. After you have examined the response, click the Work Bench tab. Again, sample scripts are available to get you started. You can take advantage of a div below the Work Bench area with the id of 'canvas' to craft HTML from the response data. So remember, response data is in a variable named jsonData and the div you can populate with HTML, etc., is named canvas. Download
0 Comments
When you want to get paging controls for your ResultSet and the ResultSet in question is SearchResults from one of a few search services you can include the xui_results_page_nav_controls dynamic html snippet to get paging controls on your page. You may have to jump through a few hoops because the buttons may not currently point to YOUR page. That is doable with some detective work. But what if you have a custom ResultSet that you want to page across? Your service points to your template which may include snippets from your resource file. Somewhere in there you carefully create your own ResultSet. Now you want to display this with x records at a time. This Paging Sample Component shows one way to accomplish this task. I create a dummy ResultSet, display x records to the page, and setup paging controls at the bottom. Quick, dirty and certainly could use more work, but I wanted to get the sample out there. Install, restart, and visit: <HttpCgiPath>?IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=PAGING_SAMPLE
I do content server development a lot. Unfortunately I have other responsibilities as well. I also move around a fair bit so I fire up the old laptop and shut it down a lot. I set my SQL Server, Apache and Content Server services all to manual. I really hate waiting for all that to load up when all I want to do is get online to triage email, etc. I have created two PowerShell scripts I have used to startup and shutdown various services in the “proper order”. The scripts themselves are very simple. They include a list of service names set into a variable and one more line to start or stop each service in the list. The StartUCM Script $services = “MSSQLSERVER”, “msftesql”, “SQLWriter”, “IdcAdminService idc_admin”, “IdcContentService idc”, “IdcRefineryService ibr”, “Apache2.2″ $services | get-service -ErrorAction silentlycontinue | start-service The StopUCM Script $services = “Apache2.2″, “IdcContentService idc”, “IdcAdminService idc_admin”, “IdcRefineryService ibr”, “SQLWriter”, “msftesql”, “MSSQLSERVER” $services | get-service -ErrorAction silentlycontinue | start-service When I fire up my laptop and want to work with content server I can click start and enter “powershell startcum” and press enter. I could also have shortcut on the desktop, etc. For the trick I use to work I had to add the directory where I keep my PowerShell scripts to my Path environment variable.
Use can use the following configuration setting to disable contribution on a content server: DisableSiteStudioContribution=true Over on John's Blog you can find even more information about disabling and/or "enhancing" the contributor key-stroke Component: Site Studio – Consumption to Contribution Ctrl Shift F5 redirect Guide: Disable ctrl + shift + f5 Site Studio contributor option Updated: Consumption to Contribution Ctrl Shift F5 redirect.
The Oracle Technology Network has a page with samples, viewlets and material on using Site Studio 10gR4. Specfically, there is a nicePDF About Using 10gR4 From External Applications.
|
Categories
All
Archives
March 2017
|