Hi,
Thanks for the answer. At my system "t" represents the tagllib
"http://myfaces.apache.org/tomahawk" , which has no :form tag. The form
tag is now form http://java.sun.com/jsf/html namespace (I use Apache
Myfaces Core 1.2, not the sun's JSF core), should I use different JSF
Core taglib, the suns original or other? In the following source it
looks, there is likely nothing defiend other than the "welcome" action,
but it is a simple navigation rule to be prossed after actionListener..
Best regards,
Pal
<form id="topMenu:j_id_jsp_493166248_1"
name="topMenu:j_id_jsp_493166248_1" method="post"
action="/MailFilter01/register.jsf"
enctype="application/x-www-form-urlencoded">
<script type="text/javascript">
<!--
var topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu =
[[null, 'Rendszer', null, 'topMenu:j_id_jsp_493166248_1',
null,[null, 'Bejelentkezés',
'topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu:A]login',
'topMenu:j_id_jsp_493166248_1', null]],
[null, 'Regisztráció',
'topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu:A]register',
'topMenu:j_id_jsp_493166248_1', null],
[null, 'Információ', null, 'topMenu:j_id_jsp_493166248_1',
null,[null, 'Erről a rendszerről',
'topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu:A]aboutthis',
'topMenu:j_id_jsp_493166248_1', null],
[null, 'The prod',
'topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu:A]http://theprodpage.hu',
'topMenu:j_id_jsp_493166248_1', null]],
[null, 'Language', null, 'topMenu:j_id_jsp_493166248_1', null,[null,
'English',
'topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu:A]welcome',
'topMenu:j_id_jsp_493166248_1', null],
[null, 'Magyar',
'topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu:A]welcome',
'topMenu:j_id_jsp_493166248_1', null]]];
//-->
</script>
<div id="topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu"></div>
<script type="text/javascript">
<!--
if(window.cmDraw!=undefined) { cmDraw
('topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu',
topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu, 'hbr',
cmThemeOffice, 'ThemeOffice');}
//-->
</script>
<input type="hidden" name="jscook_action" />
<script type="text/javascript">
<!--
function clearFormHiddenParams_topMenu_j_id_jsp_493166248_1() {
var f = document.forms['topMenu:j_id_jsp_493166248_1'];
var elem0 = f.elements['jscook_action'];
if(typeof elem0 !='undefined' && elem0.nodeName=='INPUT'){
if (elem0.value != '') {
elem0.value='';
}
}
f.target='';
}
clearFormHiddenParams_topMenu_j_id_jsp_493166248_1();
//-->
</script><input type="hidden" name="topMenu:j_id_jsp_493166248_1_SUBMIT"
value="1" />
<input type="hidden" name="autoScroll" />
<input type="hidden" name="javax.faces.ViewState"
id="javax.faces.ViewState" value="****** DELETED FROM THE EMAIL *****" />
</form>
2009.09.23. 9:18 keltezéssel, Ioannis Deligiannis írta:
> Hi,
>
> I had a similar problem. Though I can see that you have a <form> declared it
> might help:
> -Check the html source to see if the <href> contains a valid link instead of
> just '#'.
> -Try surrounding the code with <t:form> instead of <f:form>
>
> I hope this helps.
>
> Ioannis Deligiannis| Senior Application Engineer
>
>
>
>
> Velti is a global leader in mobile marketing and advertising solutions for
> mobile operators, ad agencies, brands, and media groups.
>
> London | New York | San Francisco | Boston | Athens | Sofia | Nicosia | Paris
> | Munich | Moscow | Mumbai | Dubai | Beijing
>
>
> -----Original Message-----
> From: Fulajtár Pál [mailto:[email protected]]
> Sent: Wednesday, September 23, 2009 9:18 AM
> To: [email protected]
> Subject: navigationMenuItem + actionListener problem
>
> Hi,
>
> I am using MyFaces-core-1.2.7 + Tomahawk12-1.1.9 on Apache Tomcat
> 6.0.18 . I wanted to use JSCookMenu. Everything looks fine, it is
> navigating properly according to faces-config.xml settings. But!
> actionListener does not work at all, the action listener is not called,
> and I get no exceptions. The Bean is properly registered as well and has
> session scope. When I used a separated jsp page to set language and I
> used a command button to call the changeLocale method as action, it was
> working and still works properly. Only the changeListener method never
> called....
>
> Could you help me please what I am failing?
>
> Kind regards:
>
> Pal
>
>
> Sources:
> relevant part of the JSP:
>
> -------------------------------------------------------------------------------------------------------
> <c:subview id="topMenu">
> <f:form>
> <t:jscookMenu layout="hbr" theme="ThemeOffice"
> styleLocation="css/jscookmenu">
> <t:navigationMenuItem id="mnuSystem"
> itemLabel="#{msgs.mnu_system}">
> <t:navigationMenuItem id="mnuLogin"
> itemLabel="#{msgs.mnu_system_login}" action="login"
> rendered="#{loginBean.loggedIn ? 'false' : 'true'}" />
> <t:navigationMenuItem id="mnuLogoff"
> itemLabel="#{msgs.mnu_system_logoff}" action="logoff"
> rendered="#{loginBean.loggedIn ? 'true' : 'false'}" />
> </t:navigationMenuItem>
>
> <t:navigationMenuItem id="mnuSetup"
> itemLabel="#{msgs.mnu_setup}" rendered="#{loginBean.loggedIn ? 'true' :
> 'false'}">
> <t:navigationMenuItem id="mnuSetupData"
> itemLabel="#{msgs.mnu_setup_chdata}" action="register" />
> <t:navigationMenuItem id="mnuChpass"
> itemLabel="#{msgs.mnu_setup_chpass}" action="chpass" />
> </t:navigationMenuItem>
> <t:navigationMenuItem id="mnuRegister"
> itemLabel="#{msgs.mnu_register}" action="register"
> rendered="#{loginBean.loggedIn ? 'false' : 'true'}" />
>
> <t:navigationMenuItem id="mnuInfo" itemLabel="#{msgs.mnu_info}">
> <t:navigationMenuItem id="mnuInfoThis"
> itemLabel="#{msgs.mnu_info_aboutthis}" action="aboutthis" />
> <t:navigationMenuItem id="mnuInfoTP"
> itemLabel="#{msgs.mnu_info_abouttp}" action="showhome" />
> </t:navigationMenuItem>
>
> <t:navigationMenuItem id="mnuLang" itemLabel="#{msgs.mnu_lang}">
> <t:navigationMenuItem id="mnuLangEN" itemValue="en"
> actionListener="#{localeBean.changeListener}"
> itemLabel="#{msgs.mnu_lang_en}" action="welcome" /> <-- **** ACTION
> LISTENER LINE **** -->
> <t:navigationMenuItem id="mnuLangHU" itemValue="hu"
> actionListener="#{localeBean.changeListener}"
> itemLabel="#{msgs.mnu_lang_hu}" action="welcome" /> <-- **** ACTION
> LISTENER LINE **** -->
> </t:navigationMenuItem>
>
> </t:jscookMenu>
> </f:form>
> </c:subview>
> ------------------------------------------------------------------------------------------------------------
> The java method should be called:
> ------------------------------------------------------------------------------------------------------------
> package mypackage;
> import java.util.Locale;
> import javax.faces.event.ActionEvent;
> import org.apache.myfaces.custom.navmenu.jscookmenu.HtmlCommandJSCookMenu;
>
>
> /**
> *
> * @author FulajtarP
> */
> public class LocaleBean {
>
> private String locale = Locale.getDefault().getLanguage();
>
> public void setLocale(String locale) {
> this.locale = locale;
> }
>
> public String getLocale() {
> return this.locale;
> }
>
> public String changeLocale() {
> return "langchanged";
> }
>
> public void changeListener(javax.faces.event.ActionEvent event)
> {
> String inData = (String)((HtmlCommandJSCookMenu)
> event.getComponent()).getValue();
> this.locale = inData;
> }
>
> }
>
>
>
>
>
A(z) kimenő üzenetben nem található vírus.
Ellenőrizte: AVG - www.avg.com
Verzió: 9.0.656 / Vírus adatbázis: 271.1.1/2389 - Kiadás dátuma: 09/22/09
19:54:00