Dököll 2,364
Recognized Expert Top Contributor
Hey Gang!
I thought I had a good idea but then I realized JSF doesn't play that...
I am trying to mimick what HTML can do in JSF when using target tags to related to inner HTML pages. In orther to get to a links going smoothly in JSF, on would do: -
-
<%@ page contentType="text/html" %>
-
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-
-
<f:view>
-
<html>
-
<head><title>jsf h:commandLink example</title></head>
-
-
<body>
-
<h:form>
-
<h:commandLink value="Click here for Homepage"
-
action="HomePage" />
-
</h:form>
-
</body>
-
</html>
-
</f:view>
-
-
This works great with the body of your JSF enabled JSP page. But in the case you need to use marginal links to fire such pages, as in frames from HTML pages, one would do:
Index.html
[code=HTML]
<html>
<head>
<title>Just Music </title>
</head>
<!--Company logo-->
<frameset rows=" 90,*">
<frame noresize="noresize" src="rhlg.html" scrolling="no">
<!--Company link-->
<frameset cols=" 200,*">
<frame noresize="noresize" src="link.html" scrolling="scrolling">
<!--Company body-->
<frame noresize="noresize" src="default.html" name="colours" marginheight="0" marginwidth="10">
</frameset>
</frameset>
</html>
link.HTML
The link page in turn would have something like this: -
-
<body bgcolor="#CCCCCC" onload="RotateIt()">
-
-
....
-
-
<table align="center" border="0" cellspacing="0" cellpadding="2" rules="cols" width="70" height="20" bgcolor="gray">
-
<tr bgcolor="red">
-
<td bgcolor="#D3D3D3" colspan="2"><br>
-
<center><font size="-1">
-
<a href="default.html" target="colours">Dököll Home</a><br>
-
<a href="sched103.html" target="colours">Schedule</a>
-
<br>
-
<a href="MediaPlaylist.html" target="colours">Media Playlist</a>
-
<br>
-
<a href="Usolutes.html" target="colours">Company info</a>
-
<br>
-
<a href="UAccessor.html" target="colours">Dj Accessories</a>
-
<br>
-
<a href="Upinskeys.html" target="colours">Pins & Keys</a>
-
<br>
-
<a href="UPhanthomDjListBox.html" target="colours">Goods/Services</a>
-
<br>
-
<a href="UEmail.html" target="colours">Send Email</a></center>
-
-
</font> </p><center>
-
-
....
The default page would be the HomePage...
On e links are accessed through link.HTML, the inner HTML frame would display HomePage.HTML.
Th problem is getting JSF to mimick this effortlessly, what I get is an additional window when you using: -
<f:view>
-
<html>
-
<head><title>jsf h:commandLink example</title></head>
-
-
<body>
-
<h:form>
-
<h:commandLink value="Click here for Homepage"
-
action="HomePage" />
-
</h:form>
-
</body>
-
</html>
-
</f:view>
-
-
I cannot find a translation to from target="colours" in HTML to JSF.
Any input you have is appreciated.
Happy Sunday!
Dököll
4 10095 Dököll 2,364
Recognized Expert Top Contributor
Getting there, a bit stuck. The link in the navigation area is not working properly. Seems stuck:
link.jsp -
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
-
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
-
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
<title>Navigational Links</title>
-
</head>
-
<body>
-
<f:view>
-
<h:form>
-
<h:commandLink value="Click here for Homepage"
-
action="retrieve_success" />
-
</h:form>
-
</f:view>
-
</body>
-
</html>
-
-
we need a header, I did not add any text yet, just generated code. But the link above does not seem to work, I will also post the errors much after:
header.jsp -
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
-
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
-
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
<title>Header File</title>
-
</head>
-
<body>
-
<f:view>
-
-
</f:view>
-
</body>
-
</html>
-
-
again, it's nothing fancy, just generated code, then retrieve_page.jsp as the body of the new page, which in the case is a log in page:
retrieve_page.jsp -
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
-
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
-
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
<title>Log In Form</title>
-
</head>
-
<body>
-
<f:view>
-
<h:form>
-
<table>
-
<tr>
-
<td><h:outputText value
-
="Enter Login ID: " /></td>
-
<td><h:inputText id=
-
"UserID" value="#{RetrieveBean.UserID}" /></td>
-
</tr>
-
<tr>
-
<td><h:outputText value=
-
"Enter Password: " /></td>
-
<td><h:inputSecret id=
-
"UserPswrd" value="#{RetrieveBean.UserPswrd}" ></h:inputSecret></td>
-
</tr>
-
<tr>
-
<td> </td>
-
<td><h:commandButton value=
-
"Enter here" action="#{RetrieveBean.GetValidLoginData}" /></td>
-
</tr>
-
</table>
-
</h:form>
-
-
</f:view>
-
</body>
-
</html>
-
-
here is what makes it all work, just like html but with some tweecking, it looks like I'll have what I need. But I need your help, I think I am too burned out;-( -
-
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
-
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
-
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
<title>ReloadPage</title>
-
</head>
-
<f:view>
-
<frameset rows="46,*" frameborder="yes" framespacing="0" border="2">
-
<frame src=" header.jsf" name="header" scrolling="no" noresize="noresize"/>
-
<frameset cols="20%,80%" border="2" frameborder="no" framespacing="2" >
-
<frame src="navtree.jsf" name="navigation" scrolling="yes" frameborder="no" noresize="noresize"/>
-
<frameset rows="90%,22" frameborder="no" framespacing="0">
-
<frame src="retrieve_page.jsf" name="navigation" frameborder="no" scrolling="yes" frameborder="no" noresize="noresize"/>
-
</frameset>
-
</frameset>
-
</frameset>
-
</f:view>
-
</html>
-
-
All work well except the link part, the first bit of code {"action="retrieve_success} seems simple but I just can't quite put my finger on it:
Here are some of the errors, they don't seems to be English:-) -
-
Nov 18, 2008 1:36:14 AM com.sun.faces.application.NavigationHandlerImpl getViewId
-
WARNING: "JSF1013: Unable to find matching navigation case from view ID '/link.jsp' for outcome 'retrieve_success' and action 'retrieve_success'
-
-
Any guidance you have is greatly appreciated...
actually, this "for outcome 'retrieve_success' and action 'retrieve_success'" is telling me something, seems a little funky sounding:-)
Thanks again!
Dököll 2,364
Recognized Expert Top Contributor
Getting there, a bit stuck. The link in the navigation area is not working properly. Seems stuck:
link.jsp -
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
-
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
-
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
<title>Navigational Links</title>
-
</head>
-
<body>
-
<f:view>
-
<h:form>
-
<h:commandLink value="Click here for Homepage"
-
action="retrieve_success" />
-
</h:form>
-
</f:view>
-
</body>
-
</html>
-
-
we need a header, I did not add any text yet, just generated code. But the link above does not seem to work, I will also post the errors much after:
header.jsp -
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
-
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
-
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
<title>Header File</title>
-
</head>
-
<body>
-
<f:view>
-
-
</f:view>
-
</body>
-
</html>
-
-
again, it's nothing fancy, just generated code, then retrieve_page.jsp as the body of the new page, which in the case is a log in page:
retrieve_page.jsp -
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
-
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
-
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
<title>Log In Form</title>
-
</head>
-
<body>
-
<f:view>
-
<h:form>
-
<table>
-
<tr>
-
<td><h:outputText value
-
="Enter Login ID: " /></td>
-
<td><h:inputText id=
-
"UserID" value="#{RetrieveBean.UserID}" /></td>
-
</tr>
-
<tr>
-
<td><h:outputText value=
-
"Enter Password: " /></td>
-
<td><h:inputSecret id=
-
"UserPswrd" value="#{RetrieveBean.UserPswrd}" ></h:inputSecret></td>
-
</tr>
-
<tr>
-
<td> </td>
-
<td><h:commandButton value=
-
"Enter here" action="#{RetrieveBean.GetValidLoginData}" /></td>
-
</tr>
-
</table>
-
</h:form>
-
-
</f:view>
-
</body>
-
</html>
-
-
here is what makes it all work, just like html but with some tweecking, it looks like I'll have what I need. But I need your help, I think I am too burned out;-(
index.jsp -
-
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
-
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
-
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
<title>ReloadPage</title>
-
</head>
-
<f:view>
-
<frameset rows="46,*" frameborder="yes" framespacing="0" border="2">
-
<frame src=" header.jsf" name="header" scrolling="no" noresize="noresize"/>
-
<frameset cols="20%,80%" border="2" frameborder="no" framespacing="2" >
-
<frame src="link.jsf" name="navigation" scrolling="yes" frameborder="no" noresize="noresize"/>
-
<frameset rows="90%,22" frameborder="no" framespacing="0">
-
<frame src="retrieve_page.jsf" name="navigation" frameborder="no" scrolling="yes" frameborder="no" noresize="noresize"/>
-
</frameset>
-
</frameset>
-
</frameset>
-
</f:view>
-
</html>
-
-
All work well except the link part, the first bit of code {"action="retrieve_success} seems simple but I just can't quite put my finger on it:
Here are some of the errors, they don't seems to be English:-) -
-
Nov 18, 2008 1:36:14 AM com.sun.faces.application.NavigationHandlerImpl getViewId
-
WARNING: "JSF1013: Unable to find matching navigation case from view ID '/link.jsp' for outcome 'retrieve_success' and action 'retrieve_success'
-
-
Any guidance you have is greatly appreciated...
actually, this "for outcome 'retrieve_success' and action 'retrieve_success'" is telling me something, seems a little funky sounding:-)
Thanks again!
Bingo Folks, Bing-Freaking-Go!
Told you I was tired, here's the scoop, I forgot to also name it colours, while calling olours: -
-
<f:view>
-
<frameset rows="46,*" frameborder="yes" framespacing="0" border="2">
-
<frame src=" header.jsf" scrolling="no" noresize="noresize"/>
-
<frameset cols="20%,80%" border="2" frameborder="no" framespacing="2" >
-
<frame src="link.jsf" scrolling="yes" frameborder="no" noresize="noresize"/>
-
<frameset rows="90%,22" frameborder="no" framespacing="0">
-
<frame src="retrieve_page.jsf" name="colours" frameborder="no" scrolling="yes" frameborder="no" noresize="noresize"/>
-
</frameset>
-
</frameset>
-
</frameset>
-
</f:view>
-
That's it, that's all it was...
No errors... Unbelievable. Well, it's here now, others won't ahve to go through the turmoil:-)
In a bit!
Dököll 2,364
Recognized Expert Top Contributor
I must caution, a JSF tutorial is so needed before diving in to web apps, looking at my problem above, one would not know how to go through it an get it to work. Especially with my poor explaination of the problem.
Here's a reference on JSF: JavaServer Faces (JSF) Tutorial Net. Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Mel |
last post by:
Are we going backwards ? (please excuse my spelling...)
In my opinion an absolute YES !
Take a look at what we are doing ! we create TAGS, things like <H1> etc.
and although there are tools...
|
by: Christophe Guillon |
last post by:
Hello
I would like to have a hypertext link which, when I click on it, leads
to a web page where a certain word is highlighted. Depending on the
link, the same target page would be displayed but...
|
by: Michael |
last post by:
Hello,
I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line...
|
by: Rebecca Tsukalas |
last post by:
hello,
is there an official or a correct way for the following problem:
in my xml file, there is also html text. this xml file is used in flash and a php code.
the problem is, that - using...
|
by: Fred Chateau |
last post by:
Is there a problem with the HTML 4.01 schema in Visual Studio 2005?
When I set the target schema for validation to HTML 4.01, I receive closing
tag errors.
Example:
Validation (HTML 4.01):...
| |
by: since |
last post by:
I figured I would post my solution to the following.
Resizable column tables.
Search and replace values in a table. (IE only)
Scrollable tables.
Sortable tables.
It is based on a lot...
|
by: nothing1 |
last post by:
Ok here is my question i hope its something easy. I have CMS that generates images from whatever url I put with its corresponding syntax. Well I want to add a Lightbox to does images but instead of...
|
by: Lars Eighner |
last post by:
In our last episode, <004f629c$0$10265$c3e8da3@news.astraweb.com>, the
lovely and talented mark4asp broadcast on
comp.infosystems.www.authoring.html:
I have not done this, not even on...
|
by: Guy Macon |
last post by:
Moon wrote:
It isn't a question of relative vs. full URL paths in your meta tags.
It is a question of following the paths (relative or full URL) in
your meta tags vs. not reading the meta tags...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |