Thanks for the attempt answering the question anyway. It looks
validation message of validateRegExpr not works neither. regardless the
message attribute is set and not empty! The validateRegExpr always
displays its own builtin message... rest of the validations looks fine
still...

<%...@taglib prefix="c" uri="http://java.sun.com/jsf/core"%> <!-- the core
JSF is Apache MyFaces Core 1.2 -->
<%...@taglib prefix="f" uri="http://java.sun.com/jsf/html"%>
<%...@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<%@ taglib prefix="cp" uri="http://java.sun.com/jsp/jstl/core"; %>

<c:view locale="#{localeBean.locale}">
<f:form>
 <t:inputText id="ownEmail"
value="#{domainsBean.DBTType_domains.ownEmail}"  required="true"  >
     <c:validateLength minimum="5" maximum="64" />
     <t:validateRegExpr
pattern='([a-za-z0-9\.\-\_...@[a-za-z0-9\-\.]+\.[a-za-z]{2,4})'
message="#{msgs.regpage_invalid_email}" />
 </t:inputText>
</f:form>
</c:view>


2009.09.23. 11:28 keltezéssel, Ioannis Deligiannis írta:
>
> I am quite new to this, so I can’t help you further. My experience was
> with trinidad libs and it did not render the action outside of the
> <tr:form>. It might be different in your case.
>
>  
>
> *Ioannis Deligiannis*| Senior Application Engineer
>
>  
>
> *Velti*
>
> Mob: +30.6948.593.623 | Tel: +30.210.637.8800 (ext: 6730) | Fax:
> +30.210.637.8888
> Email: [email protected] <mailto:[email protected]> | Web:
> www.velti.com <http://www.velti.com/>
>
> 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
>
> ------------------------------------------------------------------------
>
> *From:* Fulajtár Pál [mailto:[email protected]]
> *Sent:* Wednesday, September 23, 2009 12:21 PM
> *To:* MyFaces Discussion
> *Subject:* Re: navigationMenuItem + actionListener problem
>
>  
>
> Hi,
>
>   Thanks for the answer. At my system "t" represents the tagllib
> "http://myfaces.apache.org/tomahawk";
> <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&#233;s',
> 'topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu:A]login',
> 'topMenu:j_id_jsp_493166248_1', null]],
>     [null, 'Regisztr&#225;ci&#243;',
> 'topMenu_j_id_jsp_493166248_1_j_id_jsp_493166248_2_menu:A]register',
> 'topMenu:j_id_jsp_493166248_1', null],
>     [null, 'Inform&#225;ci&#243;', null,
> 'topMenu:j_id_jsp_493166248_1', null,[null, 'Err&#337;l a
> rendszerr&#337;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] <mailto:[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/2390 - Kiadás dátuma: 09/23/09 
07:52:00

Reply via email to