Search Results

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

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

  • Are JSF 2.x ViewScoped Beans Thread Safe?

    - by Mark
    I've been googling for a couple hours on this issue to no eval. WELD docs and the CDI spec are pretty clear regarding thread safety of the scopes provided. For example: Application Scope - not safe Session Scope - not safe Request Scope - safe, always bound to a single thread Conversation Scope - safe (due to the WELD proxy serializing access from multiple request threads) I can't find anything on the View Scope defined by JSF 2.x. It is in roughly the same bucket as the Conversation Scope in that it is very possible for multiple requests to hit the scope concurrently despite it being bound to a single view / user. What I don't know is if the JSF implementation serializes access to the bean from multiple requests. Anyone have knowledge of the spec or of the Morraja/MyFaces implementations that could clear this up?

    Read the article

  • JSF & jqPlot Uncaught TypeError

    - by sdg
    I have a problem using jqPlot with JSF I added this code to my JSF page: $(document).ready(function () { var s1 = [200, 600, 700, 1000]; var s2 = [460, - 210, 690, 820]; var s3 = [-260, - 440, 320, 200]; var ticks = ['May', 'June', 'July', 'August']; var plot1 = $.jqplot('chart1', [s1, s2, s3], { // The "seriesDefaults" option is an options object that will // be applied to all series in the chart. seriesDefaults: { renderer: $.jqplot.BarRenderer, rendererOptions: { fillToZero: true } }, series: [{ label: 'Hotel' }, { label: 'Event Regristration' }, { label: 'Airfare' }], legend: { show: true, placement: 'outsideGrid' }, axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks }, yaxis: { pad: 1.05, tickOptions: { formatString: '$%d' } } } }); }); but when I try to load the page I got this error : Uncaught TypeError: Cannot read property 'BarRenderer' of undefined (anonymous function)portfolioModeling.xhtml:184 f.extend._Deferred.e.resolveWithjquery.min.js:2 e.extend.readyjquery.min.js:2 c.addEventListener.C I added the whole required js files and also the css file but I am lost and don't know where is the problem Thanks in advance

    Read the article

  • Why does my JSF + Spring web application output JSF source code instead of interpreted HTML page?

    - by Corvus
    I'm new to both JSF and Spring Framework and I'm trying to figure out how to make them work together. My current problem is that application outputs my JSF files without interpreting them. Here are some snippets of my code which I believe might be relevant: dispatcher-servlet.xml <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="login.htm">loginController</prop> </props> </property> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/pages/" p:suffix=".xhtml" /> <bean name="loginController" class="controller.LoginController" /> loginController public class LoginController extends MultiActionController { public ModelAndView login(HttpServletRequest request, HttpServletResponse response) throws Exception { System.out.println("LOGIN"); return new ModelAndView("login"); } WEB-INF/pages/login.xhtml <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <title>#{message.log}</title> </h:head> <h:body> <h:form> <h:outputLabel value="#{message.username}" for="userName"> <h:inputText id="userName" value="#{User.name}" /> </h:outputLabel> <h:commandButton value="#{message.loggin}" action="#{User.login}" /> </h:form> </h:body> </html> Any ideas where the problem might be? Does this code make any sense at all? I'm well aware of fact, that probably completely sucks and I'll be glad to here WHY it sucks and how to make it better. Thanks :)

    Read the article

  • JSF : How to refresh required field in ajax request

    - by Tama
    Ok, here you are the core problem. The page. I have two required "input text". A command button that changes the bean value and reRenderes the "job" object. <a4j:form id="pervForm"> SURNAME:<h:inputText id="surname" label="Surname" value="#{prevManager.surname}" required="true" /> <br/> JOB:<h:inputText value="#{prevManager.job}" id="job" maxlength="10" size="10" label="#{msg.common_label_job}" required="true" /> <br/> <a4j:commandButton value="Set job to Programmer" ajaxSingle="true" reRender="job"> <a4j:actionparam name="jVal" value="Programmer" assignTo="#{prevManager.job}"/> </a4j:commandButton> <h:commandButton id="save" value="save" action="save" class="HATSBUTTON"/> </a4j:form> Here the simple manager: public class PrevManager { private String surname; private String job; public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surname; } public String getJob() { return job; } public void setJob(String job) { this.job = job; } public String save() { //do something } } Let's do this: Write something on the Job input text (such as "teacher"). Leave empty the surname. Save. Validation error appears (surname is mandatory). Press "Set job to Programmer": nothing happens. Checking the bean value, I discovered that it is correctly updated, indeed the component on the page is not updated! Well, according to the JBoss Docs I found: Ajax region is a key ajax component. It limits the part of the component tree to be processed on the server side when ajax request comes. Processing means invocation during Decode, Validation and Model Update phase. Most common reasons to use a region are: -avoiding the aborting of the JSF lifecycle processing during the validation of other form input unnecessary for given ajax request; -defining the different strategies when events will be delivered (immediate="true/false") -showing an individual indicator of an ajax status -increasing the performance of the rendering processing (selfRendered="true/false", renderRegionOnly="true/false") The following two examples show the situation when a validation error does not allow to process an ajax input. Type the name. The outputText component should reappear after you. However, in the first case, this activity will be aborted because of the other field with required="true". You will see only the error message while the "Job" field is empty. Here you are the example: <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <style> .outergridvalidationcolumn { padding: 0px 30px 10px 0px; } </style> <a4j:outputPanel ajaxRendered="true"> <h:messages style="color:red" /> </a4j:outputPanel> <h:panelGrid columns="2" columnClasses="outergridvalidationcolumn"> <h:form id="form1"> <h:panelGrid columns="2"> <h:outputText value="Name" /> <h:inputText value="#{userBean.name}"> <a4j:support event="onkeyup" reRender="outname" /> </h:inputText> <h:outputText value="Job" /> <h:inputText required="true" id="job2" value="#{userBean.job}" /> </h:panelGrid> </h:form> <h:form id="form2"> <h:panelGrid columns="2"> <h:outputText value="Name" /> <a4j:region> <h:inputText value="#{userBean.name}"> <a4j:support event="onkeyup" reRender="outname" /> </h:inputText> </a4j:region> <h:outputText value="Job" /> <h:inputText required="true" id="job1" value="#{userBean.job}" /> </h:panelGrid> </h:form> </h:panelGrid> <h:outputText id="outname" style="font-weight:bold" value="Typed Name: #{userBean.name}" /> <br /> </ui:composition> Form1: the behaviour is incorrect. I need to fill the job and then the name. Form2: the behaviour is correct. I do not need to fill the job to see the correct value. Unfortunately using Ajax region does not help (indeed I used it in a bad way ...) because my fields are both REQUIRED. That's the main different. Any idea? Many thanks.

    Read the article

  • Does the Eclipse IDE support JSF 2.0?

    - by Shane
    I have the WTP 3.1 plugin installed and have also installed the Glassfish v3 plugin. I am able to register my server. When I create a dynamic web project, I can see that the maximum dynamic web module version available is 2.5. I then choose the default configuration for Glassfish v3 but, when I look at it JSF, it is not selected by default. When I select it, the maximum version available is 1.2. I want to use JSF with facelets - does Eclipse support this? I can't seem to find anything helpful on the Eclipse WTP site.

    Read the article

  • how to apply filters in jsf

    - by johnbritto
    Hi I have filter code Page not Found error while any client request for Jsf Page in my Jsf application.I dont Know How to Fix this issue This is My Filter Code: HttpServletRequest req =(HttpServletRequest)request; HttpServletResponse res =(HttpServletResponse)response; HttpSession ses = req.getSession(true); String pageRequested =req.getRequestURL().toString(); if (ses.getAttribute("userDetails")!=null) { fc.doFilter(request,response); }else{ RequestDispatcher dis = request.getRequestDispatcher(LOGIN_PAGE); dis.forward(request,response); } This code inside the DoFilter Method I done all The settings in Web.xml deployment Descriptor

    Read the article

  • JSF - Updating Model Values in Controller Bean

    - by Sean
    I have a Controller bean (SearchController) that has two managed bean as managed properties (SearchCriteria, SearchResults; both of which are session scoped). When the user hits the find button, the action method that is executed is in SearchController. The SearchCreteria managed bean has a method called search(). This method returns a new SearchResults object. In the controller bean, I am setting the searchResults managed property to be this new SearchResults object. The searchResults object contains what I expect during that request, but the object does not persist in the managed bean. I understand that I am changing what object that searchResults is referencing, but what I don't understand is why JSF isn't updating the model to use the new object. Any ideas what I'm missing or don't understand? I am using JSF 1.1 on WebSphere 6.1. If I put the search method in the SearchResults managed bean, it works.

    Read the article

  • Seam + hibernate + jsf on weblogic

    - by Kiva
    I'm making a little project with Seam, Hibernate and JSF. This project run on JBoss 5.1. My boss wants to deploy this project on WebLogic. I read on the seam documentation that seam and WebLogic don't work fine together. I would like to know if I can use Hibernate (with JPA) and JSF on WebLogic and what framework (struts, spring?) I can use to replace Seam. Edit: I read in the seam documentation (chapter 39, weblogic integration) and I find that: For several releases of Weblogic there has been an issue with how Weblogic generates stubs and compiles EJB's that use variable arguments in their methods. This is confirmed in the Weblogic 9.X and 10.0.MP1 versions. Unfortunately the 10.3 version only partially addresses the issue as detailed below. So, I want to know if other problems like this exist. Edit 2: I use Weblogic 10.3

    Read the article

  • Localizing a JSF 1.2 application with UTF-8 resources

    - by Filini
    (WARNING: this is my first java application, coming from .NET, so don't bash me if I write too much garbage) I'm developing a simple JSF 1.2 web application which should support Russian, Chinese, and other languages outside ISO 8859-1, which is automatically used in Properties.load(). Is there a way to use the Properties loaded from XML files, with Properties.loadFromXml(), inside JSF, without writing too much code? I know there are alternative ways to do so (writing my own loader, escaping the characters...), but I'd really love to find a simple solution, and I don't see it in all the forums I checked. Thanks in advance for any help

    Read the article

  • JSF templating beginner's question.

    - by Nitesh Panchal
    Hello, I belong to Asp.Net but just starting to learn JSF. I wanted to know whether all features of MasterPage are available in JSF templating? I mean say suppose i have a menu in template, and based on roles menu changes. If the Admin logs in, he will get to show more options and if general user logs in he will get to see less options. Now i have a managed bean for my "real" page(not template). How do i use this managed bean to toggle my control in template on and Off?

    Read the article

  • JSF 2 Content Controller (pull in content based on URI)

    - by gerges
    Hey All, I'm new to JSF and am trying to make a content controller. Basically whenever someone makes a request to www.myapp.com/external/** I'd like to forward to a controller that pulls external content into a page template and spits it out to the user. I was able to achive this pretty easily in Spring 3, but I'm a little confused on where to start with JSF. I feel like I'd need to create a custom servlet to handle /external/**? But what would the class of this servlet be? What would it consist of? Any help is appreciated!

    Read the article

  • Oracle participó en el Expocontact14

    - by Noelia Gomez
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Los pasados 27 y 28 de Mayo tuvo lugar el congreso Expocontact en el Museo del Traje. El congreso volvió a ser punto de encuentro de los mejores expertos y empresas líderes del sector Contact Center con una convocatoria de 700 asistentes. Oracle, además de patrocinador del evento, formó parte de la agenda con la ponencia de Victor López, Sales Consulting Director, CRM Orale Ibérica en la que explicó “Cómo pasar de atender a “gestionar experiencias” ”. En esta ponencia trasladó la importancia de la innovación tecnológica en el servicio al cliente ya que a través de este “puedes disponer del perfil completo de tu cliente” y hacer tu trabajo más ágil y funcional, comentaba Victor. Además, aprovechó para resaltar las mayores funcionalidades de las soluciones de CX (Customer Experience) de Oracle en la nube: “multicanal, móviles, integradas y flexibles”. Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Además de las ponencias, la agenda contaba con una mesa redonda donde se debatió sobre la gestión integral del cliente desde una perspectiva global. La interacción de la audiencia fue clave durante las dos jornadas, pudiendo votar a las preguntas propuestas sobre las ponencias en directo y conociendo al momento los resultados, a través de una aplicación móvil. Algo que hizo constatar un mensaje clave para este sector: “saber escuchar al cliente” Conoce ya nuestras soluciones de CX aquí. /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    Read the article

  • Using SiteMesh with RequestDispatcher's forward()

    - by Rob Hruska
    I'm attempting to integrate SiteMesh into a legacy application using Tomcat 5 as my a container. I have a main.jsp that I'm decorating with a simple decorator. In decorators.xml, I've just got one decorator defined: <decorators defaultdir="/decorators"> <decorator name="layout-main" page="layout-main.jsp"> <pattern>/jsp/main.jsp</pattern> </decorator> </decorators> This decorator works if I manually go to http://example.com/my-webapp/jsp/main.jsp. However, there are a few places where a servlet, instead of doing a redirect to a jsp, does a forward: getServletContext().getRequestDispatcher("/jsp/main.jsp").forward(request, response); This means that the URL remains at something like http://example.com/my-webapp/servlet/MyServlet instead of the jsp file and is therefore not being decorated, I presume since it doesn't match the pattern in decorators.xml. I can't do a <pattern>/*</pattern> because there are other jsps that do not need to be decorated by layout-main.jsp. I can't do a <pattern>/servlet/MyServlet*</pattern> because MyServlet may forward to main.jsp sometimes and perhaps error.jsp at other times. Is there a way to work around this without expansive changes to how the servlets work? Since it's a legacy app I don't have as much freedom to change things, so I'm hoping for something configuration-wise that will fix this. SiteMesh's documentation really isn't that great. I've been working mostly off the example application that comes with the distribution. I really like SiteMesh, and am hoping I can get it to work in this case.

    Read the article

  • JSP + View bean complete example

    - by jihedamine
    I found this interesting tutorial that explains the concept of view bean with some code snippets http://www.ibm.com/developerworks/ibm/library/i-extreme5/, but I'd like to view a complete (simple) web application in a real world scenario using plain JSP and view beans (not using struts, spring or jsf framework). Thanks for pointing me to such a resource.

    Read the article

  • JSF 2.0 AJAX: jsf.ajax.request to call method not only rerender an area of page

    - by gerry
    Hi, I'm looking for a soultion of the following problem: _The is a list of links with different types of cars. _The user can click on each car in the list and a ajax request should be sent. _The response of the ajax request should be dependent on the id (of each car) and displayed in an panelGroup. So what I need is a possibility to call a method on the backing-bean. Additionally, this method should be called with a car id as its parameter. My code so far looks like: ... <ul> <ui:repeat value="#{carTree.getCars)}" var="car"> <h:outputScript name="jsf.js" library="javax.faces" target="head" /> <li onclick="showDetails(#{car.id});">#{car.name}</li> </ui:repeat> </ul> ... <h:panelGroup id="carDetails" layout="block" style="float:left;"> // need the details of each 'selected /clicked' car here </h:panelGroup> ... And the method in the backing bean should look like: public class CarTree { ... public String getCarDetails(int carid){ return "The car details for the car id "+carid+" are......"; } ... } I've no idea how to call a method by using the new JSF 2.0 AJAX functionality. Please, help me...

    Read the article

  • Getting Response.End() behavior in JSP

    - by Sam Ingrassia
    Thanks to everyone in advance - I am aware of closing the jspwriter/outputstream and returning as a method to stop further execution in the main context. Has anyone found a way to stop execution outside of the main context? From my understanding of how jsp is 'compiled' etc I do not think this is possible, but I thought I should see if anyone has any clever solutions - Thanks, Sam

    Read the article

  • Accessing xml from jsp on tomcat server is throwing FileNotFoundException trying to access .keystore

    - by mobibob
    I am trying to access an XML file from JSP on my Tomcat server. The error is from Catalina's protocol handler and the exception is java.io.FileNotFoundException trying to access my .keystore in the 'documents and settings' folder for my signed-on user (with admin, but not the user that installed the server). I can provide the stacktrace if that would help ... but my question is more fundamental about secure access to files and where is the keystore configured / used on a Window's install?

    Read the article

  • Beans, Lists and JSP

    - by Luigi 1982
    Hi at All I have a little question... On my JSP page I have a List of beans. I want to extract a sublist of beans with a specific property (Ex. all Horror books). Can Apache Beanutils help me? Thanks in advance...

    Read the article

  • Servlet, JSP, JavaBeans and HTML form

    - by dedalo
    Hi, I'm working on a servlet that makes a connection to a database gets the information of one of the tables ans sends this information to a jsp file. This file will print on the brower the information table, adding radio buttons that allows us to choose one of the rows. The servlet looks like this: List<InfoBean> items = new ArrayList<InfoBean>(); if (!conexion.isClosed()){ Statement st = (Statement) conexion.createStatement(); ResultSet rs = st.executeQuery("select * from lista_audio" ); while (rs.next()) {items.add(getRow(rs));} conexion.close();} req.getSession().setAttribute("items", items); In the JSP file I can print a table with the information, adding radio buttons that the user will use to choose 1 row and send the selected info to a servlet using a form I can add: < form action="administ" method=get enctype=multipart/form-data> < table> < table border=\"1\">< tr>< th>Title< /th>< th>Author< /th>< th>Album< /th>< /tr> < c:forEach items="${items}" var="item"> < tr>< td><input type="radio" name="SongInfo" value=${item.title}> < td>${item.title}< /td> < td>${item.author}< /td> < td>${item.album}< /td>< /tr> < /c:forEach> < /table> In the field 'value' I should be able to send to the servlet the information stored in ${item.title}. When I set value = ${item.title} and title is, for example "The bodyguard", in the servlet the information I can retrieve is just "The". It looks like it sends the characters located before the first white space of the string. How could I get the whole string? Thanks

    Read the article

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