How to build a website container with JSF...

Hi,
most simple websites have static and dynamic areas, e.g. header and menue are static areas, always at the same place and then there is a dynamic area somewhere in the middle... :)
Whats a good way to build websites using the JSF framework?
At the moment, I try the following:
certain-site.jsp
<?xml version="1.0" encoding="UTF-8" ?>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<% String site = "0"; %>
<%@ include file="base.jsp" %>
base.jsp
<%@ page language="java" %>
<%@ page import = "java.io.*" %>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%
evaluate variable site, assign site-parameters as title, meta-tags and a file to include for the dynamic content
%>
<html xmlns="http://www.w3.org/1999/xhtml"
lang="de" xml:lang="de">
<head>
<title>
<%= title %>
</title>
*<%-- the menue: %>*
<f:view>
<h:form>
<h:commandLink id="p1" action="pu1" value="Pu1" />
<h:commandLink id="p2" action="pu2" value="Pu2" />
</h:form>
</f:view>
<%-- including the dynamic area %>
<f:view>
<f:subview id="subview">
<jsp:include page="<%= dynamic_area %>" />
</f:subview>
</f:view>
</body>
</html>
faces-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN" "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config xmlns="http://java.sun.com/JSF/Configuration">
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>pu1</from-outcome>
<to-view-id>/pu1.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>pu2</from-outcome>
<to-view-id>/pu2.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
</faces-config>
Everything works, except the JSF-hyperlinks when the main part is included as shown above to avoid redundancy of html-code. -> No reaction. ;)
When putting the JSF-hyperlinks in a single JSP without any includes, it works fine, too, then it works as I have tested.
(So navigation rules in faces-config.xml seem to be ok, the failure must be something with include or in the surrounding.)
-> What is the problem for JSF here? Why do the JSF-hyperlinks not work when the code defining them is included instead of standing alone as a JSP containing the whole site content (disadvantage of this practice: redundancy)?
(I am not familiar with facelets etc. ;) )
bye Maik

Putting
<f:view>
</f:view>
into every main JSP solved the problem that JSF hyperlinks did not work, BalusC is right.
Example for such a main JSP including base.jsp:
<?xml version="1.0" encoding="UTF-8" ?>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:view>
</f:view>
<% String site = "1"; %>
<%@ include file="base.jsp" %>
<f:subview ...> with a id in every included jsp did not work in a try but a simple jsp include as usual works.
(Studying facelets will follow, too, step by step, maybe I participate in a nice seminar.)
Thank to all helpers! ;)
.

Similar Messages

  • How to build a Google+ app with Aurora7? Fluid and WebRunner not compatible.

    How to build a Google+ app with Aurora7?
    Fluid and WebRunner not compatible.

    Hi,
    For portability issues always develop applications using sun implementation which can be configured for any vendor application servers.
    Web services developed with jwsdp will work in webloigc 8.1 simply, take the examples from sun and simply deploy it in weblogic 8.1 it will work like gem with simple settings.
    Just change the libraries with jwsdp ones.Place the
    jwsdp lib.How to do this is ; place all these jars in the classpath before the exisiting classpath configuration.
    Classpath=jwsdplibs;......
    This is enough for deploying the webservice server side.
    For using the client you have to change the default soap libraries used by weblogic with sun jar files.
    See example from bea for client implementation.override the system property.

  • How to build an OData Service with Gateway Service Builder (NO DDIC, BOR import)

    Hi Community,
    I hope to get an answer here to finish my project. I´m a newbie to the sap gateway service builder. Please provide me a helping hand.
    I have a problem I´m sure someone out there can help me.
    I need to create an sap ui app, which is monitoring our database behaviour (->transaction st06) is there someone who knows how to build a OData Channel with sap gateway service builder without importing a BOR- Object, or a DDIC?
    Or how to build an OData channel which exposes the database (monitoring) data from ST06?
    I would really appreciate if someone could help me.
    THANKS!
    JOE

    Hello Joe,
    If u do not want to import any Structure or BOR- Object, u can follow below steps :
    1. Create ur data model by adding the properties manually in SAP GW service builder with correct Edm    types.Doing this would be pain in my opinion ( sometimes we are forced to do this but no other option    doing this way )
       Create associations & navigation needed. 
    2. U can generate run-time objects.
    3. Go to appropriate classes and implement methods with ur Business Logic.
    4. Register ur service & consume.
    U can also import RFC to create data model and create mapping as per required by implementing correct method as well.
    once u do this generate objects and register service and consume it.
    Check this out for ur info :
    Detailed step by step procedure for Creating Gateway Service with all the CRUD Operations and testing them in Service Explorer Part1 
    Regards,
    Ashwin

  • How to update a versioned container with changes in the DB

    Hi,
    I've reverse engineered a database schema into a container, and then I versioned it as v1.0.
    Now, that schema has changed in the database, and I'd like to update the container with those changes, and version it as v2.0.
    What is the best way to do it?
    Is it posiible to capture only the changed or new items into the v1.0 container, and then version it as v2.0?
    Thanks

    Check the application in and then check it out
    This will take it to the next level of versioning.
    However the version will be like 1.1 and not 2.0.
    There is a way to make it 2.0 but I do not remember the steps.
    Once you check it out it will be identical to 1.0 but the version will be 1.1 and you can make your changes and the next time it is checked in and out it will be set to 1.2 etc.
    At this point I have to ask if versioning is realy what you want to do. Don't get me wrong Configuration managment is a great thing. However most people do not understand it or how to use it. And they usualy get themselves in trouble with it. So if you know what your doing with it then go for it.
    Hope this helps.
    Also once you version your repositry you cannot go back. You are versioned forever.
    Michael

  • How to build a tabular form with a by the user insertable primary key

    I have build a build a tabular form with the wizzard. Wat should I do to make the primary key insertable by the user.
    When I change the PK from 'hidden' to 'text field', I get a checksum error when i am trying to insert.

    Fred: When you use the tabular form wizard, notice the help text on the right hand side of each page. The help page where you define the type of primary key (Existing trigger, PL/SQL function, existing sequence) clearly states
    Tabular forms do not support user entered primary key values
    Makes sense when you think about it. The MRU process needs to determine whether to update a record or insert a new record. It does that by comparing the checksums (and/or) pk values from when the page was first rendered and then when you make changes and submit it. Newly inserted rows will have a blank PK/checksum.
    If you allow user to change the PK, how will the system know which rows are new and which ones are old?
    For example, lets say you have
    create table t
    pk int primary key,
    data varchar2(10)
    )You have 2 rows
    1 red
    2 yellow
    If the PK were to be editable, user could go in and change the above to
    2 red
    1 yellow
    Now what? Would you like the system to create a new row with 1/yellow or change the existing pk=1 row to yellow? Same with the other row.
    Bottom line: The built-in processes dont support this. You can always write your own manual tabular form and implement whatever you logic you wish in your After Submit processes.
    Hope this helps.

  • How to build a simple app with xcode

    I am new to coding and I could like to know the basics of xcode and how to build a simple app

    Then you're going to need to learn Objective-C, the concepts of object oriented programming, and a whole ton more.  Xcode is just a tool used to write and manage a software project.
    To learn to program, you must first get the compiler which you use to write and test programs.  Thus you need to get a copy of Xcode from Apple's developer site.
              * Find a book on xcode.  Be sure to get a book that covers the current version of xcode.  But before getting far into xcode, you must ...
    Next, you must learn the programming language used to create mac and iOS programs.
              * Read the book "Programming in Objective-C", By Stephen G. Kochan
              * Find a book on xcode.  Be sure to get a book that covers the current version of xcode.
    Next learn about Cocoa, the graphical environment and other support libraries that you need for OSX and iOS.
              * There are many books on this, check ratings and evaluations at Amazon books. 
    Once you have the basics, you really need to learn the technicals of programming, like design patterns, algorithms, data structures, concurrent processes.
              * University or college courses
              * Textbooks used in these courses, if you want to do it on your own.
    Although computer science majors at the college level take 4 years to learn their trade, the first three semesters cover the important basic topics of programming.  If you can take a course in Programming 1 at a local school that will get you started.  You can certainly do it on your own, but programming can be a frustrating trip and working with others is very helpful.

  • How to build a website with working pulldown menus on iPad and iPhone?

    Hi everyone!
    I have designed a website,  http://fccr.ucsd.edu/ , base on "Template #1" by Chris Converse, available at http://www.adobe.com/devnet/dreamweaver/articles/dreamweaver_custom_templates.html
    The pull-down menus have a curious glitch on the iPad/iPhone which I wanted to ask for help on from anyone who might be knowledgeable on this issue (I have also posted this question on the apple pages, but so far without much constructive help...)
    Template #1 has various href="#" tags that presumably the user is to fill in.  This works fine on all desktop browsers I checked (IE/Firefox/Opera/Chrome/Safari), but if the tag corresponds to a menu that has to pull down, then by replacing this default tag with a URL, an iPhone/iPad will insist on following the link rather than allowing the menu to pull down.  This is a reasonable consequence of using a finger rather than a mouse (which can both hover and click) to operate the menu.  Fair enough, it is straightforward to design the dropdown menu layout so that its entries are either links OR designed to open up a new pull-down menu.  (future users of these templates should probably be warned about this...)
    There is a little glitch, though.  If you are exploring Template #1 (or my website) with an iPhone or an iPad, the first pull-down menu which you attempt to pull down after you load a new page will initially not function. However, all of the other pull-down menus will function after that, and after you pull down a different menu, the original pull-down menu that you originally attempted to pull down will also work.
    This appears to be a curious feature (bug?) in the implementation of the <UL>, <LI>, and/or <A> tags in the iPhone and iPad browsers.  The site http://www.bestbuy.com/ uses the same three tags with some slightly different code behind it, and it somehow avoids this issue (that is, it works correctly on both all five major Desktop browsers and the iPhone/iPad).
    Thus, I would very much like Adobe's help to figure out what bestbuy is doing with their use of the  <UL>, <LI>, and/or <A> tags in their pull down menus, so that these menus work without this little glitch on the iPhone/iPad, and then to see if we can modify Chris Converse's Template #1 (and my web page) to do the same...
    Thanks in advance for your help!
    Best regards,
    - Tom

    Hi Tom,
    You might want to read this article:
    http://www.projectseven.com/products/menusystems/pmm2/ug-examples/accessible/index.htm
    I don't know of any other menu tool that offers this type of solution - but I thought I'd chime in because the other answers seemd (through no one's fault) that this could not be done ;-)
    Al Sparber - PVII
    http://www.projectseven.com
    Dreamweaver Menus | Galleries | Widgets
    http://www.projectseven.com/go/hgm
    The Ultimate Web 2.0 Carousel

  • How to build a simple Editor with GEF 4 MVC

    Hallo,
    I have Experience with GEF 3.x graphical editors, and I would like to make experiments with GEF4 MVC in an Eclipse E4 Application.
    Below there is a schema representing the basic architecture of a GEF 3.x MVC Editor :
    The base Ideas in GEF 3.x are :
    - There is an Editor class containing a Graphical Viewer.
    - There are a Root Edit Part and an Edit Part Factory to initialize the Controllers (EditParts)
    - There are Views (Figures) and Models (POJO), independent each other, and controlled by the Controllers.
    The GEF4 MVC Technology is quite powerful - because one can build Standalone, Eclipse RCP and Web applications.
    Anyway it is not perfectly clear to me - yet , how to implement a Simple GEF4 Editor on E4 Application.
    So, this is what I understood :
    - No more Draw2D in GEF4 - it uses JavaFx Scene and Parent
    - In a Scene graph we can put SWTControls (heavyweight) and Figures (lightweight)
    - a Canvas (heaviweight) will contain the JavaFX Figures and also possibly a CanvasFigure (lightweight)
    So, if I build an Eclipse E4 application with one ViewPart containing a GEF 4 Editor, I suppose the setup of my application will be as follows:
    1. Create An Eclipse E4 Application with JavaFx support
    2. Add a ViewPart that contains a Canvas
    3. Use GEF4 MVC to Create / Edit my MVC tree.
    At this point, it is not very clear to me how to implement the real MVC Architecture in GEF 4.
    I expect GEF4 MVC will work in some way like the GEF 3.x - as visible in the top image - but I'm not clear on that.
    Therefore, these are questions:
    - Is the GEF 4 MVC architecture somewhat equivalent to the GEF 3.x one ?
    - Where I can find details on the MVC implementation of GEF 4 ?
    - Is there any component to provide - out of the box - a Flyout Palette, like it is available in GEF 3.x ?
    Thank you for providing this very powerful library and for spending time on this post.
    By the way, I'm available to contribute the project.
    Kind Regards.
    Patrik

    [quote title=Patrik Suzzi wrote on Tue, 14 July 2015 04:07]Hallo,
    Therefore, these are questions:
    - Is the GEF 4 MVC architecture somewhat equivalent to the GEF 3.x one ?
    - Where I can find details on the MVC implementation of GEF 4 ?
    It is quite comparable in general but has some significant differences in detail. The best entry points for learning about GEF4 MVC is the reference documentation at https://wiki.eclipse.org/GEF/GEF4/MVC. It also provides some information about differences between GEF (MVC) 3.x and GEF4 MVC (last section about migration). The slides provided at http://de.slideshare.net/AlexanderNyssen/gef4-our-mission-to-mars explain some of the concepts (unfortunately the interesting slides concerning MVC seem to have been messed up when uploading the slides; I will try to update them).
    - Is there any component to provide - out of the box - a Flyout Palette, like it is available in GEF 3.x ?
    No, not yet. I was thinking to integrate it into one of our examples after the Mars SR1 release.

  • How to build packages which contains dependency loop

    I'm building packages for sh4 CPU.
    And I found these packages contains make dependency loop.
    gobject-introspection
    gdk-pixbuf2
    librsvg
    cairo
    Any suggestion to solve this?  Which one is the first I could build?
    Last edited by dlin (2013-02-13 17:21:20)

    FS#33874 wrote:if PKGBUILD developers keep their build experience on such files will simplified try-and-error process.
    I agree with this, but maybe this kind of info about ground-up building can go in a wiki.
    I mentioned this dep cycle topic in #archlinux-arm:
    2013-02-14 11:13:18 @WarheadsSE tdy, they will want to drop from deps, then rebuild w/ them back in
    2013-02-14 11:14:03 tdy yea, that seems to be the easiest way.. e.g. build cairo w/o svg, build the chain, then rebuild cairo with svg
    2013-02-14 11:14:12 @WarheadsSE yup
    2013-02-14 11:14:31 @WarheadsSE thats a very simplified method of how we fix spaghetti monsters
    Maybe you can check with them to see if they've kept some documentation about build orders or any tips in general.
    Last edited by tdy (2013-02-15 16:54:36)

  • How to build a BIG TREE with Tree-Form layout

    Hi,
    I do have a self-referenced table with our org structure - 15 000 positions.
    I do want to create a tree with this structure.
    Requirements :
    a, to have a tree-form layout
    b, to have search capabilities
    I have tried to use several combinations (maybe all)
    - from using only one View object and create recursive tree - doesn't even run
    - to use two View objects, first as top level nodes, the other as the rest - it runs
    but I can search only top level, and what is worse, by clicking on the node for showing additional information (tree-form layout) I'm waiting for ages for seeing the info
    (it seems that all records are loaded one by one into AS)
    Could you provide some ideas how to deal with this ?
    Thanks.

    I am sorry, this is beyond the scope of this forum.
    As with any functionality not directly provided by JHeadstart, you can build it yourself using the ADF design time tools in JDeveloper. Please use the JDeveloper forum for help on this first step.
    Then, to keep your pages generatable you can move these customizations to custom templates. We are happy to help you with this last step, should you have problems there.
    Steven Davelaar,
    JHeadstart Team.

  • How to build a gantt chart with BI Publisher

    Hi everybody, I need to create a gantt chart with BI Publisher. I had a look to the document "Getting Gantty" from the blog:
    http://blogs.oracle.com/xmlpublisher/2008/01/getting_gantty.html
    but I don't understand in which way:
    1. build the data template in order to replicate the XML code in the article
    2. build and link the yellow bar which dynamically increases its length according to the meeting duration
    Anybody already tried to implement something similar ? I didn't still found a real example about how to do it......
    I need a help, please
    Thanks in Advance
    Alex

    Yes that is the only option which we can stop a running report in BI Publisher
    I suspect you'll need to ask your DBA to kill the session.
    However, if you have DBA privileges yourself, you can do this by a few methods, some of which are described here:
    http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
    Mark if helps,
    Thanks,

  • JSP, Data tags, How to build a form edit with multiple records

    Hi, I'm using Jdev 9i.
    I would like to have a JSP form where I can update, delete, insert records displayed in the same page.
    I know that I can use the data tag jbo:DataEdit to do it, but it only works with a single record, I want to have several records in the same page, displayed horizontally.
    The best example is a form to add items in an invoice:
    Productid description quantity price
    1001 xxx 10 20.00
    1002 yyy 15 30.00
    1003 zzz 7 10.00
    Could you give some help please?
    Thanks in advance.

    The form display is dictated by how you process the submit. I would build the form by using standard html tags. Here is another pseudo example:
    <FORM ACTION="target.jsp" >
    <TABLE>
    <TR>
    <TD>
    DeptNo
    </TD>
    <TD>
    DName
    </TD>
    <TR>
    <%
    int nRow = 0;
    %>
    <jbo:RowsetIterate datasource="ds">
    <%
    // increment the row number
    nRow++;
    String sDeptno = "Deptno" + nRow;
    String sDname = "Dname" + nRow;
    String sRowKey = "RowKey" + nRow;
    %>
    <jbo:Row id="myrow" action="current">
    <TR>
    <TD>
    <input type="text" name="<%=sDeptno%>" value='<jbo:ShowValue dataitem="Deptno" />' />
    </TD>
    <TD>
    <input type="text" name="<%=sDname%>" value='<jbo:ShowValue dataitem="Dname" />' />
    <input type="text" name="<%=sRowKey%>" value='<jbo:ShowValue dataitem="RowKey" />' />
    </TD>
    <TR>
    </jbo:Row>
    </jbo:RowsetIterate>
    <input type="submit" />
    </TABLE>
    </FORM>
    NOTE: This should get you started!!!

  • How can I represent a table with JSF ?

    Hi,
    I want to replace my (html) table with a JSF representation..
    I found the tag <h:dataTable>, and this defines <h:column> but there is no <h:row> !!
    There is an attribute rows to represent the number of rows to display, but how can I add these rows ?
    Thank you

    <h:panelGrid columns="2">
    </h:panelGrid>will produce table with 2 columns and if provided, the next 2 columns will appear in the next row and so forth...

  • How to build Project Budget report with "IF-then" formula?

    HI
    I have user requirement to create this report:
    Controlling Area Currency CAC
    Object Currency (OC)
    Amount to be returned calculation
    Amount to be used for Budget Return
    Budget (CAC)
    Actual (CAC)
    Remaining Budget (CAC)
    Budget (OC)
    Actual (OC)
    Remaining Budget (OC)
    CAC Remaining
      Budget converted to OC using Budget rate (OC)
    OC Remaining Budget converted to CAC using Budget rate (CAC)
    (1)
    (2)
    (3)
    (4)
    (5)
    (6)
    (7) = (3) * Budget rate
    (8) = (6) / Budget rate
    if (8) => (3) then
      (7), else (6)
    Project 1
    Project 2
    Project 3
    Project 4
    Project 5
    My dilemma is wich tool to use to build the report & how.
    CJE2 & CJE6  Project Hierarchy Reports
    I have managed to create columns 1 - 6 using a copy of forms from SP1 Reporting Group
    but I fail to create "IF - then" formula
    GRR2 Report Painter
    SP1 & SP2 Reports are not available there to copy from, while  SP3 has no Budget data available
    GR32 Report Writer
    I'm just not sure how to manage it & where to start from? Is that realistinc to do without special training?
    Please could you help me to figure out how can get to deliver that user requirement?
    What shall better do?
    Thank you very much in advance,
    Daria

    Hi Daria,
    In addition to what Sunil has mentioned , i think you don't need to get into the AFVC table unless you are using network activities under the WBS. Even then I don't see a need for AFVC as your budgeting is at the WBS level.
    And  your requirement is to capture Budget, Actual Cost and Remaining Budget and Return as per your formula..  here You should be looking at the below tables:
    1. PROJ : For Getting the list of Project.
    2. PRPS : for getting the WBS for the Projects..
    3. COEP or COSP OR RPSCO.
    Though you can get all your values in RPSCO but this is a huge table and you can hit some performance issues.. So you can use COEP or COSP ( if you want to use Line items or totals)..
    Rest you can go with the logic given by Sunil.. Just filter the values by the Value type for each project and you should get your desired result..
    Regards
    Sammar

  • How to print a Vbox container with several pages

    I need to print a Vbox container that contains severval pages
    of content with .5 inch margins and a footer with the page number.
    The content is created from htmlText coming from several reccords
    in a MySQL table. I have been able to print the content using
    FlexPrintJob across multiple pages, but the print fills the entire
    page with no margins and the footer only on the last page. How can
    I best do this?

    I had a similar issue, here are some tips:
    Check Flex's example for printing a PrintDataGrid in mulitple
    pages (
    http://livedocs.macromedia.com/flex/2/langref/mx/printing/PrintDataGrid.html
    or in the Printing chapter of the Flex Developer's Guide), that
    will give you an idea of how to handle the footer and the header.
    Now about the margins you will have to do it manually, i
    can't think of any other solution for that.
    If you still have doubts, let me know about it, trying to be
    as specific as possible

Maybe you are looking for

  • Questions on LDAP w.r.t XML Publisher 5.6.2

    Hi all, I have 2 questions on LDAP integration w.r.t XML P 5.6.2 1) Is OID the only supported LDAP repository? I tried to set up a Iplanet directory server against XMLP, but could not. Did I miss something, or it is not supported? Other than OID, any

  • All values from multiple select LOV

    Hi. Ik have a customize screen for a chart where a can select days. That works. But i want the standard value to be 'all days', so the user does not have to click all seven days. When i have combobox i use in the where clause: "and (fieldname = :vari

  • UTFDataFormatException in JOLT buffer

    I would appreciate some tips on how to track down the cause to my problems with fetching certain strings from my database from my Java client using Tuxedo and JOLT. When reading a certain 380 characters long string from the database, the client crash

  • Logic behind MC46 & MC50

    Hi Everybody, I want to know the logic behind 1)MC46 i.e. Report for Non moving & slow moving stock 2)MC50- Report for Dead stock My client wants to know the logic behind these reports. What i need to explain them exactly? Please guide.

  • ABAP to Unicode COnversion

    hi ABAPers. please help in regards to unciode conversion. my work is to conver abap(which is in hr abap) to unicode conversion. and im not aware of unicode conversion. what exactly we need to do in unicode conversion. is there any coding part comes i