I use a lot of software, and lately almost all of it has been from Oracle. I had written a note to Todd Trichler of Oracle after last year’s Rocky Mountain Oracle Users Group Training Days, as almost every Oracle presenter used a similar image for presenting material, and I wanted to get a copy of the image. Well, it seems that the image has arrived, and you can download it here.
JDeveloper
...now browsing by category
Oracle Virtualbox appliance for Database App Development
Monday, September 27th, 2010JDev 10.1.2 Portlet that consumes RSS Feed
Tuesday, May 4th, 2010Today, I created several servlets that generate RSS feeds from dynamic data in tables. In order to view the data in another page, it made sense to use a simple portlet. When creating the definition, just make sure that you allow for a single parameter, the feed URL, when defining the provider.
This seems to work fairly well, and I have already created several versions that display the data differently. When I get time, I hope to update that code using CSS to format the data, but that will wait for another day.
<%@page contentType="text/html; charset=UTF-8"%> <%@page import="oracle.portal.provider.v2.ParameterDefinition"%> <%@page import="oracle.portal.provider.v2.render.PortletRenderRequest"%> <%@page import="oracle.portal.provider.v2.http.HttpCommonConstants"%> <% PortletRenderRequest pReq = (PortletRenderRequest) request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST); ParameterDefinition params[] = pReq.getPortletDefinition().getInputParameters(); String sURL = ""; try { sURL = pReq.getParameter("p_url"); if (sURL == null || sURL.equals("")) { System.out.println("sURL could not be determined"); sURL = "http://www.weather.com/weather/today/Castle+Rock+CO+80104?cm_pla=city_page&cm_ite=cc&site=city_page&cm_ven=LWO&cm_cat=rss&par=LWO_rss"; } } catch (Exception e) { System.out.println("Error:" + e.getMessage()); } out.println(rssfeedconsumer.mypackage.RSSReader.getFeed(sURL)); %>
You may be wondering where the java code is that generates the actual feed. I can post that later, but for those that want this now, here is a link from the site that I based my code from.
Oracle Portlets with multiple datasources
Friday, March 12th, 2010I just finished creating an updated portlet for work. There were two changes that were needed, data from two different database instances and the format was changed to use <dt> and <dd> tags. This allows for a rolling scrollable format to be defined by a cascading style sheet.
I thought this would take a couple of hours, so estimated this at about four hours to complete. Now I’m finished, and it is six hours after starting. So what went wrong? The biggest mistake that I made was not really understanding what happens when the files are bundled up for deployment. When creating the two separate model projects, I used the same name for the package name. I was using different names for the model projects, so no problem, right? Wrong! When the files get packaged, the package names are used in a combined classes directory. Since I have two different bc4j.xcfg files defined, one of them gets clobbered and I get an obscure jbo oracle error.
If you are using multiple models in a project, just use a unique package name for each one, and things will go much better for you! Though, it might still take six hours instead of two…