rosaria italia

Greenhorn
+ Follow
since May 15, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by rosaria italia

Thanks Rajeev!

Now I have other problems, as soon possible I'll send an other reply for to explain mistakes...
18 years ago
JSF
Hello, my problem is custom converter:
my faces-config:
<converter>
<description> Prova Converter </description>
<converter-id>TelephoneNumber</converter-id>
<converter-class>
it.istream.jsf.PhoneNumberConverter
</converter-class>
</converter>

my class
public class PhoneNumberConverter {
public Object getAsObject(FacesContext ctx, UIComponent component, String value){....}
public String getAsString(FacesContext ctx, UIComponent component, Object value) {...}
my jsp<h utputText value="TEL" styleClass="tabHeaderBlack"></h utputText>
<h:inputText id="tel" required="true" >
<f:converter converterId="TelephoneNumber" />
</h:inputText>

WHY I have this error?


javax.servlet.ServletException: javax.servlet.jsp.JspException: null
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:842)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.editUser_jsp._jspService(editUser_jsp.java:330)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)


root cause

java.lang.ClassCastException
com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:452)
javax.faces.webapp.ConverterTag.createConverter(ConverterTag.java:166)
javax.faces.webapp.ConverterTag.doStartTag(ConverterTag.java:110)
org.apache.jsp.editUser_jsp._jspx_meth_f_converter_0(editUser_jsp.java:896)
org.apache.jsp.editUser_jsp._jspx_meth_h_inputText_4(editUser_jsp.java:876)
org.apache.jsp.editUser_jsp._jspService(editUser_jsp.java:261)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
18 years ago
JSF
Thanks 1000!

Now I'm sure that for my version it is impossible!
Bye.

P.S.
Could You have a look at my other topic(convertDateTime) for a little help?
18 years ago
JSF
Hi, my question is for h:commandLink ... as you can see in the title of topic and not for h:commandButton that you have indicated with link that you posted me...

This is my version:
Specification Version: 1.1_01 Final Release
Reference Implementation (RI) Version: 1.1_01 FCS

Thanks.
18 years ago
JSF
I use JSF 1.1.
18 years ago
JSF
Hello I have this code:
<h:inputText id="data" value="#{uBean.data1}">
<f:convertDateTime pattern="dd-MM-yyyy" dateStyle="full"/>
</h:inputText>
Why if I write in "input text" one day wrong or one month wrong, validation generates a format error and if I write one year wrong, validation doesn't shows validation error?

If I write 12-13-1989 shows format error.
If I write 12-12-198 doesn't shows format error.

How do I do to generate error also for year?

Thanks
18 years ago
JSF
Thanks, I have tried 2-3 day ago, but error is:

"org.apache.jasper.JasperException: /listUsers.jsp(74,6) Attribute onclick invalid for tag commandLink according to TLD
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
...."
18 years ago
JSF
In effect, 'onclick' is implicit in of h:commandLink ! But if I use an other attribute, as onmousedown, doesn't come execute nothing, not even the action. I don't know!
18 years ago
JSF
Hello,"<f:convertDateTime", is possible to use it only with data value or also of string.
I have tried so, but date remain as is, without nobody formatting.
...
<h:inputText id="data" value="#{user.data}">
<f:convertDateTime dateStyle="full" pattern="yyyy-MM-dd"/>
</h:inputText>...
#{user.data} return a string.

Do you know use it?
18 years ago
JSF
I have resolved... Problem was that I use a ActionEvent...
18 years ago
JSF
"onclick" doesn't supported! I have tried "onmousedown", but also window confirm is shows, but if the answer is positive or negative remain of same page
18 years ago
JSF
Sorry, but I have still this problem. In my page jsp, I use this code:
<h:commandLink id="Prova"
action="#{utenteBean.deleteUtente}" >
<h utputText value="Prova" />
<f aram id="provaId"
name="id"
value="#{utente.id}" />
</h:commandLink>
In my page java e faces-config.xml code is that one I have written in previous replies.

This is error :
javax.servlet.ServletException: #{utenteBean.deleteUtente}: javax.faces.el.MethodNotFoundException: deleteUtente: it.istream.jsf.Utente.deleteUtente()
javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)....

Could you help me, please?
18 years ago
JSF
I have already used this method, but there is a error: "onclick is invalid for tag commandLink"... Why?
18 years ago
JSF
I don't understand! Do you repeat, please?
18 years ago
JSF
Hello, I have tried, but "case" into my faces-config.xml doesn't execute it! Help me. This is my code:
faces-config.xml:
<navigation-rule> <from-view-id>*</from-view-id>
<navigation-case><from-outcome>failure</from-outcome>
<to-view-id>/error.jsp</to-view-id></navigation-case></navigation-rule>
<navigation-rule> <from-view-id>*</from-view-id>
<navigation-case><from-outcome>success</from-outcome>
<to-view-id>/success.jsp</to-view-id></navigation-case></navigation-rule>

User.java
...
public String deleteUser(ActionEvent event) {
...
String s=ut.deleteUtenteToDB(id,session);
System.out.println("s= "+s);
return s;}

UserD.java
...
public String deleteUtenteToDB(String id, Map session) {
...
if( exc != 0 ){
return redirect = "success";
}else{
return redirect = "failure";
}
....

When I print variable "s", it is correct value (failure or success), but don't show page success.jsp or error.jsp.

Thanks
18 years ago
JSF