ANNOUNCE:  Designing JSF Applications: a Storyboard Approach — Part 2

Hello,
In the second article of this series on using storyboard design for Web applications, Steven Murray explains how to map the Storyboard design to a JSF implementation, giving special attention to Storyboard Controllers.
Here is an excerpt:
In part 1 of this series we discussed how to create storyboard designs for Web applications. In part 2 we are going to focus on how to map the design to a JSF implementation, giving special attention to Storyboard Controllers.
Controllers are the heart of the presentation tier, where they manage the behavior of the UI and direct the flow of information between the presentation and business models. Almost every article I read on JSF, and even the specification itself, references Model View Controller (MVC) without providing any concrete examples on how to actually use it in a JSF project. I hope to change that with the introduction of the Presentation Model.
Read the full article or download the podcast here: [Designing JSF Applications: a Storyboard Approach — Part 2|http://www.jsfcentral.com/articles/storyboard_2.html] =>http://www.jsfcentral.com/articles/storyboard_2.html]
Kito D. Mann -- Author, JavaServer Faces in Action
http://twitter.com/kito99  http://twitter.com/jsfcentral
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
+1 203-404-4848 x3

Hello,
In the second article of this series on using storyboard design for Web applications, Steven Murray explains how to map the Storyboard design to a JSF implementation, giving special attention to Storyboard Controllers.
Here is an excerpt:
In part 1 of this series we discussed how to create storyboard designs for Web applications. In part 2 we are going to focus on how to map the design to a JSF implementation, giving special attention to Storyboard Controllers.
Controllers are the heart of the presentation tier, where they manage the behavior of the UI and direct the flow of information between the presentation and business models. Almost every article I read on JSF, and even the specification itself, references Model View Controller (MVC) without providing any concrete examples on how to actually use it in a JSF project. I hope to change that with the introduction of the Presentation Model.
Read the full article or download the podcast here: [Designing JSF Applications: a Storyboard Approach — Part 2|http://www.jsfcentral.com/articles/storyboard_2.html] =>http://www.jsfcentral.com/articles/storyboard_2.html]
Kito D. Mann -- Author, JavaServer Faces in Action
http://twitter.com/kito99  http://twitter.com/jsfcentral
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
+1 203-404-4848 x3

Similar Messages

  • Best practices desiging JSF applications

    I have an intermediate level of knowledge on JSF but after completing a component for an application I'm still stumped about the best practices required when designing a Java Server Faces application.
    The issue I faced mostly in the first iteration was Loading of dependant objects.
    Wherever we needed to display an editable view of an object by way of a request parameter there was always the question at what point to load the entity?
    For example, I have a page edit.jspx?itemId=21
    In my faces config, I have a Backing bean which has a managed property:
    <managed-property>
        <property-name>itemId</property-name>
        <property-class>java.lang.Integer</property-class>
        <value>#{param.itemId}</value>
    </managed-property>My backing bean has the getters and setters for this property but at which point is it best to load the item with id of "itemId"?
    It also gets a bit more complex when I depend on other injected properties for example an application scope manager class.
    One thing I have learned is, that the order that you declare the managed-properties in the faces-config appears to be the order that they are injected - I can't make a definitive answer on this as that's just the way it works on Sun App Server 8.1 and JSF 1.1. But I'm still trying to work out when to undertake a simple load for dependant entities in a backing bean.
    One appraoch I have looked at taking is introducing some "Loader" classes - basically a POJO that performs loads based on request param setting events:
        <managed-bean>
            <managed-bean-name>UserLoader</managed-bean-name>
            <managed-bean-class>testfaces.loader.UserLoader</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>invManager</property-name>
                <property-class>testfaces.aspect.InvestigationManager</property-class>
                <value>#{InvestigationManager}</value>
            </managed-property>
            <managed-property>
                <property-name>userId</property-name>
                <property-class>java.lang.Integer</property-class>
                <value>#{param.userId}</value>
            </managed-property>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ItemBean</managed-bean-name>
            <managed-bean-class>testfaces.jsf.bean.ItemBean</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>user</property-name>
                <property-class>org.ikeda.testfaces.model.UserEntity</property-class>
                <value>#{UserLoader.user}</value>
            </managed-property>
        </managed-bean>Ergo, each time I use the ItemBean in a JSP it will try and set the "user" property which is retrieved from the UserLoader provided the param.userId is set from the query string. Mind you this limits me to using only the request parameter (okay for Portlet integration) as there is no property called userId in the ItemBean - another workaround to work out!
    Of course this kind of functionality can be rolled into the ItemBean, but it's amazing how much of a mess the Backing bean becomes when you encapsulate this logic into the backing bean.
    What experiences has everyone else had with JSF and this kind of situation?
    Does anyone know of any good resources about "designing" JSF applications (writing is one thing, designing is another)?
    Regards,
    Anthony

    I have an intermediate level of knowledge on JSF but after completing a component for an application I'm still stumped about the best practices required when designing a Java Server Faces application.
    The issue I faced mostly in the first iteration was Loading of dependant objects.
    Wherever we needed to display an editable view of an object by way of a request parameter there was always the question at what point to load the entity?
    For example, I have a page edit.jspx?itemId=21
    In my faces config, I have a Backing bean which has a managed property:
    <managed-property>
        <property-name>itemId</property-name>
        <property-class>java.lang.Integer</property-class>
        <value>#{param.itemId}</value>
    </managed-property>My backing bean has the getters and setters for this property but at which point is it best to load the item with id of "itemId"?
    It also gets a bit more complex when I depend on other injected properties for example an application scope manager class.
    One thing I have learned is, that the order that you declare the managed-properties in the faces-config appears to be the order that they are injected - I can't make a definitive answer on this as that's just the way it works on Sun App Server 8.1 and JSF 1.1. But I'm still trying to work out when to undertake a simple load for dependant entities in a backing bean.
    One appraoch I have looked at taking is introducing some "Loader" classes - basically a POJO that performs loads based on request param setting events:
        <managed-bean>
            <managed-bean-name>UserLoader</managed-bean-name>
            <managed-bean-class>testfaces.loader.UserLoader</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>invManager</property-name>
                <property-class>testfaces.aspect.InvestigationManager</property-class>
                <value>#{InvestigationManager}</value>
            </managed-property>
            <managed-property>
                <property-name>userId</property-name>
                <property-class>java.lang.Integer</property-class>
                <value>#{param.userId}</value>
            </managed-property>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ItemBean</managed-bean-name>
            <managed-bean-class>testfaces.jsf.bean.ItemBean</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>user</property-name>
                <property-class>org.ikeda.testfaces.model.UserEntity</property-class>
                <value>#{UserLoader.user}</value>
            </managed-property>
        </managed-bean>Ergo, each time I use the ItemBean in a JSP it will try and set the "user" property which is retrieved from the UserLoader provided the param.userId is set from the query string. Mind you this limits me to using only the request parameter (okay for Portlet integration) as there is no property called userId in the ItemBean - another workaround to work out!
    Of course this kind of functionality can be rolled into the ItemBean, but it's amazing how much of a mess the Backing bean becomes when you encapsulate this logic into the backing bean.
    What experiences has everyone else had with JSF and this kind of situation?
    Does anyone know of any good resources about "designing" JSF applications (writing is one thing, designing is another)?
    Regards,
    Anthony

  • Content Management approach in a JSF application

    Hi all,
    I had developed a JSF application. Now I would like to manage my application in the content management approach, that is changing the text content or image by means of an admin console. Kindly suggest me if there is any way to accomplish this.
    Thanks in Advance!!

    The richfaces editor component comes to mind, as a start.
    [http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_editor.html|http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_editor.html]
    But honestly, I would say this is a clear case of too late. If you want the content of your application to be managed, the application should have been designed and developed with that idea in mind from the very beginning. What you have now is probably just some static JSF/facelets pages with perhaps a facelets template here or there, but what you want is dynamic content where you can swap out text, images and probably have some control over where they are placed and how they space. That is not going to happen out of the box, it requires development work and careful planning. Good luck trying to work that into an existing product.

  • Announcing: Developing JSF Portlets with WebLogic Portal Whitepaper

    Just Released: Developing JSF Portlets with WebLogic Portal Whitepaper
    A supplemental developer's guide has been published to help guide WLP 10.x customers that wish to use JSF as the web framework for building portlets on WebLogic Portal. This is a sizable document (150 pages) that covers a large number of topics. It also coaches developers on best practices and common pitfalls.
    Important: It also clarifies the supported configuration of JSF within Portal Web Projects. Workshop for WebLogic by default configures a web project in a configuration that is not supported by WebLogic Portal. The guide explains how to address this:
    * Change from the unsupported MyFaces JSF implementation to the supported Sun Reference Implementation (RI)
    * Change from the unsupported "client" STATE_SAVING_METHOD to the supported "server"
    The guide can be downloaded here:
    http://download.oracle.com/technology/products/weblogic/portal/weblogic-portal-jsf-whitepaper.pdf
    To help internet searches locate this document, the table of contents is reproduced below:
    Introduction
    1.1. Prerequisites...................................................................... 8
    1.2. Applicable Versions............................................................ 8
    1.3. Native Portlet Bridges and Standard Portlet Bridges .......... 8
    1.4. JSF Portlet Support Roadmap ........................................... 9
    1.5. Whitepaper Structure ....................................................... 10
    1.6. Look Before You Leap ..................................................... 10
    1.7. For More Information........................................................ 10
    Part 1: Converting JSF Applications into Portlets
    2. IDE Support for JSF Portlets Chapter ...................................... 12
    2.1. Workshop for WebLogic – WebLogic Portal's Supported IDE 12
    2.2. Workshop Features for JSF Support in WebLogic Portal.. 12
    3. Introduction to JSF Portlets Chapter ........................................ 18
    3.1. Creating Your First JSF Portlet......................................... 18
    3.2. Essentials of JSF Portlet Views........................................ 21
    3.3. WebLogic Portal Artifacts................................................. 22
    4. Configuring JSF within WebLogic Portal Chapter..................... 24
    4.1. JSF Library Modules in WebLogic Server ........................ 24
    4.2. Installing the JSF Libraries into a Portal Web Project ....... 25
    4.3. JSF Configuration Settings............................................... 27
    4.4. Configuring JSF 1.2 ......................................................... 29
    4.5. Building an Unsupported JSF Implementation Library Module 31
    4.6. Faces Configuration is Web Application Scoped.............. 31
    5. Navigation within a JSF Portlet Chapter................................... 33
    5.1. Navigating within a Portlet with the JSF Controller ........... 33
    5.2. Redirects.......................................................................... 34
    6. Namespacing Chapter ............................................................. 35
    6.1. Namespacing Managed Bean Names.............................. 35
    6.2. Client ID Namespacing with the View and Subview Components 35
    6.3. Client ID Namespacing with the WLP NamingContainer .. 36
    7. Logging, Iterative Development, and Debugging Chapter ........ 39
    7.1. Logging............................................................................ 39
    7.2. Iterative Development ...................................................... 39
    7.3. Debugging ....................................................................... 40
    8. Custom JavaScript Chapter ..................................................... 42
    8.1. DOM Manipulation within a JSF ....................................... 42
    8.2. Form Validation within a JSF Portlet ................................ 45
    9. Preparing JSF Portlets for Production Chapter ........................ 46
    9.1. Configuration.................................................................... 46
    9.2. Performance and Scalability............................................. 47
    9.3. Security............................................................................ 49
    9.4. Localization...................................................................... 50
    Part 2: Interacting with the Portal Environment
    10. Native Bridge Architecture Chapter ...................................... 54
    10.1. Container Architecture Overview.................................. 54
    10.2. Container Architecture.................................................. 54
    10.3. Container Interactions .................................................. 55
    11. Interportlet Communication Chapter .................................... 56
    11.1. Using Session and Request Attributes for IPC (Anti-pattern) 56
    11.2. Using the WLP Event Facility for IPC with JSF Portlets 56
    11.3. Notifications ................................................................. 60
    11.4. Comparison of the IPC Approaches ............................. 60
    12. Scopes Chapter ................................................................... 62
    12.1. Conceptual Scopes for Standard JSF Applications ...... 62
    12.2. Conceptual Scopes for Portal Applications................... 63
    12.3. Implementation Patterns for Portal Scopes .................. 63
    13. State Sharing Patterns Chapter ........................................... 66
    13.1. State Sharing Concepts ............................................... 66
    13.2. HttpSession Versus HttpServletRequest ...................... 66
    13.3. Base Code for HttpSession Patterns ............................ 67
    13.4. Single Portlet Pattern ................................................... 68
    13.5. Multiple Portlet Patterns ............................................... 69
    14. Rendering Lifecycles Chapter .............................................. 77
    14.1. WLP and JSF Lifecycles .............................................. 77
    14.2. Invocation Order of WLP and JSF Lifecycle Methods... 77
    14.3. Accessing WLP Context Objects from JSF Managed Beans 78
    15. Portal Navigation Chapter .................................................... 80
    15.1. Programmatically Constructing JSF Portlet URLs ........ 80
    15.2. Changing the Active Portal Page.................................. 80
    15.3. Redirects within a Portal............................................... 83
    16. Ajax Enablement Chapter .................................................... 85
    16.1. Ajax in JSF Portlets...................................................... 85
    16.2. Partial Page Rendering Pattern.................................... 85
    16.3. Stateless API Request Pattern ..................................... 86
    16.4. Portlet Aware API Request Pattern .............................. 87
    16.5. Controlling the WLP Ajax Framework........................... 91
    17. Additional WLP Features Chapter........................................ 93
    17.2. Portlet Container Features ........................................... 93
    17.3. Portal Container Features ............................................ 98
    18. Example: Implementing a Login Portlet Chapter .................. 99
    18.1. Login Portlet Motivation................................................ 99
    18.2. Login Portlet Design..................................................... 99
    18.3. Login Portlet Implementation...................................... 101
    Part 3: Integrating Third Party Libraries
    19. Integration Overview Chapter............................................. 111
    19.1. Types of Libraries....................................................... 111
    19.2. Roadmap for MyFaces Trinidad and ADF Faces Rich Client 111
    20. Using the Facelets View Technology Chapter.................... 113
    20.1. Introduction to Facelets .............................................. 113
    20.2. Configuring Facelets Support ..................................... 113
    21. Using the Apache MyFaces Tomahawk Component Library Chapter 115
    21.1. What is Apache MyFaces Tomahawk? ...................... 115
    21.2. Support for Tomahawk in WLP................................... 115
    21.3. Tomahawk Component List........................................ 116
    21.4. Installing and Configuring Tomahawk......................... 119
    21.5. Resolving the Duplicate ID Issue................................ 120
    21.6. Referring to Resources .............................................. 120
    21.7. forceId Attribute.......................................................... 124
    21.8. File Upload................................................................. 125
    22. Using the Apache Beehive Navigation Controller Chapter . 126
    22.1. Apache Beehive Page Flow ....................................... 126
    22.2. JSF and Page Flows .................................................. 126
    22.3. Configuring the JSF Integration with Page Flows ....... 127
    Appendices
    23. Appendix 1: Consolidated List of Best Practices ................ 130
    24. Appendix 2: Known Issues and Workarounds.................... 132
    24.1. CR383659, CR383662 Inconsistent failures with JSF portlets 132
    24.2. CR342124: IllegalStateException due to duplicate client-id 132
    24.3. CR384916: IllegalStateException due to duplicate client-id when using certain components such as Tomahawk and Trinidad...... 133
    24.4. CR361477 Problems with the integration of JSF portlets with Apache Beehive Page Flows.................................................................. 133
    24.5. CR377945 JSF 1.2 suffers from a memory leak during iterative development .............................................................................. 134
    25. Appendix 3: The JSFPortletHelper Class ........................... 135
    26. Appendix 4: The CleanupPhaseListener Class .................. 147

    Hi Peter!
    First, I wish to thank you for the great work.
    We followed your whitepaper and managed to deploy a JSF portlet on WLS.
    But we are not able to register it (consume it) as remote portlet in Oracle Portal 10.1.4. The error log is as follows:
    An error occurred while trying to refresh the provider. (WWC-43190)
    An error occurred during the call to the WSRP Provider:
    java.rmi.RemoteException: serialization error: serialization error:
    unexpected null value for literal data; nested exception is:
    serialization error: serialization error: unexpected null value for literal data
    com.sun.xml.rpc.encoding.SerializationException: serialization error:
    serialization error: unexpected null value for literal data
    com.sun.xml.rpc.encoding.SerializationException: serialization error:
    unexpected null value for literal data
    Java stack trace from root exception:
    unexpected null value for literal data
    at
    oracle.webdb.wsrp.RegistrationContext_LiteralSerializer.doSerialize(RegistrationContext_LiteralSerializer.java:107)
    at
    com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:119)
    at
    com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:70)
    at
    oracle.webdb.wsrp.GetServiceDescription_LiteralSerializer.doSerialize(GetServiceDescription_LiteralSerializer.java:88)
    at
    com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:119)
    at
    com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:70)
    at
    com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:473)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:62)
    at
    oracle.webdb.wsrp.WSRP_v1_ServiceDescription_PortType_Stub.getServiceDescription(WSRP_v1_ServiceDescription_PortType_Stub.java:63)
    at
    oracle.webdb.wsrp.client.design.v1.OraWSRP_v1_ServiceDescription_PortType.getServiceDescription(Unknown
    Source)Do you have any idea why this happens? Or you can provide some useful links to WLP -Oracle Portal federation?
    Thank you and best regards,
    PaKo

  • Need a login strategy for JSF application

    I have inherited a JSF application (prototype) and need to modify this application to require a user login. Right now, the application requires a login only for a sub-portion of the application, well after JSF is up and running. That has to change to require the login before the JSF application is invoked.
    Basically, what I want to do is present a standard login form (user name, password, and "submit" button). This information will be sent to "j_security_check" where the servlet engine will validate the user against an LDAP server and then look up some user role information. I have no control over user authentication. Once the user has logged in, the application will be looking at user roles to determine what elements of the JSF application they are permitted to access.
    In addition, I need to be able to detect when the user's session has expired. When this occurs, I need to automatically reroute the user back to the login page. The prototype I inherited currently has all of the JSF backing beans check to see if the Session is still valid before executing any actions. This seems rather tedious and error-prone to me.
    I am not very familiar with security and user authentication issues (somebody else always wrote that part). I think the approach I need to take is: (1) create a login page. (2) create a login error page. (3) create a filter to check to see if the user's session has expired and, if so, re-route the request to the login page.
    My questions:
    1. Is this the best approach? If not , what is a better approach?
    2. Can I use JSF elements for the various login pages, or do I need to use JSP or HTML elements only?
    3. Can you point me to an example or tutorial that explains what I need to do?
    I've looked at a couple of servlet books, a JSF book, and Sun's online Java tutorials, but I don't see anything that looks quite like what I think I need to do here.
    Once I get passed security handling, the rest of the application is all JSF and will be easy to build.
    Thanks for your thoughts, comments, and assistance.

    I have three macs and use one of them as the TM backup destination (that mac has 4 large external disks, I devote one disk at a TM backup for each of the macs) - that mac is also the file server. (I do also use an externally attached HD on one of the other macs as redundancy.) The system works very well and when set up requires no administration, it's automatic! Since the backups are made hourly, I have fresher data than my old system of doing nightly backups using a traditional backup app.
    I even had to do a full restore last week on one of the macs and found the process worked flawlessly, had the mac up and running after the 2 hour restore finished.
    For critical data (business or professional) I also recommend doing occasional boot disk backups using another backup app. I do that with one of my macs. Note: although I have wireless capability with each mac, I use wired Ethernet connections for speed and reliability.

  • URGENT: How to debug non-reproducable problem(s) in ADF JSF application?

    This is one of the most anoying things in programing.... We have JSF application developed by JDev 10.1.3 and deployed on AS. It works fine but almost once or twice per day users complain that, say on a certain page (could be any page) they click on a button or a link and nothing happens. Sometimes it looks like the browser is trying to open a page but never does and sometimes the link or a button is dead. I looked into log file under opmn/logs and could not find anything?
    This is very urgent, so please, please if you have any hint on how to approach this problem, let me know. At this time I cannot file the Service Request with Oracle since they would ask me to create sample code and reproduce the problem which is just not possible.
    please help.

    Hi,
    if you are on JDeveloper 10.1.3.0 then chances are that these are concurrency issues. If a user starts a long running query then others may be blocked by this. This is fixed in JSF RI that is contained in JDeveloper 10.1.3.1
    Its just a guess. To prove my assumption, make sure you run the app with a single seat and see if the issue reproduces or exclude queries from the tests.
    Frank

  • Accessing a SAP BW table data to display content in Design Studio Application

    Hi,
    I am working on a Design Studio application that contains a link to all the reports for different business users in an organization. The end user should see the links to only those reports he/ she has access to. This access rights are stored in a SAP BW table. I want to pull that data from SAP BW table to my application so that I can implement a layer of security in my application.
    1) What would be a good idea to get SAP BW table data in a design studio application.(This data is not used to populate my application, but will be used to check access rights for a user who is going to open this application).
    2) What will be a good option for deployment of this application ? On SAP Netweaver platform or on SAP BI Platform

    Hi Michael,
    Let me present my issue in a more clear format,
    I have a web template launch page that was created using BW 3.5. This web template has only one web item and that is 'role menu'. This role menu will display all the available list of web templates for each user as per the access rights of each user. Hence this web template was the only door for my end users to access BEx reports.
    While we were migrating to 7.x we found that there were no equivalent item available in 7x  version. As a workaround, I migrated all the queries and web templates from 3.5 to 7x but I didn't migrate the door. I asked my Basis team to replace the connection parameters for the links present in the door.
    So now all my users still use the 3.x web template but when they click on items in the list, they will be accessing reports that are of 7x version.
    Now my IT is planning to upgrade IE and knowing that bex 3.5 tools are not compatible with BW 7.4. This sounds like the role menu won't work at all with 7.4.
    I started exploring Design Studio to search for an alternative for Role Menu component. I created an application using HTML template in Design Studio. Now I am looking for different approaches to implement the same functionality in Design Studio. Can you please provide some inputs on this scenario.

  • How to create JSF application from xsd files?

    Hi,
    We have many xsd files describing xml's which we are supposed to send to web services. Application which we are creating should allow user to fill xml documents with data and then we should send those xml files to some web service. We want to automatize as much as possible the process of application creation to avoid possible errors and to minimize our efforts (there are plenty of quite complex xsd files).
    Our first approach was: we used Oracle JSXB to generate java classes basing on xsd files (using JDeveloper 10.1.3.2.0.4066). Then we tried to generate DataControls, but this action fails with following error:
    Window title: Error in init bean
    Message: Could not complete initbean because it would result in an invalid document
    Details: oracle.bali.xml.model.XmlInvalidOnCommitException: SEVERE: Wartość atrybutu Name nie jest typu ID (Value of Name attribute is not of ID type)
    Wartość musi być następującego typu: (Value must be of following type)
    Nazwa typu: ID (Type name)
    Typ pierwotny: string (Primitive type)
    Z następującymi więzami: (With following constraints)
    zgodne z wzorcem: [\i-[:]][\c-[:]]* (Compliant with template)
    [ node = Name ]
    <JavaBean version="10.1.3.40.66" id="XSLStylesheet" BeanClass="oracle.xml.xslt.XSLStylesheet" Package="oracle.xml.xslt" isJavaBased="true">
    <Attribute Name="classMethodParams" IsUpdateable="0" Type="java.util.Hashtable" />
    We tried Sun implementation fo JAXB - it generated different java classes (with annotation mechanism). Creation of DataControls using those classes was successful. Then we created simple JSF page and tried to put those DataControls on it in order to let the user fill it with data. The thing is that those controls are read only as there is no row created in those DC. We can't create any row in those DC as there are only 'commit' and 'rollback' operations. When we try to call 'CreateInsert' operation on child elements of those DC we get error in JDeveloper log window:
    2007-05-29 10:08:46 oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: JBO-29000: DataControl:createRowData
    2007-05-29 10:08:46 oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: DataControl:createRowData
    new row is not created and controls are still read-only.
    The question is:
    1. is there another, more efficient way to create JSF application from xsd files?
    2. if this is the best way to do it, what do we do wrong?
    Leszek

    To anyone who might find it useful: our solution to mentioned problem.
    Few tips how to solve described problem:
    1. Do not use JAXB (we checked Oracle and Sun)
    2. Use castor http://www.castor.org/
    a) for each xsd generate java files in separated package
    b) use java 1.5 to let castor generate lists
    c) use mapping of xml namespaces to java packages to have only 1 implementation of each xsd
    3. Create facades - java files for you root-level java objects
    4. Right click those facades and choose 'Create DataControl' in jdev
    5. Now you may drag and drop you DataControls and use them in your JSF (or UIX) application
    I hope it will help someone :)
    Leszek

  • Load testing JSF application

    Is there any tool to load test JSF application created with JSC?
    Can we use the load testing feature in Java Studio Enterprise to test JSF application created with JSC?

    Any tool designed to perform load-based testing of a web application will work.
    // Gregory

  • Consuming peoplesoft webservices using JSF application gives error

    Hi,
    I am using Jdeveloper 11g to consume a peoplesoft webservice which does the basic datbase operations.
    I have been successful in creating a proxy using the wsdl file and using JAX-WS approach to achieve the same.
    I can connect to the webservice using the proxy client.
    But when i package the proxy( create a jar) and import in my web application (JSF application), i am running into following error.
    <ActionListenerImpl><processAction> com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
    javax.faces.el.EvaluationException: com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:214)
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:222)
         at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:531)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:127)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
         at $Proxy135.getCompIntfcKCMWEBCASECI(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
         at $Proxy136.getCompIntfcKCMWEBCASECI(Unknown Source)
         at project1.proxy.KCM_WEB_CASE_CISoapClient.getKCMMethod_final(KCM_WEB_CASE_CISoapClient.java:618)
         at login.view.Handler.CRMSearchHandler.getSearchResults(CRMSearchHandler.java:18)
         at login.view.backing.Login.search(Login.java:54)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    I am not sure what else i need to import or rather how to package the proxy classes to get it working.
    Any help will be highly appreciated.
    I even tried creating a webservice proxy in the JSF project instead of importing the jar, yet i am getting the same error, but the irony is that when i run just the proxy class(standalone with main method) i can get access to the webservice.
    Thanks
    Ash
    Edited by: [email protected] on Jun 8, 2010 2:38 PM

    Well,
    There is a issue with analyzer capturing SOAP traffic when using with secure proxies, so that is why you are not seeing any data there.
    And I think if you will try your jax-rpc code again, it might work as there was nothing incorrect in your code, so might be that the whole config was corrupt which was throwing out incorrect error(s).
    About a web service with credentials, you can quickly create one.
    Have a java class like the following:
    import javax.jws.WebService;
    import weblogic.jws.Policy;
    @WebService
    @Policy(uri = "policy:Wssp1.2-2007-Https-UsernameToken-Plain.xml")
    public class Class1 {
    public Class1() {
    super();
    public String sayHello() {
    return "Hi";
    The procy code for this will be something like:
    private static Class1Service class1Service;
    public static void main(String[] args) {
    try {
    class1Service = new Class1Service();
    Class1 class1 = class1Service.getClass1Port();
    Map<String, Object> requestContext = ((BindingProvider) class1).getRequestContext();
    setPortCredentialProviderList(requestContext);
    // Add your code to call the desired methods.
    System.out.println(class1.sayHello());
    } catch (Exception ex) {
    ex.printStackTrace();
    public static void setPortCredentialProviderList(Map<String, Object> requestContext) throws Exception {
    // TODO - Provide the required values
    String username = "weblogic";
    String password = "weblogic1";
    List<CredentialProvider> credList = new ArrayList<CredentialProvider>();
    // Add the necessary credential providers to the list
    credList.add(getUNTCredentialProvider(username, password));
    //credList.add(getBSTCredentialProvider(clientKeyStore, clientKeyStorePassword, clientKeyAlias, clientKeyPassword, serverKeyStore, serverKeyStorePassword, serverKeyAlias, requestContext));
    //credList.add(getSAMLTrustCredentialProvider());
    requestContext.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credList);
    Thanks,
    Vishal

  • Including JSF application inside iframe

    Hi,
    I have an existing website (based on PHP and HTML), where I want to include a new part that is developed with JSF,
    and currently runs on another webserver.
    I included the JSF part with:
    <iframe name="NewPart" src="http://www.myotherwebsite.com/jsp/welcome.faces" width="600" height="400"
    scrolling="auto" frameborder="0">
    some text.
    </iframe>
    This page appears fine with any simple JSF example. But as soon as I start navigating inside the JSF application to page2 (see below), I get the following exception:
    javax.servlet.ServletException: viewId:/jsp/welcome.faces - View /jsp/welcome.faces could not be restored.
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
    root cause
    javax.faces.application.ViewExpiredException: viewId:/jsp/welcome.faces - View /jsp/welcome.faces could not be restored.
    com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:185)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
    The navigation is defined as:
    <navigation-rule>
    <from-view-id>/jsp/welcome.jsp</from-view-id>
    <navigation-case><from-outcome>page2</from-outcome><to-view-id>/jsp/page2.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    What am I doing wrong (I'm fairly new to JSF..)?
    best regards, Paul.

    Thanks Raymond, I think you've put me on the right track.
    I forgot to stress that if I load the (JSF based) page directly inside the browser it works OK, only when it is loaded inside an <iframe>, the navigation fails. I suspect now that there may be a conflict between the cookie stored by the main page and the inner JSF frame.

  • SAP R3 CONNECTION WITH JSF APPLICATION

    Hi Experts,
    i want to integrate my JSF application to the SAP R3 using java class. I searched a lot of blogs and docs where they have given a proxy class approach.But i am not able to use it.
    If you have any experience or knowledge , please reply .
    Thanks in Advance
    Ankur Goyal

    Hi,
    I am using NWDS 7.2.If you have any sort of information about a java apllications integration wiith SAP R3 then please reply back to me.
    Ankur Goyal.

  • JSF APPLICATION CONNECTION WITH SAP R3

    Hi Experts,
    i want to integrate my JSF application to the SAP R3 using java class. I searched a lot of blogs and docs where they have given a proxy class approach.But i am not able to use it.
    If you have any experience or knowledge , please reply .
    Thanks in Advance
    Ankur Goyal

    Hi
    Why dont you enable RFCs in the SAP system as WebServices and consume them? If you have a very old SAP system then use JCo (JCA) / JRA and connect through the RFC layer.
    [Consume Webservices in 7.3|http://help.sap.com/saphelp_nw73/helpdata/en/ca/97f68ba5034d0fb21c518f0cac1432/frameset.htm]
    [JCo|http://help.sap.com/saphelp_nw73/helpdata/en/48/64db09c88307dbe10000000a42189b/frameset.htm]
    [JRA (JEE Compatibilie, implements JCo)|http://help.sap.com/saphelp_nw73/helpdata/en/48/70796c872c1b5ae10000000a42189c/content.htm]
    HTH.
    Thanks.
    Regards
    LNV

  • Designing SAPUI5 Application

    Hello, I am trying to gather some feedback regarding development of complex applications using SAPUI5. The scenario I have is to replicate an application which was developed in WebDynpro Java a couple of years back in SAPUI5. The WebDynpro Java Application is a loose replica of transaction IW32.
    How would I go about designing an application that has more about 100 fields spread out across 5 steps? What would the data design need to look like from a Gateway service perspective? Also how would I handle dynamic screen design i.e. Not all 100 fields are visible to all users of the application, in WebDynpro Java I play with visibility by reading the data from ECC - doing this in Java Script seems to be more challenging.
    Any thoughts / ideas will be appreciated!
    Thanks,
    Dan

    Hi Dan,
    I would follow the below step for developing Fiori like app:
    1. Design Thinking - Take the 1:1:3 approach - 1 user, 1 Role and 3 Screens
    2. Do the prototyping of your app with the help of kit, see below for the link
    3. Build the Odata Model to get data from business suite
    4. Develop the app using ECLIPSE with SAPUI5 add-ins.
    Here the link for Fiori design guidelines
    http://experience.sap.com/fiori-guidelines/
    Link for prototyping kit for Fiori Apps:
    http://experience.sap.com/fiori-guidelines/FioriDesign/52_Fiori_Design-Prototyping-Kit.html
    Link for Application Best Practices:
    SAPUI5 SDK - Demo Kit
    Netweaver Gateway can be leveraged to get data from the business suite using the Odata, find below the link for the same.
    SAP NetWeaver Gateway Foundation Master Guide - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library

  • Unable to connect SQL server 2005 databse with JSF applications !

    Hello guys!
    Help me out to connect SQL server 2005 Databse with JSF applications using JDBC-ODBC bridge. I'm working with Netbeans 6.1 IDE.
    I tried for the basic applications but instead got this error:
    "unable to deploy jdbc drivers to the <project>domain/lib"
    Please help me out with working sample codes that connects MS SQL server 2005 DB with JSF!!
    Thank you guys!

    1) don't use the bridge driver
    2) don't do database access from JSF
    3) learn how to use your application server
    4) learn how to use your IDE

Maybe you are looking for