Search Results

Search found 3678 results on 148 pages for 'jsf jsp el'.

Page 13/148 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Rich Tooltip for SelectItem, error when including EL in "for" attribute

    - by pakore
    How to attach a rich:tooltip to the list generated by f:selectItems when using a variable for the attribute for inside the rich:tooltip. This code works fine (the value of #{prefix} is theprefixvalue <ui:composition> <a4j:form id="#{prefix}_form"> <h:selectOneRadio style="text-align:left" id="#{prefix}_rating"> <f:selectItems value="#{test.options}"></f:selectItems> </h:selectOneRadio>&nbsp; <rich:toolTip for="theprefixvalue_form\:theprefixvalue_rating\:0">a</rich:toolTip> </a4j:form> </ui:composition> But this code does not: <ui:composition> <h:outputText value="#{prefix}" /> <a4j:form id="#{prefix}_form"> <h:selectOneRadio style="text-align:left" id="#{prefix}_rating"> <f:selectItems value="#{test.options}"></f:selectItems> </h:selectOneRadio>&nbsp; <rich:toolTip for="#{prefix}_form\:#{prefix}_rating\:0">a</rich:toolTip> </a4j:form> </ui:composition> Throws the following exception: Caused by: java.lang.IllegalArgumentException: theprefixvalue_rating at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:612) at org.ajax4jsf.renderkit.RendererUtils.findComponentFor(RendererUtils.java:1037) at org.richfaces.renderkit.html.ToolTipRenderer.getTargetId(ToolTipRenderer.java:234) at org.richfaces.renderkit.html.ToolTipRenderer.constructJSVariable(ToolTipRenderer.java:251) ... TestBean is session scoped and this is the code for getOptions(); public List<SelectItem> getOptions(){ List<SelectItem> options = new ArrayList<SelectItem>(); options.add(new SelectItem("a","a")); options.add(new SelectItem("b","b")); options.add(new SelectItem("c","c")); return options; } Any ideas? The goal is to have a tooltip when the mouse is over the different options. Thanks in advance.

    Read the article

  • JAXB boolean handling oddities and JSF

    - by finrod
    There is a known bug in JAXB: https://jaxb.dev.java.net/issues/show_bug.cgi?id=733 JAXB does not properly generate boolean field getters and setters, this bug is left unfixed for backwards compatibility. A JAXB plugin exists and will ensure that the following getters and setters for boolean fields are generated: setXXX(Boolean value) is generated getXXX() is generated If the boolean attribute specifies default value in the XSD, then getXXX() returns boolean, If the boolean attribute does not specify default in the XSD, then getXXX() returns Boolean. Problem: trying to edit/view the XXX field in a JSF component (such as checkbox) does not work - the component is disabled. I have not traced this in depth but the assumption (backed by the workaround below) is that JSF EL resolver (or whathaveyou) looks for Boolean getXXX() method and since it does not find it, the component is disabled. Workaround: If I change the getXXX() method to always return Boolean, then everything goes. Questions: What are your ideas to address this problem? Have I missed some customization for the boolean-getter JAXB plugin? Is it possible (does it make sense) to alter JSF resolver (or whathaveyou) so that if Boolean getXXX() is not found, it will fall back to boolean getXXX()? I would prefer not to manually intervene and change all the generated getXXX() methods to return Boolean instead of boolean.

    Read the article

  • Struts2: Reading from database and populating JSP with results

    - by teehoo
    For a school project I am creating a simple search engine (using Struts2), where I read from a database, and redirect the user to a new page that shows the results. my struts.xml file is as follows: <action name="searchRooms" class="cz.vutbr.fit.Search" method="execute"> <result name="success">/pages/showSearchResults.jsp</result> <result name="input">/pages/search.jsp</result> </action> I have no idea what to search on Google to achieve this. I'm looking for a simple answer or some keywords to use for searching on Google.

    Read the article

  • Java JSTL / EL: nesting

    - by NoozNooz42
    I really don't know how to name this question, it's great if anyone with 2K+ rep can edit this title to better reflect my question (the fact that I can't name this easily is probably why I can't Google the solution). I've got this, which is working: <c:choose> <c:when test="${sometest}"> Hello, world! </c:when> <c:otherwise> <fmt:message key="${page.title}" /> </c:otherwise> </c:choose> And I want to change it to this: <c:choose> <c:when test="${sometest}"> <c:set var="somevar" scope="page" value="Hello, world!"/> </c:when> <c:otherwise> <c:set var="somevar" scope="page" value="<fmt:message key="${page.title}">" </c:otherwise> </c:choose But of course the following line ain't correct: <c:set var="somevar" scope="page" value="<fmt:message key="${page.title}">" How can I assign to the somevar variable the string resulting from a call?

    Read the article

  • Include static file in JSP with variable filename on WebSphere 6

    - by cringe
    I'm struggling with including a static file into my JSPs on Websphere 6.0.2.17. I tried this: <% final String MY_DIR = ResourceBundle.getBundle("mybundle").getString("props.pages.wcm"); %> <% final String page = ResourceBundle.getBundle("mybundle").getString("page"); %> <% final String inc = MY_DIR + "/" + bonus; %> <%@include file="<%= inc %>"%> The path is /wcm/some/other/dir/page and I can happily print that out with out.write(inc). Unfortunatly the include (and the jsp:include) isn't including the file at all. There is no error message, but the content isn't included... The file is accessible via the browser though. Do I have to create a full JSP for this to work? I just need a HTML file.

    Read the article

  • chat website in jsp/servlet

    - by akshay
    I want to devlelop a chat website using JSP/Servlets and Tomcat. I have following questions: Can the website handle load (1000 people at one time) without slowing down? Will it cause the website to slow down? What is the ideal server configuration for this kind of website? Note that I don't have a huge budget to host. How can I implement server push? Will PHP or JSP be ideal for such website?

    Read the article

  • UTF GET parameter codification problem in JSP (JBoss 2.0.1)

    - by GreyMen
    I´m trying to take a string from a GET or POST parameter in JSP with some accents in UTF-8: <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" % <% request.setCharacterEncoding("UTF-8"); String value = request.getParameter("q"); out.print(value+" | aáa"); % The codification of the hardcoded string is correct but the codification of the value obtrained from the parameter (example: http://whatever/utf.jsp?q=a%E9a) it´s wrong... I have already modify the the server.xml dropping the URIEnconding UTF-8... So I don´t now what I have to do to show the data in the correct format... Any idea?

    Read the article

  • Serializing response from JSP and converting them to C# objects

    - by SARAVAN
    I have a silverlight web application. From this app I am making a call to .jsp pages using WebClient class. Now jsp returns a response in the following format { "results":[{"Value":"1","Name":"Advertising"}, {"Value":"2","Name":"Automotive Expenses"},{"Value":"3","Name":"Business Miscellaneous"}] } The above response is assigned to my Stream object. I have a c# class CategoryType public class CategoryType { public string Value{get;set;} public string Name{get;set;} } My aim is to convert the reponses in to Collection<CategoryType> and use it in my C# Code As of now I am trying to use DataContractJSONSerialiser. But not sure if there is an easy and efficent way to do this. Any help would be appreciated

    Read the article

  • JSP taglib with tags-appender

    - by tabdulin
    Using tiles, spring web mvc and a lot of jsp files. I need some tags with following logic: <tl:append tag="script"> ... javascript code ... </tl:append> This jsp tag would append javascript code to bottom of in the . Just wanna have javascript in one place. Also, I wanna use such taglib for css styles and so on. Are there any appropriate taglibs with such logic?

    Read the article

  • JSP package problems

    - by Taylor
    Hi, I had all my servlets and classes in the default package. I have created these and JSP's and its all working fine. However i want to import some of the classes into the JSP's so i moved all the classes and servelts into a new package called Driver. I did not change any code anywhere, just moved it into a new package. The application compiles just fine. Now i cant seem to access any of my classes or servlets, any ideas? javax.servlet.ServletException: Wrapper cannot find servlet class Driver.viewTrip or a class it depends on

    Read the article

  • Tomcat JSP(2.0) Document how to stop automaticly closing empty body tags with /> instead of </tagnam

    - by JOKe
    The question is. If I use JSP Documents (or JSP 2.0) and If I put a TAG without a BODY it is automaticly closed I dont want that. so If I have <div id=....> </div> it is automaticly converted to <div id=.../> How I can stop this ? I am using tomcat is there any configuration about that ? P.S. the reason to want to stop it is because it simple "fuckes" the JQuery stuffs that the designer company are using.

    Read the article

  • JSP template inheritance

    - by Ryan
    Coming from a background in Django, I often use "template inheritance", where multiple templates inherit from a common base. Is there an easy way to do this in JSP? If not, is there an alternative to JSP that does this (besides Django on Jython that is :) base template <html> <body> {% block content %} {% endblock %} </body> <html> basic content {% extends "base template" %} {% block content %} <h1>{{ content.title }} <-- Fills in a variable</h1> {{ content.body }} <-- Fills in another variable {% endblock %} Will render as follows (assuming that conten.title is "Insert Title Here", and content.body is "Insert Body Here") <html> <body> <h1>Insert title Here <-- Fills in a variable</h1> Insert Body Here <-- Fills in another variable </body> <html>

    Read the article

  • Cannot access implict object from within method in custom JSP tag file

    - by David Hamilton
    I'm attempting to create a custom jsp tag. Everything is working fine, except for the fact that I the request seems to be out-of-scope for my custom function. Here is the relevant bit from the .tag file: <%! private String process(String age, BigDecimal amount) { //Attempting to access request here results in an compile time error trying to: String url=request.getURL; } %> I'm very new to JSP so I'm sure I'm missing something obvious..but I can't seem to figure out what. Any help is appreciated.

    Read the article

  • ajax send parameter to jsp but failed

    - by kawtousse
    I am trying to send data to my jsp via:"xhr.send(projectCode);" but apparently the parameter is not received when I am trying to realise it with System.out.print it is a null displayed. so the story from the begining. my javascript function send the parameter to the jsp whitch construct an xml file and resend to the first one. this will reconstruct my second dropdownList with the xml code constructed and received. so the problem that the parameter dosent sent at all. What should I do.

    Read the article

  • Spring MVC - JSP - Place to Store Environment Specific Constants

    - by jboyd
    Where in the Spring-MVC/JSP application would you store things that need to be accessed by both the controllers and views such as environment specific base_url's, application ids to be used in javascript and so on? I've tried creating an application scoped bean and then at the top of my JSPs, but that doesn't seem to be working. <!-- Environment --> <bean id="myEnv" class="com.myapp.MyAppEnvironment" scope="application"> <property name="baseUrl" value="http://localhost:8080/myapp/"/> <property name="videoPlayerId" value="234346565"/> </bean> And using it in the following manner <jsp:useBean id="myEnv" scope="application" type="com.myapp.MyAppEnvironment"/>

    Read the article

  • How to implement jsf validator?

    - by Krishna
    HI, I want to know how to implement Validator in JSF. What is the advantages of declaring the validator-id. When it will be called in the life cycle?. I have implemented the following code. Please find out what is wrong in the code. I am not seeing it called anywhere in the life cycle. <?xml version="1.0"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config> <lifecycle> <phase-listener>javabeat.net.jsf.JsfPhaseListener</phase-listener> </lifecycle> <validator> <validator-id>JsfValidator</validator-id> <validator-class>javabeat.net.jsf.JsfValidator</validator-class> </validator> <managed-bean> <managed-bean-name>jsfBean</managed-bean-name> <managed-bean-class>javabeat.net.beans.ManagedBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <navigation-rule> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>success.jsp</to-view-id> </navigation-case> </navigation-rule> </faces-config> public class JsfValidator implements Validator { public JsfValidator() { System.out.println("Inside JsfValidator Constructor"); } @Override public void validate(FacesContext facesContext, UIComponent uiComponent, Object object) throws ValidatorException { System.out.println("Inside Validator"); } }

    Read the article

  • Ajax with Jsf 1.1 implementation

    - by Rohan Ved
    I am using JSF1.1 in that, have this code_ <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://www.azureworlds.org" prefix="azure"%> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="x"%> <%@ taglib uri="http://www.asifqamar.com/jsf/asif" prefix="a"%> ... <x:selectOneMenu value="#{hotelBean.state}"> <f:selectItem itemLabel="Select One" itemValue="" /> <f:selectItem value="#{hotelBean.mapStates }" /> <x:ajax update="city" listener="#{hotelBean.handleCityChange}" /> </x:selectOneMenu> <h:outputText value="City* " /> <x:selectOneMenu id="city" value="#{hotelBean.city}"> <f:selectItem itemLabel="Select One" itemValue="" /> <f:selectItem value="#{hotelBean.mapCities }" /> </x:selectOneMenu> line x:ajax update="city" listener="#{hotelBean.handleCityChange}" is not working , i searched but got JSF1.1 not support for Ajax. then what can i do for this? and i have less knowledge of JS. Thanx

    Read the article

  • Redirect into two different page after login.jsp according user category

    - by Ryon
    I have created a login.jsp with some login username and password. Users are categorized into A and B. Then I have to redirect each user according to the user category. I also need to retrieve the username in the next page. My form in login.jsp page is something like this: <form method="POST" action='<%= response.encodeURL("j_security_check") %>' Do I have to use javax.servlet.Filter? what should be added in web.xml? Anyone had an idea how to do it?

    Read the article

  • Printing UTF-16 strings in JSP is outputted as HTML encoding (&#xxxx)

    - by Ori Osherov
    Hello, When I try to print a UTF-16 string in JSP, specifically Hebrew, it ends up showing up as HTML encoding (&#xxxx). This problem occurs because I print an array of variables into the web page and then parse them. The variables are all UTF-16 strings, but once the servlet prints the variables, it becomes translated to HTML encoding. Is there any way to get rid of the encoding? Thanks in advance Edit for a bit more background: The JSP that I'm printing is not the entirety of the page. It's used in a manner I don't quite understand by a server app which prints the JSPs output into its built in page. As a result, I can't, for instance, use a tag because the will have already been placed somewhere else. This isn't a frame or anything like that. It's just redirected output.

    Read the article

  • file upload in JSF using myfaces component

    - by prt
    Hi, all i am creating a JSF application where file uploading functionality is required.I have added all the required jar files in my /WEB-INF/lib folder. jsf-api.jar jsf-impl.jar jstl.jar standard.jar myfaces-extensions.jar commons-collections.jar commons-digester.jar commons-beanutils.jar commons-logging.jar commons-fileupload-1.0.jar but still when trying to deploy the application on apache 6.0.29 i am getting the following error. org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored. org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart PM org.apache.catalina.core.StandardContext start SEVERE: Context [/jsfApplication] startup failed due to previous errors org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc The web application [/jsfApplication] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/jsfApplication] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/jsfApplication] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository. i am using also using hibernate and spring framework for this application. please help. thanks,

    Read the article

  • Ajax and JSF 1.1 using hidden iframe with "proxy forms", what do you think about this development st

    - by Steel Plume
    Hi, currently I am using yet 1.1 specs, so I am trying to make simple what is too complex for me :p, managing backing beans with conflicting navigation rules, external params breaking rules and so on... for example when I need a backing bean used by other "views" simply I call it using FacesContext inside other backing beans, but often it's too wired up to JSF navigation/initialization rules to be really usable, and of course more simple is more useful become the FacesContext. So with only a bit of cross browser Javascript (simply a form copy and a read-write on a "proxy" form), I create a sort of proxy form inside the main user page (totally disassociated from JSF navigation rules, but using JSF taglibs). Ajax gives me flexibility on the user interaction, but data is always managed by JSF. Pratically I demand all "fictious" user actions to an hidden "iframe" which build up all needed forms according JSF rules, then a javascript simply clone its form output and put it into the user view level (CSS for showing/hiding real command buttons and making pretty), the user plays around and when he click submit, a script copies all "proxied" form values into the real JSF form inside the "iframe" that invokes the real submit of the form, what it returns is obviously dependent by your choice. Now JSF is really a pleasure :-p My real interest is to know what are your alternative strategy for using pure Ajax and JSF 1.1 without adopting middle layer like ajax4jsf and others, all good choices but too much "plugins" than specs.

    Read the article

  • Passing session between jsf backing bean and model

    - by Rachel
    Background : I am having backing bean which has upload method that listen when file is uploaded. Now I pass this file to parser and in parser am doing validation check for row present in csv file. If validation fails, I have to log information and saving in logging table in database. My end goal : Is to get session information in logging bean so that I can get initialContext and make call to ejb to save data to database. What is happening : In my upload backing bean, am getting session but when i call parser, I do not pass session information as I do not want parser to be dependent on session as I want to unit test parser individually. So in my parser, I do not have session information, from parser am making call to logging bean(just a bean with some ejb methods) but in this logging bean, i need session because i need to get initial context. Question Is there a way in JSF, that I can get the session in my logging bean that I have in my upload backing bean? I tried doing: FacesContext ctx = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) ctx.getExternalContext().getSession(false); but session value was null, more generic question would be : How can I get session information in model bean or other beans that are referenced from backing beans in which we have session? Do we have generic method in jsf using which we can access session information throughout JSF Application?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >