Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!

Ian Dunsirn

Ranch Hand
+ Follow
since May 25, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ian Dunsirn

I can indeed do that, but if someone looks at my application in IE7, they will see both that title tooltip as well as the richfaces one. I wanted all the tooltips to have the same look, which is why I used the richfaces tooltip in the inputText box and want to use them with the command button.
14 years ago
JSF
I am having a problem with tooltips and command buttons. The code is:
h:commandButton value="Customize Sort Order" action="#{issueListener.customSort}" onklick=""
rich:toolTip
span style="white-space:nowrap"
Allows you to sort this list by several criteria.
span
rich:toolTip
h:commandButton

The problem is that in Firefox, I can't see the tooltips. I can see them in IE 7.0. The other odd thing is that the tooltip shows up for this code:

h:inputText id="newProjectCode" value="#{addprjsys.projectCode}" required="true" requiredMessage="Please enter the Project Code."
rich:toolTip
span style="white-space:nowrap"
The code for this project.
span
rich:toolTip
h:inputText

What gives? Why can't I see the command button tooltip in Firefox?
14 years ago
JSF
I did try that and still got nothing. Is there an example somewhere?
14 years ago
JSF
I have a data table with some check boxes in it. I would like to have those checkboxes to be centered within their cells and can't get it to work. I've tried text-align: center and columnClasses with no luck. Can checkboxes even be centered? My code is as follows:

<h ataTable value="#{List.newList}" headerClass="tableHeader" var="person">
<h:column>
<f:facet name="header">
<h utputText value="Name"/>
</f:facet>
<h utputText value="#{person.Name}"/>
</h:column>

<h:column>
<f:facet name="header">
<h utputText value="Processed"/>
</f:facet>
<h:selectBooleanCheckbox value="#{person.processed}" style="text-align: center"/>
</h:column>
</h ataTable>
14 years ago
JSF
I have this listbox:

<h:selectOneListbox id="newStatus" size="1" value="#{thisIssue.status}">
<f:selectItems value="#{dropDown.statusList}"/>
</h:selectOneListbox>

What I would like is for the value to appear in the listbox to match what is in thisIssue.status. How can I do this because right now, I get the first value of dropDown.statusList instead of the value that is in thisIssue.status.

Am I missing something here?
14 years ago
JSF
I am such a newb. I figured out that the problem lies in my command button. I put in the attribute immediate="true" and everything works like it should.
14 years ago
JSF
I am having the weirdest problem. I have a page with some components, one of which is a button. This button was working fine until I put in a selectOneListbox, calling it's listener method like a pro.

I put in the selectOneListbox and suddenly the button doesn't seem to work, not callings its method.

I have included the jsp code. The listener method is just three debug lines telling me that it was called.

The strange thing is, if I replace the f:selectItems with an empty list, things seem to work fine.

Can anyone point out what I may be missing here? All my beans are defined and populated.

<h:form>
<f:verbatim>
<p>  
</f:verbatim>

<h:outputText value="Add new Issue for #{prjsys.projectSystemCode} : #{prjsys.projectSystemTitle}"
style="font-weight : bold" rendered="#{passData.passAction == 'Add'}"/>

<h:outputText value="Edit Issue for #{prjsys.projectSystemCode}: #{prjsys.projectSystemTitle}"
style="font-weight : bold" rendered="#{passData.passAction == 'Edit'}"/>

<f:verbatim>
<div id="appFooter"></div>
<br>   
</f:verbatim>

<h:outputText value="Please do not enter any sensitive data." style="color : red; font-weight : bold"/>
<f:verbatim><br></f:verbatim>

<h:panelGrid columns = "3">
<h:outputText value="Issue #"/>
<h:outputText value="New Issue" rendered="#{passData.passAction == 'Add'}"/>
<h:outputText value="#{thisIssue.issueId}" rendered="#{passData.passAction == 'Edit'}"/>
<h:outputText value=""/>

<h:outputText value="Title:"/>
<h:inputText id="newTitle" value="#{thisIssue.title}" size="107"/>
<h:message for="newTitle" style="color : red; font-weight : bold"/>

<h:outputText value="Issue Description:"/>
<h:inputTextarea id="newDescription" value="#{thisIssue.description}" rows="5" cols="80"/>
<h:message for="newDescription" style="color : red; font-weight : bold"/>
</h:panelGrid>

<f:verbatim>
<div id="appFooter"></div>
<br>  
</f:verbatim>

<h:outputText value="Status:" style="padding: 0px 100px 0px 0px"/>
<h:selectOneListbox id="newStatus" size="1" value="#{thisIssue.status}" immediate="true">
<f:selectItems value="#{dropDown.statusList}"/>
</h:selectOneListbox>

<h:commandButton image="images/AddButton.gif" action="#{issueListener.addAttachment}"/>
<h:outputText value=" Add new attachment(s)"/>

<f:verbatim>
<div id="appFooter"></div>
<br>   
</f:verbatim>
</h:form>
14 years ago
JSF
I figured out my problem.
14 years ago
JSF
Hello,

I am new to JSF and am having a problem with navigation. I have a button on a jsf page defined like so (brackets deliberately left out):

h:commandButton value="Customize View" action="#{issueListener.getViewSettings}"

The method is defined as follows:
public String getViewSettings()
{
log.info("--------------------------------------------------");
log.info("Entering getViewSettings");
log.info("--------------------------------------------------");

return "customView";
}//end getViewSettings method

The navigation rule in faces-config.xml is:
<navigation-case>
<from-outcome>customView</from-outcome>
<to-view-id>/Issue_customview.jsp</to-view-id>
</navigation-case>

What I expect is that the button will call the getViewSettings, which will return the string "customView", which in turn will display the page Issue_customview.jsp.
However, this is not what happens. What happens is I get a blank screen and no error message. If I change the string that is returned in getViewSettings to match a different navigation case, the application will go to that page. I do not understand the problem. Here is the page I am trying to get to (not much to it yet):

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<f:view>
<f:subview id="header">
<jsp:include page="e9000/common/Header.jsp"/>
</f:subview>

<f:subview id="itsmenubar">
<jsp:include page="e9000/common/Itsmenubar.jsp"/>
</f:subview>

<f:subview id="issueMenuBar">
<jsp:include page="e9000/issue/IssueMenuBar.jsp"/>
</f:subview>

<h:form>

<f:verbatim>
<p>  
</f:verbatim>

<h:outputText value="Customize View" style="font-weight : bold"/>

<!-- Separator -->
<f:verbatim>
<div id="appFooter"></div>
<br>   
</f:verbatim>
<!-- Separator -->
<f:verbatim>
<div id="appFooter"></div>
<br>   
</f:verbatim>


</h:form>

<f:subview id="footer">
<jsp:include page="e9000/common/Footer.jsp" />
</f:subview>
</f:view>
14 years ago
JSF
I found a way around it for now. It would appear that prjsys.oldestCommentFirst needs to be a String before the radio buttons will work like I wanted.
14 years ago
JSF
I made that correction and it still is not working.
14 years ago
JSF
I am having some troubles with radio buttons. Here is my code:

<h:selectOneRadio id="commentOrder" value="{#prjsys.oldestCommentFirst}">
<f:selectItem itemLabel="Newest First" itemValue="false"/>
<f:selectItem itemLabel="Oldest First" itemValue="true"/>
</h:selectOneRadio>

The item in the bean (prjsys.oldestCommentFirst) is set to true. I expect that when I call my page, the radio button for "Oldest First" should be filled in. However, when I actually do call the apge, nothing is selected. How can I get the jsf to fill in the appropriate button based on the value stored in prjsys.oldestCommentFirst?
14 years ago
JSF
Ok, I finally figured out what you were getting at and everything seems to be five by five. Thanks for the help.
14 years ago
JSF
Ok, I have this now:
<h:dataTable value="#{uiSelFieldList}" headerClass="tableHeader" var="fieldList" binding={{passData.passTable}">
<h:column>
<f:facet name="header">
<h:outputText value="Action"/>
</f:facet>
<h:commandButton image="images/DeleteButton.gif"
action="#{projectListener.deleteUIFields}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Field Value"/>
</f:facet>
<h:inputText id="fieldValue" value="#{fieldList.fieldValue}"/>
</h:column>
</h:dataTable>

In my bean, I have defined passTable as an HtmlDataTable. When I try to run, I get an argument type mismatch error. What could be causing this?
14 years ago
JSF
Are there any examples of items 1 and 2 on your response anywhere? I only just started JSF programming within the last month, so I have no idea of how to carry out the solutions you have mentioned. I shall also take a closer look at the link you provided when I go to work tomorrow.
14 years ago
JSF