Demonstration of using Spring and ADF together

I have wondered about the potential for combining the ADF Binding Framework and the IDE capabilities around ADF in Oracle 10g JDeveloper with the Spring Framework. I concluded rapidly that the most meaningful way forward would be to implement a Business Service based on DAO interfaces and DAO implementation classes, potentially using either Hibernate or Toplink or – as in this case – plain JDBC made easy by Spring JDBC Templates, and registering that service as a DataControl with the ADF Binding Framework. Once that DataControl is registered, it cannot be discerned from other POJO based DataControls and it can be used just as easy as in most cases as the ADF BC based Data Controls. That means: rapidly developing web applications, largely through dragging and dropping Data Controls and their components in a WYSIWYG style visual editor becomes a reality.
I have written an article that describes how to set up a simple Spring Business Service - based on POJO and plain JDBC although this could also have been Hibernate or Toplink for example- and register that Business Service as Data Control with ADF Binding Framework. I then continue in a familiar way to create a UIX page that displays data from the Spring Business Service.
I believe this is a useful first step in combining Spring (hot, open source, talk of the town) with ADF (productive, linking and decoupling point for Model vs. View/Controller).
In case you are interested, please take a look at: http://technology.amis.nl/blog/index.php?p=765
best regards,
Lucas Jellema

Peter,
I am not aware of any project like this right now. However, Duncan Mills did develop a data control for Spring that he used for his talk. For some reason I don't know, this data control however never made it to production. However, you should be able to integrate Spring through a POJO data control
Frank

Similar Messages

  • E-Business Suite Application Dev using OAF and ADF (White Paper Feb. 2008)

    Hi,
    In Oracle White Paper entitled "E-Business Suite Application Dev using OAF and ADF (Feb. 2008)" it was mentioned on page 7 :
    +"When ADF 11g becomes production, we will publish a revised paper that compares OAF with ADF 11g, and discuss development against E-Business Suite."+
    I've had no luck finding a new comparison table for OAF R12 with ADF 11g :(
    can anyone help me on this?
    thanks in advance,
    Adrian

    Srini Chavali wrote:
    It is still not clear if your have to use SSO - the scripts loadsdk.sql and regapp.sql specifically are for Oracle Single Sign ON (OSSO) - the authentication schemes referred to on page 20 of the same doc do not require SSO. So, is SSO a requirement in your scenario ? If not, you should be following the steps in the section titled "Confuguring Custom Authentication" (beginning of page 20).Ouch..Sorry Srini, I have completely misinterpreted by the page no.'s in Adobe pdf reader.I was telling you about page 18 of the document.
    Anyway i'll start with configuring Custom Authentication as by your suggestion.
    But i'll move forward with no understandings about SSO and its implementations.
    All I could get is this links
    http://docs.oracle.com/cd/E15586_01/webcenter.1111/e12405/wcadm_security_sso.htm
    http://docs.oracle.com/cd/E15523_01/install.1111/e12002/sso_das.htm
    Is this link correct to start learning about SSO or do I need to learn anything (LDAP,OAM,etc..) before that ?

  • Hibernate problem..... using projection and conjunction together..

    hi all ,
    can we use projection and conjunction together??
    i want to execute a query like this..
    select column_1 , column_2 from table_name where column_1 like '%a' ;

    hi ian
    you could also try verifying if the jar libraries containing your Document and Paragraph classes are defined in your class path OR if you are using an IDE, did you include that under your LIbraries?
    The previous suggestion below also is a stop-gap to the library inclusion problem.
    Hope that helps

  • Use bottom and protect together

    Hi all,
    May I know the that possible to use BOTTOM and PROTECT together with few lines of text inbetween?
    Eg:
    BOTTOM
    PROTECT
    texttexttext
    texttexttext
    texttexttext
    ENDPROTECT
    ENDBOTTOM
    or
    PROTECT
    BOTTOM
    texttexttext
    texttexttext
    texttexttext
    ENDBOTTOM
    ENDPROTECT
    Above code dont work for me. Please advice thank!!!

    Hi Kek,
    Refer this link,
    [Bottom..Endbottom|http://help.sap.com/saphelp_nw70/helpdata/en/d6/0db4a9494511d182b70000e829fbfe/content.htm]
    Regards,
    Sravanthi

  • Can I cluster a web app that uses Spring and iBATIS?

    I have a web app that uses Spring and iBATIS. It runs great on a single server. I am now trying to get it to run in a cluster. I went through the code and made all the classes serializable. Also, I added the distributable tag to the web.xml. I then deployed it to two clustered app servers.
    When I logon and use the web app, everything goes well. Then, as a test, I determine which app server is being used and stop the web app on it. As I try to continue my session, the following exceptions are generated from the other node:
    java.lang.IllegalArgumentException: No SqlMapClient specified.
    The exception is being thrown from the Spring code. Is there something else I need to do to get Spring and iBatis to work in a clustered environment.
    Also, I see a lot of references to Terracotta as a clustering solution. Will Terracotta work with Oracle App Server?

    Thanks for the response.
    I think my session information is being shared. I've configured the default application in my OC4J configured for peer-to-peer clustering. Before I did this, if I shut down the instance I was using, it would fail-over to the other application server but my session would be gone and I would be forced to logon again. But once I was logged on, everything ran smoothly.

  • Using Concat and Distinct together

    hi
    I am using the query below and I am getting 'missing expression' error. How do use Distinct and concat together?
    SELECT 'SELECT ' || DISTINCT COLUMN || ' FROM DUAL UNION ALL '
    FROM TABLE;

    Hi,
    SeshuGiri wrote:
    hi
    I am using the query below and I am getting 'missing expression' error. How do use Distinct and concat together?
    SELECT 'SELECT ' || DISTINCT COLUMN || ' FROM DUAL UNION ALL '
    FROM TABLE;Whenever you have a problem, please post CREATE TABLE and INSERT statments for a little sample data, and the results you want from that data.
    The example you posted has so many mistakes, it's hard to know what you're trying to do.
    COLUMN, DISTINCT and TABLE are all Oracle keywords, and shouldn't be used for actual columnor table names, and using them for aliases is just asking for trouble.
    When using SELECT DISTINCT, the keyword DISTINCT must come immediately after SELECT.
    If you want to assign an alias to a column, it must be at the very end of the expression that defines the column. You can't assign an alias to part of an expression. If you want to do that, use a sub-query.
    Here's a query that uses both SELECT DISTINCT and ||:
    SELECT DISTINCT
            job || deptno    AS jd
    FROM    scott.emp;Edited by: Frank Kulash on May 13, 2011 2:52 PM

  • Using Airport And Ethernet Together

    Having read Christopher Breen's solution to using Airport and Ethernet together,
    http://www.macworld.com/weblogs/mac911/2006/10/airportswitch/index.php
    I am still wondering if this can apply to my situation. I have an Airport Exteme BS distributing the wireless signal on it's own node. Nothing is physically connected to the BS except an ethernet cable running to a hub which is connected to the cable modem. While my ISP service isn't supplying service faster than Airport will manage, no problem...but, I would like to have the advantage ethernet networking between my machines for all the advantages that ethernet speed can bring to that situation.
    My connection to the internet is from WAN from the cable modem. I have an ethernet connection from the BS that I can run a cable back to say, an iBook. Will this work? I want wireless internet, but ethernet for machine to machine networking.
    JAL
    iBook G3/500 G4/Dual 450 Mac OS X (10.4)
    iBook G3/500 G4/Dual 450 Mac OS X (10.4)

    Helpful response, but I am uncertain this is what I am after. First, the hub is at the other end of the house, inconvenient to run a cable to it in this way. Presently, "Distribute IP Addresses" is turned off. This is way it had to be set since the AEBS is on a separate node. I just wonder why I can't run a cable from the AEBS LAN port back to the iBook. Looking for best possible speed when networking from my studio G4 while keeping the wireless internet setting.
    Any reason making the config the way I am imagining will not work?

  • IllegalStateException in View (using JBOSS and ADF)

    Hi:
    I have a project using JBOSS and ADF. I have a form with the following code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@ page contentType="text/html"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af" %>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh" %>
    <f:view>
    <afh:html id="html">
    <afh:head title="FisaSystem">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252" />
    <link rel="stylesheet" type="text/css" media="screen" title="screen" href="<%=request.getContextPath()%>/common/skins/fisaClassic/screen.css" />
    </afh:head>
    <afh:body id="body">
    <h:form id="form">
    <af:panelPage>
    <af:showOneTab id="showOneTab" position="above">
    <af:showDetailItem text="" id="showDetailItem">
    <af:panelForm id="panelForm">
    <af:inputText id="clasificationDescription" binding="#{clasificationManager.clasificationDescription}" required="true" />
    </af:panelForm>
    </af:showDetailItem>
    </af:showOneTab>
    <f:verbatim>
    <div class="actions">
    </f:verbatim>
    <af:panelButtonBar>
    <af:commandButton id="saveButton" text="#{internationalizationManager.saveButton}" action="#{clasificationManager.saveClasification}" />
    <af:commandButton id="cancelButton" text="#{internationalizationManager.cancelButton}" action="#{clasificationManager.cancelClasification}" immediate="true" />
    </af:panelButtonBar>
    <f:verbatim>
    </div>
    </f:verbatim>
    </af:panelPage>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    the backing bean for that form i like this:
    package com.fisa.efisa.document.manage.bean;
    import java.util.Collection;
    import oracle.adf.view.faces.component.UIXInput;
    import oracle.adf.view.faces.component.UIXTable;
    import oracle.adf.view.faces.context.AdfFacesContext;
    import oracle.adf.view.faces.event.LaunchEvent;
    import oracle.adf.view.faces.event.ReturnEvent;
    import com.fisa.efisa.document.dto.EFPClasification;
    import com.fisa.efisa.document.manage.common.CommonBackingBean;
    import com.fisa.efisa.process.document.persistence.TdmmClasification;
    import com.fisa.efisa.process.document.service.ServiceClasification;
    import com.fisa.efisa.process.document.service.delegate.ServiceClasificationDelegate;
    import com.fisa.efisa.process.engine.service.ServiceProcessEngine;
    import com.fisa.efisa.process.engine.service.delegate.ServiceProcessEngineDelegate;
    import com.fisa.util.Action;
    import com.fisa.util.message.FTransactionMessage;
    import com.fisa.util.message.Field;
    import com.fisa.util.message.FisaMessage;
    public class ClasificationBackingBean extends CommonBackingBean {
    private final String CLASIFICATION_IDENTIFIER = "clasification";
    ServiceClasification serviceClasification;
    ServiceProcessEngine serviceProcessEngine;
    UIXTable clasificationTable;
    UIXInput clasificationDescription = new UIXInput();
    public ClasificationBackingBean() {
    serviceClasification = new ServiceClasificationDelegate();
    serviceProcessEngine = new ServiceProcessEngineDelegate();
    public Collection getClasificationList() {
    return serviceClasification.findAllClasification(getFisaUserData());
    public String addClasification() {
    return ADD_OUTCOME;
    public String editClasification() {
    TdmmClasification row = (TdmmClasification) this.clasificationTable.getSelectedRowData();
    if (row != null)
    storeObjectInRequest(this.CLASIFICATION_IDENTIFIER, row.getClasificationId());
    else
    return null;
    return EDIT_OUTCOME;
    public String saveClasification() {
    return LIST_OUTCOME;
    public String deleteClasification() {
    if (this.clasificationTable.getSelectedRowData() != null)
    return CONFIRM_DELETE_KEY;
    return null;
    public void handleConfirmDeleteReturn(ReturnEvent event) {
    if (event.getReturnValue() != null) {
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.clasificationTable);
    public void handleConfirmDeleteLaunch(LaunchEvent event) {
    Object row = this.clasificationTable.getSelectedRowData();
    if (row != null)
    event.getDialogParameters().put(DELETE_OBJECT_KEY, row);
    public String cancelClasification() {
    return LIST_OUTCOME;
    public UIXTable getClasificationTable() {
    return clasificationTable;
    public void setClasificationTable(UIXTable clasificationTable) {
    this.clasificationTable = clasificationTable;
    public UIXInput getClasificationDescription() {
    if (this.getClasificationFromRequest() != null)
    clasificationDescription.setValue(this.getClasificationFromRequest().getDescription());
    return clasificationDescription;
    public void setClasificationDescription(UIXInput clasificationDescription) {
    this.clasificationDescription = clasificationDescription;
    private EFPClasification getClasificationFromRequest() {
    Long rowId = null;
    if (retrieveObjectFromRequest(this.CLASIFICATION_IDENTIFIER) != null) {
    rowId = (Long) retrieveObjectFromRequest(this.CLASIFICATION_IDENTIFIER);
    FisaMessage fisaMessage = new FisaMessage();
    fisaMessage.setHeader(getMessageHeader());
    FTransactionMessage transactionMessage = new FTransactionMessage();
    transactionMessage.setFtmApplicationId(getApplicationId());
    transactionMessage.setFtmSourceSystemId(getSystemId());
    transactionMessage.setFtmSubSystemId(getSubsystemId());
    transactionMessage.setFtmBusinessTemplateId(getClasificationBtId());
    EFPClasification efpClasification = new EFPClasification(transactionMessage);
    Field field = new Field();
    field.setValue(rowId.toString());
    transactionMessage.addField(efpClasification.CLASIFICATION_ID, field);
    transactionMessage.setFtmActionId(Action.QUERY_LIVE);
    transactionMessage.setBtDataKey(rowId.toString());
    fisaMessage.getFTransactionMessages().put(getClasificationBtId(), transactionMessage);
    fisaMessage = this.serviceProcessEngine.executeMessage(fisaMessage);
    transactionMessage = fisaMessage.getFTransactionMessages().get(getClasificationBtId());
    efpClasification = new EFPClasification(transactionMessage);
    return efpClasification;
    return null;
    And this is my faces-config
    <?xml version="1.0"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    <!--param-value>server</param-value-->
    </context-param>
    <context-param>
    <param-name>
    oracle.adf.view.faces.USE_APPLICATION_VIEW_CACHE
    </param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>
    oracle.adf.view.faces.ENABLE_DMS_METRICS
    </param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>
    oracle.adf.view.faces.CHECK_FILE_MODIFICATION
    </param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>
    oracle.adf.view.faces.CHANGE_PERSISTENCE
    </param-name>
    <param-value>session</param-value>
    </context-param>
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>
    oracle.adf.view.faces.webapp.AdfFacesFilter
    </filter-class>
    </filter>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <servlet-name>faces</servlet-name>
    </filter-mapping>
    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <!-- resource loader servlet -->
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>
    oracle.adf.view.faces.webapp.ResourceServlet
    </servlet-class>
    </servlet>
    <!-- Faces Servlet Mappings -->
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <!-- Welcome Files -->
    <welcome-file-list>
    <welcome-file>index.jspx</welcome-file>
    </welcome-file-list>
    <!-- ADF Faces Tag Library -->
    <taglib>
    <taglib-uri>http://xmlns.oracle.com/adf/faces</taglib-uri>
    <taglib-location>/WEB-INF/af.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://xmlns.oracle.com/adf/faces/html</taglib-uri>
    <taglib-location>/WEB-INF/afh.tld</taglib-location>
    </taglib>
    <!-- Faces Core Tag Library -->
    <taglib>
    <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
    <taglib-location>/WEB-INF/jsf_core.tld</taglib-location>
    </taglib>
    <!-- Faces Html Basic Tag Library -->
    <taglib>
    <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
    <taglib-location>/WEB-INF/html_basic.tld</taglib-location>
    </taglib>
    <login-config>
    <auth-method>BASIC</auth-method>
    </login-config>
    </web-app>
    As you see there's nothing really weird about this at all; if i use this page as displayed, i click on any of the buttons and everything works fine. But, if i add any other property to the clasificationDescription adf:inputText (a label for example), then it crashes with this error:
    java.lang.IllegalStateException: Invalid index
    oracle.adf.view.faces.bean.util.StateUtils.restoreKey(StateUtils.java:57)
    oracle.adf.view.faces.bean.util.StateUtils.restoreState(StateUtils.java:129)
    oracle.adf.view.faces.bean.util.AbstractPropertyMap.restoreState(AbstractPropertyMap.java:94)
    oracle.adf.view.faces.bean.FacesBeanImpl.restoreState(FacesBeanImpl.java:247)
    oracle.adf.view.faces.component.UIXComponentBase.restoreState(UIXComponentBase.java:761)
    oracle.adf.view.faces.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:749)
    oracle.adf.view.faces.component.TreeState.restoreState(TreeState.java:80)
    oracle.adf.view.faces.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:743)
    oracle.adf.view.faces.component.TreeState.restoreState(TreeState.java:80)
    oracle.adf.view.faces.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:743)
    oracle.adf.view.faces.component.TreeState.restoreState(TreeState.java:80)
    oracle.adf.view.faces.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:743)
    oracle.adf.view.faces.component.TreeState.restoreState(TreeState.java:80)
    oracle.adf.view.faces.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:743)
    oracle.adf.view.faces.component.TreeState.restoreState(TreeState.java:80)
    oracle.adf.view.faces.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:743)
    javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1019)
    oracle.adfinternal.view.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:330)
    com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:228)
    oracle.adfinternal.view.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:232)
    com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    What can be happening ???

    This forum is only for questions directly related to the Sun Web Server. I think you should post your questions in the jboss forums. Alternative, you could use one of the sun products and then we would be able to help you ;)

  • I want to use ps and illustrator together, but I just bought the photoshop membership, could I upgrade my membership?

    I want to use ps and illustrator together, but I just bought the photoshop membership, could I upgrade my membership?

    You may upgrade to the entire plan, or just add an individual program subscription
    Upgrade single to all Cloud http://forums.adobe.com/thread/1235382
    Cloud Plans https://creative.adobe.com/plans
    -and subscription terms http://www.adobe.com/misc/subscription_terms.html
    -what is in the entire Cloud http://www.adobe.com/creativecloud/catalog/desktop.html
    -http://www.adobe.com/products/catalog/mobile._sl_id-contentfilter_sl_catalog_sl_mobiledevi ces.html

  • How to customize events, execute stored procedures using JSF and ADF BC

    As a java beginner, I started with developing simple web application using JSF and ADF business component through visual and declarative approach. I need to know how to customize events, execute stored procedures, invoke functions on triggering events associated with rich controls. for eg. how to write customized functions on button click or checkbox click events to achieve business requirement and can be modified whenever required.
    Edited by: 792068 on Aug 31, 2010 9:40 PM

    Which business layer is prefered to create interactive data model: 1. ADF business components or 2. Enterprise JavaBeans using Java persistance API (JPA) or 3. Toplink 4. Portlets
    which minimizes writing low level codes and how much OOPS knowledge is required for creating above business layer binding data to viewcontroller layer?

  • Spring and ADF Genesis

    I made a presentation about the Spring Framework to an Oracle-centric development team the other day. This team has developed over the years a number of Oracle Forms applications that have evolved from 6i to Forms 10g and slowly to JSF as needed.
    One of the lead developers said that ADF and Spring both evolved from the 2002 book on J2EE development by Rod Johnson. And that, in fact, one can find in ADF many components that are essentially the same as in Spring even down to sharing a similar architecture and similar package names.
    I do not know ADF, so I was curious if these assertions are accurate?
    Thanks,
    Brad

    Brad,
    You can see the history of JDeveloper and ADF releases here:
    http://radio.weblogs.com/0118231/stories/2005/02/25/historyOfJdeveloperReleases.html
    This month we're celebrating the 10th year anniversary of our initial development of Java Business Objects (JBO) that was later renamed to Business Components for Java (BC4J) which became ADF Business Components as part of the broader Oracle ADF framework in later releases.
    In March of 2002 when discussions about J2EE Design Patterns were all the rage in developer communities doing J2EE development, I wrote the following whitepaper:
    http://otn.oracle.com/products/jdev/collateral/tutorials/903/j2ee_bc4j/prnt/j2ee_bc4j.html
    I wanted to help people understand that while reading about J2EE Design Patterns in the numerous books that cover them is one thing, having a robust, tested, and performant implementation of all the design patterns you need is quite a more valuable proposition. The ADF Business Components framework (a.k.a. BC4J before) provides this implementation (and design time support built-in to Oracle JDeveloper to facilitate the framework's use) for you. This paper explains in detail many of the high-productivity features and the ADF Business Components framework offers you to foster a well-architected and well-performing J2EE application.
    Another whitepaper I wrote in 2005 mentions Rod Johnson by name and quotes some things from his then-recent book:
    http://www.oracle.com/technology/products/jdev/tips/muench/adftoystore1012/readme.html
    Oracle ADF and Spring do have some similarities in terms of providing a "full stack framework" and layered ways to glue different technologies together, but ADF Business Components predates Spring by several years and JDeveloper/OracleADF combination is a one-stop-shop for highly-declarative enterprise application development.

  • Using generics and J2SE together with JSF

    Hi
    Has anybody experience with using JSF together with J2SE 1.5? Especially generics? I would like to use generics and other improvements from J2SE in the model objects.
    Thnaks in advance ... Rick

    JSF 1.1 is specified for J2SE 5, and the new specification (JSF 1.2 and JSP 2.1) does not include generics.
    If you are talking in terms of ValueBindings or MethodBindings, there really isn't any point since the implementation could only make the cast for you; and it would still not be able to garuantee type safety (the only reason to use generics).
    That's not to say you couldn't use generics in your own development, but I don't think you will see generics incorporated into the specification any time soon.
    Jacob Hookom (JSR-252 EG)

  • Using Struts and JSTL together

    I have
    <html:form action="xy.do">
    <c:set var="name" value="shalik"/>
    <html:text property="name" value="<c:out value="${name}"/>"/>
    </html:form>
    How could I put data stored in ${name} to show in the text
    Also, is there a shorter way to access java variables using jstl core
    I would not want to do
    <input type="text" name="name" value="<c:out value="${name}"/>"/>
    which works, because I have to use struts

    No you can't include tags as attributes to other tags.
    Yes, you can definitely use the Struts and JSTL together.
    If you want to use EL expressions with the struts tags, it depends on your server.
    If you have a JSP2.0 container (eg Tomcat 5) its no problem at all. You can use the EL expressions directly with the standard struts tags.
    For a JSP1.2 container, there are specifically written struts-el tags. They let you use EL expressions instead of <%= %> expressions
    <c:set var="name" value="shalik"/>
    <html:text property="name" value="${name}"/>The struts-el tags only have a subset of the struts tags. It is intended for use with the JSTL. For instance the c:if tag easily replaces a lot of the logic conditional ones (equal, lessThan, etc etc)
    The tags are available as part of the standard struts download in the contrib directory.
    However for what you seem to be wanting to do, wouldn't it be more struts-like to have an action that specifically populates the action form, and just have
    <html:text property="name"/>
    The value would then be automagically populated from the form bean.
    Hope this helps,
    evnafets

  • Using forall and bulkcollect together

    Hey group,
    I am trying to use bulk collect and forall together.
    i have bulk collect on 3 columns and insert is on more than 3 columns.can anybody tell me how to reference those collection objects in bulk collect statement.
    you can see the procedure,i highlighted things am trying.
    Please let me know,if am clear enough.
    PROCEDURE do_insert
    IS
    PROCEDURE process_insert_record
    IS
    CURSOR c_es_div_split
    IS
    SELECT div_id
    FROM zrep_mpg_div
    WHERE div_id IN ('PC', 'BP', 'BI', 'CI', 'CR');
    PROCEDURE write_record
    IS
    CURSOR c_plan_fields
    IS
    SELECT x.comp_plan_id, x.comp_plan_cd, cp.comp_plan_nm
    FROM cp_div_xref@dm x, comp_plan@dm cp
    WHERE x.comp_plan_id = cp.comp_plan_id
    AND x.div = v_div
    AND x.sorg_cd = v_sorg_cd
    AND x.comp_plan_yr = TO_NUMBER (TO_CHAR (v_to_dt, 'yyyy'));
    TYPE test1 IS TABLE OF c_plan_fields%ROWTYPE
    INDEX BY BINARY_INTEGER;
    test2 test1;
    BEGIN -- write_record
    OPEN c_plan_fields;
    FETCH c_plan_fields bulk collect INTO test2;
    CLOSE c_plan_fields;
    ForAll X In 1..test2.last
    INSERT INTO cust_hier
    (sorg_cd, cust_cd, bunt, --DP
    div,
    from_dt,
    to_dt,
    cust_ter_cd, cust_rgn_cd, cust_grp_cd,
    cust_area_cd, sorg_desc, cust_nm, cust_ter_desc,
    cust_rgn_desc, cust_grp_desc, cust_area_desc,
    cust_mkt_cd, cust_mkt_desc, curr_flag,
    last_mth_flag, comp_plan_id, comp_plan_cd,
    comp_plan_nm, asgn_typ, lddt
    VALUES (v_sorg_cd, v_cust_cd, v_bunt, --DP
    v_div,
    TRUNC (v_from_dt),
    TO_DATE (TO_CHAR (v_to_dt, 'mmddyyyy') || '235959',
    'mmddyyyyhh24miss'
    v_ter, v_rgn, v_grp,
    v_area, v_sorg_desc, v_cust_nm, v_cust_ter_desc,
    v_rgn_desc, v_grp_desc, v_area_desc,
    v_mkt, v_mkt_desc, v_curr_flag,
    v_last_mth_flag, test2(x).comp_plan_id,test2(x).comp_plan_cd,
    test2(x).comp_plan_nm, v_asgn_typ, v_begin_dt
    v_plan_id := 0;
    v_plan_cd := 0;
    v_plan_nm := NULL;
    v_out_cnt := v_out_cnt + 1;
    IF doing_both
    THEN
    COMMIT;
    ELSE
    -- commiting v_commit_rows rows at a time.
    IF v_out_cnt >= v_commit_cnt
    THEN
    COMMIT;
    p.l ( 'Commit point reached: '
    || v_out_cnt
    || 'at: '
    || TO_CHAR (SYSDATE, 'mm/dd hh24:mi:ss')
    v_commit_cnt := v_commit_cnt + v_commit_rows;
    END IF;
    END IF;
    END write_record;

    Ugly code.
    Bulk processing does what in PL? One and one thing only. It reduces context switching between the PL and SQL engines. That is it. Nothing more. It is not magic that increases performance. And there is a penalty to pay for the reduction in context switching - memory. Very expensive PGA memory.
    To reduce the context switches, bigger chunks of data are passed between the PL and SQL engines. You have coded a single fetch for all the rows from the cursor. All that data collected from the SQL engine has to be stored in the PL engine. This requires memory. The more rows, the more memory. And the memory used is dedicated non-shared server memory. The worse kind to use on a server where resources need to be shared in order for the server to scale.
    Use the LIMIT clause. That controls how many rows are fetched. And thus you manage just how much memory is consumed.
    And why the incremental commit? What do you think you are achieving with that? Except consuming more resources by doing more commits.. not to mention risking data integrity as this process can now fail and result in only partial changes. And only changing some of the rows when you need to change all the rows is corrupting the data in the database in my book.
    Also, why use PL at all? Surely you can do a INSERT into <table1> SELECT .. FROM <table2>,<table3> WHERE ...
    And with this, you can also use parallel processing (DML). You can use direct path inserts. You do not need a single byte of PL engine code or memory. You do not have to ship data between the PL and SQL engines. What you now have is fast performing code that can scale.

  • Using swingworker and invokeLater together

    Hi all�
    Anyone knows if there is an appropiate way to use the worker thread through SwingWorker and invokeLater together?
    It maybe sounds a bit weird but I have to launch a thread from EDT with invokeLater utility, otherwise i'd get a block state between EDT and my own thread. In other hand, I need to use SwingWorker utility for try to avoid the awful effect of loosing the visual desktop while transaction is proccesing.
    Obviously, if i use SwingWorker and inside doInBackGorund method, launch my thread with invokeLater it doesnt make any sense since the worker do its work in differents threads...
    I'd appreciate any help concerning this problem.

    Hi Albert,
    I believe that this code might help:
    /*SwinWorker Clas*/
    package swingworker;
    import javax.swing.SwingUtilities;
    * This is the 3rd version of SwingWorker (also known as
    * SwingWorker 3), an abstract class that you subclass to
    * perform GUI-related work in a dedicated thread.  For
    * instructions on using this class, see:
    * http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
    * Note that the API changed slightly in the 3rd version:
    * You must now invoke start() on the SwingWorker after
    * creating it.
    public abstract class SwingWorker {
        private Object value;  // see getValue(), setValue()
        private Thread thread;
         * Class to maintain reference to current worker thread
         * under separate synchronization control.
        private static class ThreadVar {
            private Thread thread;
            ThreadVar(Thread t) { thread = t; }
            synchronized Thread get() { return thread; }
            synchronized void clear() { thread = null; }
        private ThreadVar threadVar;
         * Get the value produced by the worker thread, or null if it
         * hasn't been constructed yet.
        protected synchronized Object getValue() {
            return value;
         * Set the value produced by worker thread
        private synchronized void setValue(Object x) {
            value = x;
         * Compute the value to be returned by the <code>get</code> method.
        public abstract Object construct();
         * Called on the event dispatching thread (not on the worker thread)
         * after the <code>construct</code> method has returned.
        public void finished() {
         * A new method that interrupts the worker thread.  Call this method
         * to force the worker to stop what it's doing.
        public void interrupt() {
            Thread t = threadVar.get();
            if (t != null) {
                t.interrupt();
            threadVar.clear();
         * Return the value created by the <code>construct</code> method.
         * Returns null if either the constructing thread or the current
         * thread was interrupted before a value was produced.
         * @return the value created by the <code>construct</code> method
        public Object get() {
            while (true) {
                Thread t = threadVar.get();
                if (t == null) {
                    return getValue();
                try {
                    t.join();
                catch (InterruptedException e) {
                    Thread.currentThread().interrupt(); // propagate
                    return null;
         * Start a thread that will call the <code>construct</code> method
         * and then exit.
        public SwingWorker() {
            final Runnable doFinished = new Runnable() {
               public void run() { finished(); }
            Runnable doConstruct = new Runnable() {
                public void run() {
                    try {
                        setValue(construct());
                    finally {
                        threadVar.clear();
                    SwingUtilities.invokeLater(doFinished);
            Thread t = new Thread(doConstruct);
            threadVar = new ThreadVar(t);
         * Start the worker thread.
        public void start() {
            Thread t = threadVar.get();
            if (t != null) {
                t.start();
    /*TestSwingWorker*/
    package swingworker;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyApplication {
        public static void main(String[] argv) {
            final JFrame f = new JFrame("Test SwingWorker");
            /* Invoking start() on a SwingWorker causes a new Thread
             * to be created that will run the worker.construct()
             * method we've defined here.  Calls to worker.get()
             * will wait until the construct() method has returned
             * a value (see below).
            final SwingWorker worker = new SwingWorker() {
                public Object construct() {
                    return new ExpensiveDialogComponent();
            worker.start();  //new for SwingWorker 3
            /* The ActionListener below gets a component to display
             * in its message area from the worker, which constructs
             * the component in another thread.  The call to worker.get()
             * will wait if the component is still being constructed.
            ActionListener showSwingWorkerDialog = new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    JOptionPane.showMessageDialog(f, worker.get());
            JButton b = new JButton("Click here to show component constructed by SwingWorker");
            b.addActionListener(showSwingWorkerDialog);
            f.getContentPane().add(b);
            f.pack();
            f.show();
            //The following is safe because adding a listener is always safe.
            f.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
    class ExpensiveDialogComponent extends JLabel {
        public ExpensiveDialogComponent() {
            super("This is the world's most expensive label.");
            try {
                Thread.sleep(10000); //sleep for 10 seconds
            } catch (InterruptedException e) {
    }Hope it helps!

Maybe you are looking for

  • URGENT: help me to update PO_STANDARD_XSLFO.xsl

    Hi we need the standard PO out put with our company logo and name. For that I would like to insert our Company logo and name into the standard template PO_STANDARD_XSLFO.xsl, I tried to upload our own template to "Standard Purchase Order Stylesheet"

  • CADO Report - Missing Project Definition and WBS elements

    While running CADO (time sheet data) report for employee, data is not being pulled up for the WBS Element and Project Definition. What could be the reason? Here time is entered against a network activity but for some entries WBS element and project d

  • Can I de-install ios 8.0.2 from my iphone 5s

    can I un-install ios 8.0.2 from my iphone 5s

  • How do I deactivate Lightroom 4 on my old computer?

    Tomorrow I am trading in my old computer (MacBook Pro) for a new computer.  How do I deactivate and uninstall Lightroom 4 on my old computer? In Photoshop CS6 there was a "deactivate" option in the Help menu, but it is not there for Lightroom 4.

  • Windows mail and blank pdf attachments

    I am new to windows 8.  I just started using my HP ENVY -Z Notebook PC I have been receiving and sending out email for the past week. This morning however I was having problems sending out emails trying all the email accounts I have added to Windows