RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

has no properties...

Join Date: Apr 2007
Posts: 18
Reputation: Arch_Bytes is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Arch_Bytes Arch_Bytes is offline Offline
Newbie Poster

Help has no properties...

  #1  
Jun 22nd, 2007
I have this jsf page that saves to the database. After saving it goes to a particular page. This page is then supposed to display the message that the changes were saved to the database. These are two different pages and go through several controllers. so what i did was use a hidden tag to retrieve a value.. here's my code..

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
<f:view>
<html>
<head>
<title>ShipServ Pages: Search Results</title>
<link rel="stylesheet" type="text/css" href="/pages/css/pages.css"/>
<script type="text/javascript" language="javascript" src="/pages/js/thatThing.js"></script>
<script type="text/javascript" language="javascript">
if(document.getElementById('a2z:saveMessage').value==true)
{
alert("Supplier Saved");
document.getElementById('a2z:saveMessage').value=false;
}
</script>

</head>
<h:form id="a2z">
<body>


<%@ include file="/selfService/header.jsp" %>
<table width="90%" border="1" cellspacing="0" cellpadding="4" align="center">
<tr>
<td colspan="2" class="titleBar">All Listings A to Z</td>
</tr>
<tr>
<td width="15%" class="adminMenu" style="vertical-align:top;"><%@ include file="adminMenu.jsp" %></td>
<td style="vertical-align:top;">

<%@ include file="adminListingsHeader.jsp" %>
<h:inputHidden id="saveMessage" value="#{addEditController.successfulSave}"/>
<h:inputHidden value="#{a2zController.currentLetter}" id="letter"/>

<table border="1" width="100%" cellpadding="0" cellspacing="0" class="navBar">
<tr>
<t:dataList value="#{adminController.a2z.alphabet}" var="letter">
<h:panelGroup rendered="#{adminController.a2z.currentLetter == letter}">
<f:verbatim><td width="3.8%" align="center"></f:verbatim>
<h:commandLink value="#{letter}" style="font-size:larger;" styleClass="pageNumberSelected" actionListener="#{AtoZController.paginate}" onclick="letterClicked('#{letter}')" immediate="true"/>
<f:verbatim></td></f:verbatim>
</h:panelGroup>
<h:panelGroup rendered="#{adminController.a2z.currentLetter != letter}">
<f:verbatim><td width="3.8%" align="center"></f:verbatim>
<h:commandLink value="#{letter}" styleClass="pageNumber" actionListener="#{AtoZController.paginate}" onclick="letterClicked('#{letter}')" immediate="true"/>
<f:verbatim></td></f:verbatim>
</h:panelGroup>
</t:dataList>
</tr>
</table>

<br>

<h:dataTable value="#{AtoZController.adminSuppliers}"
var="s"
border="0"
cellpadding="0"
cellspacing="0"
columnClasses="listColumn"
rowClasses="shaded,clear">

<h:column>
<h:commandLink styleClass="resultName" value="#{s.name}, #{s.address1}, #{s.address2}, #{s.city}, #{s.country}" action="#{adminController.editSupplier}" actionListener="#{adminController.editListedSupplier}" immediate="true"/>

<h:outputText value="<br><br>" escape="false"/>

<h:panelGrid id="table1"
columns="3"
border="1"
width="100%"
styleClass="tableRowMiddleAligned">

<h:column>
<h:outputText style="font-weight:bolder;" value="Listing Expiry Date"/>
</h:column>

<h:column>
<h:outputText style="font-weight:bolder;" value="Listing Level"/>
</h:column>

<h:column>
<h:outputText style="font-weight:bolder;" value="Directory Entry Status"/>
</h:column>

<h:column>
<h:outputText value="#{s.listingExpiryDate}"/>
<h:outputText value="&nbsp;" rendered="#{empty s.listingExpiryDate}" escape="false"/>
</h:column>

<h:column>
<h:outputText value="#{s.listingLevelName}"/>
</h:column>

<h:column>
<h:outputText value="#{s.listingStatus}"/>
</h:column>

</h:panelGrid>
<h:outputText value="<br>" escape="false"/>
<h:panelGrid id="table2"
columns="3"
border="1"
width="100%"
styleClass="tableRowMiddleAligned">

<h:column>
<h:outputText style="font-weight:bolder;" value="Telephone"/>
</h:column>

<h:column>
<h:outputText style="font-weight:bolder;" value="Fax"/>
</h:column>

<h:column>
<h:outputText style="font-weight:bolder;" value="Email"/>
</h:column>

<h:column>
<h:outputText value="#{s.phone1}"/>
<h:outputText value="&nbsp;" rendered="#{empty s.phone1}" escape="false"/>
</h:column>

<h:column>
<h:outputText value="#{s.fax}"/>
<h:outputText value="-" rendered="#{empty s.fax}" escape="false"/>
</h:column>

<h:column>
<h:outputText value="#{s.publicEmail}"/>
</h:column>

</h:panelGrid>

</h:column>
</h:dataTable>

</td>
</tr>
</table>
</body> 
</h:form>
</html>
</f:view>

problem is it generates a an error it says "document.getElementById("a2z:saveMessage") has no properties"

help needed badly!!
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:14 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC