You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Wolf Benz <eu...@gmail.com> on 2006/07/25 20:06:52 UTC

stupid question

Hi List,

I'm afraid I have a beginner's question, but either smth's terribly  
wrong or I have overlooked smth trivial.
I'm just trying to display a global message, yet they won't show!

What I tried, is:

in the bean, I've tried both the "Std" way and the Apache-way (with  
MessageUtils):

FacesContext ctx = FacesContext.getCurrentInstance();
ctx.addMessage(null, new FacesMessage("Test Summary","Test" ));

& MessageUtils.addMessage(FacesMessage.SEVERITY_ERROR,"secMsg_test" ,  
null);

<--> In the page, I'v tried with both "Std" h: & Apache t: ... both  
without effect:

<t:messages errorStyle="error"/>
</h:form>
<h:messages errorClass="error" />

btw as you can see, I've also tried to put them before & after the  
h:form-tag. Does that really matter?

As I understood, from the moment you add a message, the same page is  
redisplayed with the message.(/s)
This works fine for all <h:message for="ID-of-a-component"  />, but I  
never got this h:messages to work!!

Any ideas? (don't mind manners, I'm obviously missing smth basic  
here :-)

Wolf

Re: stupid question

Posted by Wolf Benz <eu...@gmail.com>.
try:
ctx.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Test
Summary","Test" ));
<h:messages ... should go inside the form.
you could put showSummary="true" in the <h:messages ... (if this  
isn't the
default)

-- I had already tried those. (different constructors, different  
places) To no avail. :-(

you can put your logging level at debug to get alot more information  
on what
is going wrong.
-- Good idea, I'll see what that gives me concerning "messages".

Thx,
Wolf


Re: buguous

Posted by Wolf Benz <eu...@gmail.com>.
No I hadn't. Seeing a familiar name in the admin list though ;-)
I issued a bug in Jira today.
Thanks,
Wolf
On 27 Jul 2006, at 13:12, Cagatay Civici wrote:

Hi Wolf,

Have you tried facestrace?

It also displays the faces messages in the request,

http://sourceforge.net/projects/facestrace

Cagatay


On 7/26/06, Wolf Benz <eu...@gmail.com> wrote:
you can put your logging level at debug to get alot more information
on what
is
going wrong.
-- This is interesting:
"2006-07-26 10:48:02,296 DEBUG
[org.apache.myfaces.shared_impl.util.MessageUtils] - adding message
Global Security Test for clientId null"

I think it means the message is indeed added (and as it deals about
h:messageS, the clientId is indeed null, it's  global message)
Yet, even though there is a message added to the stack, the code just
follows the navigation as if nothing went wrong. (when a message is
added, the JSF automatically keeps the user at the same page right -
starting to doubt even this!)

A little further:
"006-07-26 10:48:05,074 DEBUG
[org.apache.myfaces.application.NavigationHandlerImpl] -
handleNavigation fromAction=#{managerbean.submitAction}
outcome=usrMgmt toViewId =userManagementChoice.jsp redirect=false"
-- This is the outcome as if all went fine (although a message is 
added in the same method, a little sooner)

Wolf






Re: stupid question

Posted by Cagatay Civici <ca...@gmail.com>.
Hi Wolf,

Have you tried facestrace?

It also displays the faces messages in the request,

http://sourceforge.net/projects/facestrace

Cagatay


On 7/26/06, Wolf Benz <eu...@gmail.com> wrote:
>
> you can put your logging level at debug to get alot more information
> on what
> is
> going wrong.
> -- This is interesting:
> "2006-07-26 10:48:02,296 DEBUG
> [org.apache.myfaces.shared_impl.util.MessageUtils] - adding message
> Global Security Test for clientId null"
>
> I think it means the message is indeed added (and as it deals about
> h:messageS, the clientId is indeed null, it's  global message)
> Yet, even though there is a message added to the stack, the code just
> follows the navigation as if nothing went wrong. (when a message is
> added, the JSF automatically keeps the user at the same page right -
> starting to doubt even this!)
>
> A little further:
> "006-07-26 10:48:05,074 DEBUG
> [org.apache.myfaces.application.NavigationHandlerImpl] -
> handleNavigation fromAction=#{managerbean.submitAction}
> outcome=usrMgmt toViewId =userManagementChoice.jsp redirect=false"
> -- This is the outcome as if all went fine (although a message is
> added in the same method, a little sooner)
>
> Wolf
>
>
>
>

Re: buguous

Posted by Wolf Benz <eu...@gmail.com>.
The links of the former post didn't make it.
--> Hence:
1/ URL reporting these bugs more than a year ago: (April 12, 2005)
http://mail-archives.apache.org/mod_mbox/myfaces-users/200504.mbox/% 
3C20050412060343.85397.qmail@web31109.mail.mud.yahoo.com%3E
2/ URL on MyFaces site ignoring these issues: http://wiki.apache.org/ 
myfaces/Displaying_Errors/Infos/Warnings_in_JSF_Pages

Wolf

On 26 Jul 2006, at 15:10, Wolf Benz wrote:

... and apparently a very old one too :-)
(link)
Perhaps a note on this page could be included some stuff doesn't work.
When I look at the source of the page rendered, my <h:messages  
id="errors" styleClass="error"> isn 't even rendered. (which explains  
these msgs are added to teh stack, yet not shown in the page)
But this is weird: in debug mode, the MyFaces output provides this:
" <html.HtmlMessages id="errors" forceIdIndex="true"  
errorClass="NULL" errorStyle="NULL" family="javax.faces.Messages"  
fatalClass="NULL" fatalStyle="NULL" globalOnly="false"  
infoClass="NULL" infoStyle="NULL" layout="list" rendered="true"  
rendererType="javax.faces.Messages" rendersChildren="false"  
showDetail="false" showSummary="true" style="NULL" styleClass="error"  
title="NULL" tooltip="false" transient="false" warnClass="NULL"  
warnStyle="NULL"/>"

Yet the "show source" does NOT include such element.

Wolf
_______________
For those interested, some code & source below.
_________________
(the page:)

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<jsp:root 	xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
			xmlns="http://www.w3.org/1999/xhtml" 	
			xmlns:f="http://java.sun.com/jsf/core"
     			xmlns:h="http://java.sun.com/jsf/html"
     			xmlns:t="http://myfaces.apache.org/tomahawk" >

<jsp:directive.page contentType="text/html;charset=utf-8"/>
<html>
	<head>
		<link href="../css/ss.css" rel="stylesheet" type="text/css"/>
	</head>

	<body topmargin="0" leftmargin="0" rightmargin="0" marginheight="0"  
marginwidth="0" class="body">

	<f:view>
	<f:loadBundle basename="x.y.z.labels" var="labels" />
	
	
	<f:subview id="header">
		<jsp:include page="./header.jsp" />
	</f:subview>
    	  	
    	<h:form id="usersForm">
    	
    	<br />
    	
    	<table align="center" cellpadding="1" width="90%"  
style="vertical-align:middle;background-image:url('../pics/ 
metal.jpg');padding:8px;border-style:outset;font-size:11pt;font- 
family:verdana;" >
    		<tr>  		
    			<td style="vertical-align:middle;" colspan="2"><h3><img  
src="../pics/groenBolleke.png" align="bottom" border="0" / 
 >&#160;<h:outputLabel value="#{labels.usrMgt_Title}" /></h3></td>
    		</tr>
    		<tr>
    			<td align="center" colspan="5" style="border-bottom-width: 
1px;border-bottom-style:solid;border-bottom-color:black;font-size: 
10px;font-style:italic;" >
    			<h:outputLabel value="#{labels.usrMgt_SubTitle}" />
    			</td>
    		</tr>
    	  	<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    		
    		<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    		   		
    		<tr align="center"> 			<!--  For the simple fields in the first  
table: -->
    			<td width="5%">&#160; </td> 		
    			<td colspan="3" style="border-style:solid; border-width: 
1px;border-color: SlateGrey" align="center">
    				<h:panelGrid 	bgcolor="SlateGrey" columns="2"  
id="userTabelSimple" cellpadding="2" cellspacing="0" width="100%"  
align="center"
    								columnClasses="labelKolom,inhoudKolom"  
rowClasses="rij1,rij2" >
    					<h:outputLabel value="#{labels.usrMgt_firstn}"/>
    					<h:inputText value="#{managerbean.currentUser.firstName}"  
id="voornaam" readonly="#{!managerbean.editableFieldMode}"  
accesskey="f"/>
    					
					<h:outputLabel value="#{labels.usrMgt_lastn}"/>
     					<h:inputText value="#{managerbean.currentUser.lastName}"  
id="achternaam" readonly="#{!managerbean.editableFieldMode}"  
accesskey="n"/>
		
  					<h:outputLabel value="#{labels.usrMgt_loginn}"/>
    					<h:inputText value="#{managerbean.currentUser.loginName}"  
id="login" readonly="#{!managerbean.editableFieldMode}" accesskey="l"/>
  					
  					<h:outputLabel value="#{labels.usrMgt_passw}"/>
    					<h:inputText value="#{managerbean.currentUser.password}"  
id="paswoord" readonly="#{!managerbean.editableFieldMode}"  
accesskey="p" />
  					
  					<h:outputLabel value="#{labels.usrMgt_bday}"/>
     					<h:inputText value="#{managerbean.currentUser.birthday}"  
readonly="#{!managerbean.editableFieldMode}" accesskey="b" >
     						<f:convertDateTime dateStyle="short" pattern="dd/MM/yyyy"  
type="date"/>
     					</h:inputText>
     					
     					<h:outputLabel value="#{labels.usrMgt_mail}"/>
     					<h:inputText value="#{managerbean.currentUser.email}"  
id="mail" readonly="#{!managerbean.editableFieldMode}" accesskey="e"/>
  					
  					<h:outputLabel value="#{labels.usrMgt_tel}"/>
    					<h:inputText value="#{managerbean.currentUser.tel}"  
readonly="#{!managerbean.editableFieldMode}" accesskey="t"/>
  								
    				</h:panelGrid>
    				<h:message for="userTabelSimple" styleClass="error"/>  	
    			
    			</td>
    			<td width="5%">&#160; </td>
    		</tr>
    		<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    		<tr align="center">  				<!--  For the complex fields in the  
Menus:  -->
    			<td width="5%">&#160; </td> 		
    			<td colspan="3" style="border-style:outset; border-width: 
1px;border-color: SlateGrey"  align="center">
    				<h:panelGrid bgcolor="SlateGrey" columns="7" cellpadding="2"  
cellspacing="0" width="100%" align="center" rowClasses="rij1,rij2"  
id="menukes">
    				
							<!-- For a User's Roles:  -->
    					<h:outputLabel value="#{labels.usrMgt_rolls}"  
styleClass="labelKolom2"/>
    					<h:selectOneMenu id="roleList" 	title="# 
{labels.usrMgt_roleListTitle}" value="#{managerbean.oldRollKey}"   
style="width:5cm;" readonly="#{!managerbean.editableFieldMode}"  
disabled="#{!managerbean.editableFieldMode}">
    						<f:selectItem itemLabel="#{labels.usrMgt_usrRolls}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.userRolls}" />
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.removeRoll}" value="-"
									title="#{labels.usrMgt_removeRollTitle}" style="width:1cm;" />
					<h:outputLabel id="spacer" value="&#160;" style="width:2 cm;"/>
					<h:outputLabel value="#{labels.usrMgt_allRolls}" style="width:4  
cm;" styleClass="labelKolom2"/>
					<h:selectOneMenu id="allRoleList" 	title="# 
{labels.usrMgt_allRolls}" value="#{managerbean.chosenRollKey}"  
style="width:5cm;">
    						<f:selectItem itemLabel="#{labels.usrMgt_allRolls}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.allRolls}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.addRoll}" value="+"  
style="width:1cm;"
									title="#{labels.usrMgt_addRollTitle}"  />				
    					
    					
    								<!-- For a User's Inherited Rolls:  -->
    					<h:outputLabel value="#{labels.usrMgt_inhRolls}"  
styleClass="labelKolom2"/>
    					<h:selectOneMenu id="roleList2" 	title="# 
{labels.usrMgt_InhRoleListTitle}" value="# 
{managerbean.oldInhRollKey}" style="width:5cm;" readonly="#{! 
managerbean.editableFieldMode}" disabled="#{! 
managerbean.editableFieldMode}" >
    						<f:selectItem itemLabel="#{labels.usrMgt_usrInhRolls}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.userInhRolls}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.removeInhRoll}"  
value="-"
									title="#{labels.usrMgt_removeInhRollTitle}" style="width: 
1cm;" />
					<h:outputLabel id="spacer2" value="&#160;" style="width:2 cm;"/>
					<h:outputLabel value="#{labels.usrMgt_allRolls}" style="width:4  
cm;" styleClass="labelKolom2"/>
					<h:selectOneMenu id="allRoleList2" 	title="# 
{labels.usrMgt_allRolls}" value="#{managerbean.chosenInhRollKey}"  
style="width:5cm;">
    						<f:selectItem itemLabel="#{labels.usrMgt_allRolls}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.allRolls}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.addInhRoll}"  
value="+" style="width:1cm;"
									title="#{labels.usrMgt_addInhRoll}"  />
										
    								<!-- For a User's Departments:  -->
    					<h:outputLabel value="#{labels.usrMgt_depts}"  
styleClass="labelKolom2"/>
    					<h:selectOneMenu id="roleList3" 	title="# 
{labels.usrMgt_deptsTitle}" value="#{managerbean.oldDeptKey}"  
style="width:5cm;" readonly="#{!managerbean.editableFieldMode}"  
disabled="#{!managerbean.editableFieldMode}" >
    						<f:selectItem itemLabel="#{labels.usrMgt_usrDepts}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.userDepts}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.removeDept}" value="-"
									title="#{labels.usrMgt_removeDeptTitle}" style="width:1cm;" />
					<h:outputLabel id="spacer3" value="&#160;" style="width:2 cm;"/>
					<h:outputLabel value="#{labels.usrMgt_allDepts}" style="width:4  
cm;" styleClass="labelKolom2"/>
					<h:selectOneMenu id="allRoleList3" 	title="# 
{labels.usrMgt_allDepts}" value="#{managerbean.chosenDeptKey}"  
style="width:5cm;">
    						<f:selectItem itemLabel="#{labels.usrMgt_allDepts}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.allDepartments}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.addDept}" value="+"  
style="width:1cm;"
									title="#{labels.usrMgt_addDeptTitle}"  />		
    							
    				</h:panelGrid>
    				<h:message for="menukes" styleClass="error"/>  		
    			</td>
    			<td width="5%">&#160; </td>
    		</tr>
    		<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    		<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    	
    		
    		<tr style="padding:8px;border-top-style:solid;border-top-width: 
1px;">
    			<td width="5%">&#160; </td>  		
    			<td align="center" colspan="3">
    				
				<h:commandButton 	action="#{managerbean.cancelAction}" value="# 
{labels.usrMgt_cancel}"
									title="#{labels.usrMgt_cancelHelp}" immediate="true"   
style="width:4cm;"/>	
				 &#160;&#160;&#160;
			
				<h:commandButton 	action="#{managerbean.editUser}" value="# 
{labels.usrMgt_edit}" disabled="#{managerbean.userEditDisabled}"
									title="#{labels.usrMgt_editUserHelp}" immediate="true"  
style="width:4cm;"/>	
				 &#160;&#160;&#160;					
    			</td>
    			<td width="5%">&#160; </td>  		
    		</tr>
    		
    		
    	</table>

    	<br/>
    	
    	<br/><br/>

	<table id="submitTable" align="center" width="90%" style="padding: 
8px;border-top-style:solid;border-top-width:1px;font-family:verdana;">	
    	   		<tr>
    	   			<td align="center">
				<h:commandButton 	action="#{managerbean.submitAction}" value="# 
{managerbean.submitActionBT}" rendered="#{!(managerbean.chosenAction  
eq 'lookupUsr')}"
									title="#{labels.usrMgt_submitActionHelp}" style="width:6cm;"/>	
									&#160; &#160; &#160;
				<h:commandButton 	action="#{managerbean.backToPortal}" value="# 
{labels.usrMgt_back2Portal}"
									title="#{labels.usrMgt_back2PortalHelp}" immediate="true"  
style="width:6cm;"/>		
		   		</td>
		   	</tr>	
    	</table>
    	   		
    	   		<br/>

    <h:messages id="errors" styleClass="error"/>
    	</h:form>
     <h:message for="usersForm" styleClass="error"/>
	 		
	
	<f:subview id="footer">
		<jsp:include page="./footer.jsp" />
	</f:subview>
		
	</f:view>
	</body>
</html>
	
</jsp:root>

____________

As you can see, the messages tag is just before the end of the form.  
What MyFaces outputs for all this is: (from the submit to the </form>)
___________

				<input id="usersForm:_idJsp40" name="usersForm:_idJsp40"  
type="submit" value="Back To Portal" onclick="clear_usersForm();"  
title="Clicking brings you back to the Portal Page" style="width: 
6cm;" /></td></tr></table><br/><input type="hidden"  
name="usersForm_SUBMIT" value="1" /><input type="hidden"  
name="usersForm:_link_hidden_" /><script type="text/javascript"><!--
function clear_usersForm() {
   var f = document.forms['usersForm'];
   f.elements['usersForm:_link_hidden_'].value='';
   f.target='';
}
clear_usersForm();
//--></script><input type="hidden" name="jsf_tree_64"  
id="jsf_tree_64"  
value="H4sIAAAAAAAAAK1VwW4TMRC1ora0tFABAq4IEEUIJelukiYqEoKillQpRW1BQjlE7 
q6bbPF6je1tw4Ubdz6AL0D9Ar6AG1d 
+gitnZpvsbuLaJAcu1u7ozbznZ8/47DealQJtRaJbxBx7PVIMPx5hj0j45TTwsAoiVjwQhOw 
rEXsqFmQHM9wl4n4e3IhCHjHC1Oa727++bv/ 
5WUAzbbTQ8XoB9QXE0Xa7BRSlAUVpSFEaoShNS7HeQssdL/ 
3boFhKha63jvEJLlHMuiXAB6wLsKUc1vQ/oE+o0EaXOgmzgpQb7ZGc3cNj4qn1Po/FUOr/ 
cGP9+9nKj2ufv3wrINTnCKEZmchAXKGVhLtfHNTOZBbfNF/ 
hENRvRE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0Yk9PUP/Sp5owuW03r0cwwHaV+oF9pgUjOuQYt8+5WoEPFARtoZpTPaVJG+Eh/ 
lo2KU4yetO6IcEDerWW0oxObR1bL9wbgmY9P3qpig5yYeHjsTftLY7cbxg/ 
HTqq7fbxpLlnn6bITPQklN77jMb13y3ttuI9oFXs7PbYnzp4XemOn126LNAtCqVLufu62bRB 
IJRyhn6mnSLYq0SVlvt9mUz98TIjgs0vlxcMG+iA+UrO6UP/CkGY75pOH/mpeN 
+7w52OXzhv4L5rKuE/tfMKN7t/+bsvU/k75nTzo7AAA=" /><input type="hidden"  
name="jsf_viewid" id="jsf_viewid" value="/resources/pages/ 
userManagement.jsp" /></form>
________
In the bean's submit method, I do: (cf earlier post)
...
FacesContext ctx = FacesContext.getCurrentInstance();
ctx.addMessage(null, new FacesMessage("Test Summary","Test" ));
...





Re: buguous

Posted by Wolf Benz <eu...@gmail.com>.
... and apparently a very old one too :-)
(link)
Perhaps a note on this page could be included some stuff doesn't work.
When I look at the source of the page rendered, my <h:messages  
id="errors" styleClass="error"> isn 't even rendered. (which explains  
these msgs are added to teh stack, yet not shown in the page)
But this is weird: in debug mode, the MyFaces output provides this:
" <html.HtmlMessages id="errors" forceIdIndex="true"  
errorClass="NULL" errorStyle="NULL" family="javax.faces.Messages"  
fatalClass="NULL" fatalStyle="NULL" globalOnly="false"  
infoClass="NULL" infoStyle="NULL" layout="list" rendered="true"  
rendererType="javax.faces.Messages" rendersChildren="false"  
showDetail="false" showSummary="true" style="NULL" styleClass="error"  
title="NULL" tooltip="false" transient="false" warnClass="NULL"  
warnStyle="NULL"/>"

Yet the "show source" does NOT include such element.

Wolf
_______________
For those interested, some code & source below.
_________________
(the page:)

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<jsp:root 	xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
			xmlns="http://www.w3.org/1999/xhtml" 	
			xmlns:f="http://java.sun.com/jsf/core"
     			xmlns:h="http://java.sun.com/jsf/html"
     			xmlns:t="http://myfaces.apache.org/tomahawk" >

<jsp:directive.page contentType="text/html;charset=utf-8"/>
<html>
	<head>
		<link href="../css/ss.css" rel="stylesheet" type="text/css"/>
	</head>

	<body topmargin="0" leftmargin="0" rightmargin="0" marginheight="0"  
marginwidth="0" class="body">

	<f:view>
	<f:loadBundle basename="x.y.z.labels" var="labels" />
	
	
	<f:subview id="header">
		<jsp:include page="./header.jsp" />
	</f:subview>
    	  	
    	<h:form id="usersForm">
    	
    	<br />
    	
    	<table align="center" cellpadding="1" width="90%"  
style="vertical-align:middle;background-image:url('../pics/ 
metal.jpg');padding:8px;border-style:outset;font-size:11pt;font- 
family:verdana;" >
    		<tr>  		
    			<td style="vertical-align:middle;" colspan="2"><h3><img  
src="../pics/groenBolleke.png" align="bottom" border="0" / 
 >&#160;<h:outputLabel value="#{labels.usrMgt_Title}" /></h3></td>
    		</tr>
    		<tr>
    			<td align="center" colspan="5" style="border-bottom-width: 
1px;border-bottom-style:solid;border-bottom-color:black;font-size: 
10px;font-style:italic;" >
    			<h:outputLabel value="#{labels.usrMgt_SubTitle}" />
    			</td>
    		</tr>
    	  	<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    		
    		<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    		   		
    		<tr align="center"> 			<!--  For the simple fields in the first  
table: -->
    			<td width="5%">&#160; </td> 		
    			<td colspan="3" style="border-style:solid; border-width: 
1px;border-color: SlateGrey" align="center">
    				<h:panelGrid 	bgcolor="SlateGrey" columns="2"  
id="userTabelSimple" cellpadding="2" cellspacing="0" width="100%"  
align="center"
    								columnClasses="labelKolom,inhoudKolom"  
rowClasses="rij1,rij2" >
    					<h:outputLabel value="#{labels.usrMgt_firstn}"/>
    					<h:inputText value="#{managerbean.currentUser.firstName}"  
id="voornaam" readonly="#{!managerbean.editableFieldMode}"  
accesskey="f"/>
    					
					<h:outputLabel value="#{labels.usrMgt_lastn}"/>
     					<h:inputText value="#{managerbean.currentUser.lastName}"  
id="achternaam" readonly="#{!managerbean.editableFieldMode}"  
accesskey="n"/>
		
  					<h:outputLabel value="#{labels.usrMgt_loginn}"/>
    					<h:inputText value="#{managerbean.currentUser.loginName}"  
id="login" readonly="#{!managerbean.editableFieldMode}" accesskey="l"/>
  					
  					<h:outputLabel value="#{labels.usrMgt_passw}"/>
    					<h:inputText value="#{managerbean.currentUser.password}"  
id="paswoord" readonly="#{!managerbean.editableFieldMode}"  
accesskey="p" />
  					
  					<h:outputLabel value="#{labels.usrMgt_bday}"/>
     					<h:inputText value="#{managerbean.currentUser.birthday}"  
readonly="#{!managerbean.editableFieldMode}" accesskey="b" >
     						<f:convertDateTime dateStyle="short" pattern="dd/MM/yyyy"  
type="date"/>
     					</h:inputText>
     					
     					<h:outputLabel value="#{labels.usrMgt_mail}"/>
     					<h:inputText value="#{managerbean.currentUser.email}"  
id="mail" readonly="#{!managerbean.editableFieldMode}" accesskey="e"/>
  					
  					<h:outputLabel value="#{labels.usrMgt_tel}"/>
    					<h:inputText value="#{managerbean.currentUser.tel}"  
readonly="#{!managerbean.editableFieldMode}" accesskey="t"/>
  								
    				</h:panelGrid>
    				<h:message for="userTabelSimple" styleClass="error"/>  	
    			
    			</td>
    			<td width="5%">&#160; </td>
    		</tr>
    		<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    		<tr align="center">  				<!--  For the complex fields in the  
Menus:  -->
    			<td width="5%">&#160; </td> 		
    			<td colspan="3" style="border-style:outset; border-width: 
1px;border-color: SlateGrey"  align="center">
    				<h:panelGrid bgcolor="SlateGrey" columns="7" cellpadding="2"  
cellspacing="0" width="100%" align="center" rowClasses="rij1,rij2"  
id="menukes">
    				
							<!-- For a User's Roles:  -->
    					<h:outputLabel value="#{labels.usrMgt_rolls}"  
styleClass="labelKolom2"/>
    					<h:selectOneMenu id="roleList" 	title="# 
{labels.usrMgt_roleListTitle}" value="#{managerbean.oldRollKey}"   
style="width:5cm;" readonly="#{!managerbean.editableFieldMode}"  
disabled="#{!managerbean.editableFieldMode}">
    						<f:selectItem itemLabel="#{labels.usrMgt_usrRolls}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.userRolls}" />
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.removeRoll}" value="-"
									title="#{labels.usrMgt_removeRollTitle}" style="width:1cm;" />
					<h:outputLabel id="spacer" value="&#160;" style="width:2 cm;"/>
					<h:outputLabel value="#{labels.usrMgt_allRolls}" style="width:4  
cm;" styleClass="labelKolom2"/>
					<h:selectOneMenu id="allRoleList" 	title="# 
{labels.usrMgt_allRolls}" value="#{managerbean.chosenRollKey}"  
style="width:5cm;">
    						<f:selectItem itemLabel="#{labels.usrMgt_allRolls}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.allRolls}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.addRoll}" value="+"  
style="width:1cm;"
									title="#{labels.usrMgt_addRollTitle}"  />				
    					
    					
    								<!-- For a User's Inherited Rolls:  -->
    					<h:outputLabel value="#{labels.usrMgt_inhRolls}"  
styleClass="labelKolom2"/>
    					<h:selectOneMenu id="roleList2" 	title="# 
{labels.usrMgt_InhRoleListTitle}" value="# 
{managerbean.oldInhRollKey}" style="width:5cm;" readonly="#{! 
managerbean.editableFieldMode}" disabled="#{! 
managerbean.editableFieldMode}" >
    						<f:selectItem itemLabel="#{labels.usrMgt_usrInhRolls}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.userInhRolls}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.removeInhRoll}"  
value="-"
									title="#{labels.usrMgt_removeInhRollTitle}" style="width: 
1cm;" />
					<h:outputLabel id="spacer2" value="&#160;" style="width:2 cm;"/>
					<h:outputLabel value="#{labels.usrMgt_allRolls}" style="width:4  
cm;" styleClass="labelKolom2"/>
					<h:selectOneMenu id="allRoleList2" 	title="# 
{labels.usrMgt_allRolls}" value="#{managerbean.chosenInhRollKey}"  
style="width:5cm;">
    						<f:selectItem itemLabel="#{labels.usrMgt_allRolls}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.allRolls}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.addInhRoll}"  
value="+" style="width:1cm;"
									title="#{labels.usrMgt_addInhRoll}"  />
										
    								<!-- For a User's Departments:  -->
    					<h:outputLabel value="#{labels.usrMgt_depts}"  
styleClass="labelKolom2"/>
    					<h:selectOneMenu id="roleList3" 	title="# 
{labels.usrMgt_deptsTitle}" value="#{managerbean.oldDeptKey}"  
style="width:5cm;" readonly="#{!managerbean.editableFieldMode}"  
disabled="#{!managerbean.editableFieldMode}" >
    						<f:selectItem itemLabel="#{labels.usrMgt_usrDepts}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.userDepts}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.removeDept}" value="-"
									title="#{labels.usrMgt_removeDeptTitle}" style="width:1cm;" />
					<h:outputLabel id="spacer3" value="&#160;" style="width:2 cm;"/>
					<h:outputLabel value="#{labels.usrMgt_allDepts}" style="width:4  
cm;" styleClass="labelKolom2"/>
					<h:selectOneMenu id="allRoleList3" 	title="# 
{labels.usrMgt_allDepts}" value="#{managerbean.chosenDeptKey}"  
style="width:5cm;">
    						<f:selectItem itemLabel="#{labels.usrMgt_allDepts}"  
itemValue="choose_one"/>
    						<f:selectItems value="#{managerbean.allDepartments}"/>
    					</h:selectOneMenu>
    					<h:commandButton action="#{managerbean.addDept}" value="+"  
style="width:1cm;"
									title="#{labels.usrMgt_addDeptTitle}"  />		
    							
    				</h:panelGrid>
    				<h:message for="menukes" styleClass="error"/>  		
    			</td>
    			<td width="5%">&#160; </td>
    		</tr>
    		<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    		<tr>  		
    			<td colspan="5"> &#160; </td>
    		</tr>
    	
    		
    		<tr style="padding:8px;border-top-style:solid;border-top-width: 
1px;">
    			<td width="5%">&#160; </td>  		
    			<td align="center" colspan="3">
    				
				<h:commandButton 	action="#{managerbean.cancelAction}" value="# 
{labels.usrMgt_cancel}"
									title="#{labels.usrMgt_cancelHelp}" immediate="true"   
style="width:4cm;"/>	
				 &#160;&#160;&#160;
			
				<h:commandButton 	action="#{managerbean.editUser}" value="# 
{labels.usrMgt_edit}" disabled="#{managerbean.userEditDisabled}"
									title="#{labels.usrMgt_editUserHelp}" immediate="true"  
style="width:4cm;"/>	
				 &#160;&#160;&#160;					
    			</td>
    			<td width="5%">&#160; </td>  		
    		</tr>
    		
    		
    	</table>

    	<br/>
    	
    	<br/><br/>

	<table id="submitTable" align="center" width="90%" style="padding: 
8px;border-top-style:solid;border-top-width:1px;font-family:verdana;">	
    	   		<tr>
    	   			<td align="center">
				<h:commandButton 	action="#{managerbean.submitAction}" value="# 
{managerbean.submitActionBT}" rendered="#{!(managerbean.chosenAction  
eq 'lookupUsr')}"
									title="#{labels.usrMgt_submitActionHelp}" style="width:6cm;"/>	
									&#160; &#160; &#160;
				<h:commandButton 	action="#{managerbean.backToPortal}" value="# 
{labels.usrMgt_back2Portal}"
									title="#{labels.usrMgt_back2PortalHelp}" immediate="true"  
style="width:6cm;"/>		
		   		</td>
		   	</tr>	
    	</table>
    	   		
    	   		<br/>

    <h:messages id="errors" styleClass="error"/>
    	</h:form>
     <h:message for="usersForm" styleClass="error"/>
	 		
	
	<f:subview id="footer">
		<jsp:include page="./footer.jsp" />
	</f:subview>
		
	</f:view>
	</body>
</html>
	
</jsp:root>

____________

As you can see, the messages tag is just before the end of the form.  
What MyFaces outputs for all this is: (from the submit to the </form>)
___________

				<input id="usersForm:_idJsp40" name="usersForm:_idJsp40"  
type="submit" value="Back To Portal" onclick="clear_usersForm();"  
title="Clicking brings you back to the Portal Page" style="width: 
6cm;" /></td></tr></table><br/><input type="hidden"  
name="usersForm_SUBMIT" value="1" /><input type="hidden"  
name="usersForm:_link_hidden_" /><script type="text/javascript"><!--
function clear_usersForm() {
   var f = document.forms['usersForm'];
   f.elements['usersForm:_link_hidden_'].value='';
   f.target='';
}
clear_us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5nq4e/ 
n6e8LyRfv8RmyVOilWqfjvVTqq1OGI2MkRGpE6HQpFTgFp+k6S0nRCLAcJv/ 
YIZcdkbJDHEjod7BA6iR5DXWjD9BTXhouJ5cHygEKMuCnEKIbi/ 
zViSp9IWFiik115ly5d6016ImG9iUxy8YnFUqExoQpN9/ 
rNYndJLTrvzoFSZIaKNnssUdIxYZTUVeyYaJR0XCiL0wm/ 
NIhKSeVFyvgggeBponPw1ItAet5EdXhR0Dl4Si+FMYpMRTnC 
+QQErpKwwDEz4ynZm4kr2VgoFQWISiah/ 
xWyBTl7RixnCefooxJSm2tZOCHlFbJNY6pYL66ZkqV2df+e+pRvyGGhdorQRx3Q7/ 
VToc0CkJqk1bC6gFUjYtsT+orRri30UiAbYde+UiOKrm109/JuptNrESF+J8T4xQ 
+DeQTYF0Yk9PUP/Sp5owuW03r0cwwHaV+oF9pgUjOuQYt8+5WoEPFARtoZpTPaVJG+Eh/ 
lo2KU4yetO6IcEDerWW0oxObR1bL9wbgmY9P3qpig5yYeHjsTftLY7cbxg/ 
HTqq7fbxpLlnn6bITPQklN77jMb13y3ttuI9oFXs7PbYnzp4XemOn126LNAtCqVLufu62bRB 
IJRyhn6mnSLYq0SVlvt9mUz98TIjgs0vlxcMG+iA+UrO6UP/CkGY75pOH/mpeN 
+7w52OXzhv4L5rKuE/tfMKN7t/+bsvU/k75nTzo7AAA=" /><input type="hidden"  
name="jsf_viewid" id="jsf_viewid" value="/resources/pages/ 
userManagement.jsp" /></form>
________
In the bean's submit method, I do: (cf earlier post)
...
FacesContext ctx = FacesContext.getCurrentInstance();
ctx.addMessage(null, new FacesMessage("Test Summary","Test" ));
...




buguous

Posted by Wolf Benz <eu...@gmail.com>.
I think it's a bug. Tried anything within reason.
Wolf


Re: stupid question

Posted by Wolf Benz <eu...@gmail.com>.
you can put your logging level at debug to get alot more information  
on what
is
going wrong.
-- This is interesting:
"2006-07-26 10:48:02,296 DEBUG  
[org.apache.myfaces.shared_impl.util.MessageUtils] - adding message  
Global Security Test for clientId null"

I think it means the message is indeed added (and as it deals about  
h:messageS, the clientId is indeed null, it's  global message)
Yet, even though there is a message added to the stack, the code just  
follows the navigation as if nothing went wrong. (when a message is  
added, the JSF automatically keeps the user at the same page right -  
starting to doubt even this!)

A little further:
"006-07-26 10:48:05,074 DEBUG  
[org.apache.myfaces.application.NavigationHandlerImpl] -  
handleNavigation fromAction=#{managerbean.submitAction}  
outcome=usrMgmt toViewId =userManagementChoice.jsp redirect=false"
-- This is the outcome as if all went fine (although a message is  
added in the same method, a little sooner)

Wolf




RE: stupid question

Posted by L Frohman <lf...@gmail.com>.
Hi Wolf,

try:
ctx.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Test
Summary","Test" ));

<h:messages ... should go inside the form.
you could put showSummary="true" in the <h:messages ... (if this isn't the
default)

you can put your logging level at debug to get alot more information on what
is
going wrong. 


-----Message d'origine-----
De : Wolf Benz [mailto:eurojava@gmail.com] 
Envoyé : mardi 25 juillet 2006 20:07
À : MyFaces Discussion
Objet : stupid <h:messages> question

Hi List,

I'm afraid I have a beginner's question, but either smth's terribly wrong or
I have overlooked smth trivial.
I'm just trying to display a global message, yet they won't show!

What I tried, is:

in the bean, I've tried both the "Std" way and the Apache-way (with
MessageUtils):

FacesContext ctx = FacesContext.getCurrentInstance();
ctx.addMessage(null, new FacesMessage("Test Summary","Test" ));

& MessageUtils.addMessage(FacesMessage.SEVERITY_ERROR,"secMsg_test" , null);

<--> In the page, I'v tried with both "Std" h: & Apache t: ... both without
effect:

<t:messages errorStyle="error"/>
</h:form>
<h:messages errorClass="error" />

btw as you can see, I've also tried to put them before & after the
h:form-tag. Does that really matter?

As I understood, from the moment you add a message, the same page is
redisplayed with the message.(/s) This works fine for all <h:message
for="ID-of-a-component"  />, but I never got this h:messages to work!!

Any ideas? (don't mind manners, I'm obviously missing smth basic here :-)

Wolf