Search Results

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

Page 10/148 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • proper way to dynamically assign backbone.js view el

    - by kikuchiyo
    I would like to create two ( or more ) view instances, each with different el attributes, and have events bound to them via backbone.js view's events hash ( not through jQuery ). Getting events to trigger when all instantiations have the same el is easy: someView = Backbone.View.extend({ el: '#someDiv', events: { 'click': 'someFunction' }, someFunction: function(){ //Do something here } }); So far, if I assign el in the initialize function, and set events normally as follows, events do not trigger: someView = Backbone.View.extend({ events: { 'click': 'someFunction' }, initialize: function( options ){ this.el = options.el }, someFunction: function(){ //Do something here } }); My first instinct was to have el be a function that returns the string representation of the dom element of interest: someView = Backbone.View.extend({ el: function(){ return '#someDiv-' + this.someNumber }, events: { 'click': 'someFunction' }, initialize: function( options ){ this.someNumber = options.someNumber }, someFunction: function(){ //Do something here } }); However, this triggers someFunction x times if I have x instantiations of someView. Next I tried setting both the el and events attributes in initialize: someView = Backbone.View.extend({ initialize: function( options ){ this.el = options.el this.events = { 'click': 'someFunction' } }, someFunction: function(){ //Do something here } }); but this does not trigger events. At this point I'm pretty much fishing. Does anyone know how instantiate a backbone.js view with an el specific to that instance that has events that only trigger for that instance, and not other instances of the View?

    Read the article

  • JSF html component on WebSphere 7.0

    - by Mike Schall
    We are in the process of upgrading to WebSphere 7.0 on Windows 2008 R2. Our applications currently run on WebSphere 6.1 on Windows 2003. We use custom controls we wrote using JSF 1.1 in our applications. Our controls seem to render and interact fine, however whenever we use a JSF HTML component such as: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> ... <h:graphicImage url="#{MenuBean.bannerImagePath}" /> We get the following error: com.ibm.ws.jsp.JspCoreException: Unable to convert string '#{MenuBean.bannerImagePath}' to class javax.el.ValueExpression for attribute url: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager com.ibm.ws.jsp.JspCoreException: Unable to convert string '#{MenuBean.bannerImagePath}' to class javax.el.ValueExpression for attribute url: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager at org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:939) at com.ibm._jsp._dashboard._jspx_meth_h_graphicImage_0(_dashboard.java:136) at com.ibm._jsp._dashboard._jspx_meth_f_view_0(_dashboard.java:436) at com.ibm._jsp._dashboard._jspService(_dashboard.java:109) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1583) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1523) I have found an article on IBM's website giving a possible fix: http://www-01.ibm.com/support/docview.wss?uid=swg21318801 However I have removed the specified jars and am still receiving the error message. Again our custom controls seem to work fine under WebSphere 7's JSF 1.2. Thanks for any help you can provide. Mike

    Read the article

  • JSF 2.0: use Enum values for selectOneMenu

    - by yournamehere
    I'm using JSF 2.0 and want to fill a selectOneMenu with the values of my Enum. A simple example: // Sample Enum public enum Gender { MALE("Male"), FEMALE("Female"); private final String label; private Gender(String label) { this.label = label; } public String getLabel() { return this.label; } } Unfortunately, i can't use Seam for my current project, which had a nice <s:convertEnum/> Tag that did most of the work. In Seam, to use the values of the Enum, i had to write the following markup (and create a factory that provides the #{genderValues}: <!-- the Seam way --> <h:selectOneMenu id="persongender" value="#{person.gender}"> <s:selectItems var="_gender" value="#{genderValues}"" label="#{_gender.label}"/> <s:convertEnum/> </h:selectOneMenu> The result is that i don't have to declare the Enum values explicitely anymore inside the markup. I know that this is not very easy in JSF <2.0, but is there any new in JSF2 to help with this issue? Or does Weld help here somehow? If there is nothing new in JSF2, what's the easiest way to do it in JSF 1.2? Or can i even integrate the Seam JSF tag and the corresponding classes of Seam to get the same feature in a JavaEE6-App (without the Seam container)?

    Read the article

  • JSF works only with the .xhtml ending

    - by ThreeFingerMark
    Hello, i start with the programming of a JSF Website. At the moment all files have the .xhtml ending. When i go to http://localhost:8080/myProject/start.jsf everything is all right. But when i rename the file from start.xhtml to start.jsf i became a NoClassDefFound Error. What is my mistake? <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param>

    Read the article

  • Using JSF, PrimeFaces and JPA: Create Basic WebApp without using Generated CRUD Classes, Forms, etc

    - by user2774489
    I am trying to build a basic CRUD application with NetBeans 7.4, JSF, PrimeFaces and JPA using MySQL. I have successfully done this by using the NetBeans wizards. I want to do this from scratch, no wizards. There seems to be a lack of support for the combo of JSF, PrimeFaces and JPA. When I say "lack", I mean a full example (I might be asking too much), without using the CRUD auto-gen templates/classes AND shows actual queries coded and passed to the datatables(primefaces). YouTube is full of non-English speaking examples using Hibernate (not JPA) and other examples that show flashy GUI's with no code. So far I understand you need an @Entity class (provides the physical build of the tables), a Controller (serializable) and the .xhtml web page to show the datatable.. what else? Also, I'm not seeing any posts or examples where queries are using with JPA/JSF and how they are tied together (in one place). I need to connect the dots here so that I can leverage JSF/JPA to create simple queries to populate my PF DataTables. I've read the blogs and I've googled the intranets until I'm blue in the face. Sending me a list of URL's to read to learn about each product is something I've already done. I get what they do independently, but am looking for the "How do they all connect" answer with maybe some basic code examples!! :)

    Read the article

  • Why can't my jsp page read chinese chars from mysql? [migrated]

    - by Canking
    The mysql chars is utf-8, and the jsp page is also set to utf-8. I use the method: DriverManager.getConnection("jdbc:mysql://localhost:3306/jsptest?"+"useUnicode=true&characterEncoding=UTF-8","root",""); But it can not be use. When I insert Chinese chars into mysql and select it out, that would be proper functioning. The question is when I select some Chinese chars that I write into mysql at first, it would be all the "?" at the Chinese char place! Please watch the picture:

    Read the article

  • how to get the result query one by one in jsp and mysql

    - by user261002
    I am trying to implement as Online Mock exam in JSP, but I have a problem to get the questions one by one, it get connceted for the first time, and show me the first question and answers, but when I click on "next" again, it still show me the first question, I think by clicking on "next" it start querying again. please help me. this is my bean : database.SQLSelectStatement sqlselect; database.SQLSelectStatement sqlselect2; static ResultSet questions; static ResultSetMetaData rsm; static ResultSet answers; public void setConnection() throws SQLException { if (database.DatabaseManager.getInstance().connectionOK()) { sqlselect = new database.SQLSelectStatement("question", "question", "0"); sqlselect2 = new database.SQLSelectStatement("answers", "question_id", "0"); questions = sqlselect.executeWithNoCondition(); } } public int i=0; public String getQuestions() throws SQLException { String result = ""; rsm = questions.getMetaData(); for (int i = 0; i < rsm.getColumnCount(); i++) { result += "<th>" + rsm.getColumnName(i + 1) + "</th>"; } if (!questions.isLast()) { questions.next(); System.out.println(i+1); result += "<tr>"; result += "<td>" + questions.getInt(1) + "</td>"; result += "<td>" + questions.getString(2) + "</td>"; result += "</tr>"; result += "<tr>"; sqlselect2.setValue(String.valueOf(questions.getInt(1))); answers = sqlselect2.Execute(); while (answers.next()) { result += "<tr> <td colspan='2'><input type='radio' name='answer' value='" + answers.getString(2) + "'> " + answers.getString(2) + "</td></tr>"; } result += "</tr>"; answers.close(); } return result; } this is the HTML: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <h1>JSP Page</h1> <jsp:useBean id="exam" class="exam.ExamQuestions"></jsp:useBean> <% exam.setConnection(); %> <form method="post"> <table > <%=exam.getQuestions()%> </table> <input type="submit" name="action" value="next"/> </form> <% String action = request.getParameter("action"); if ("next".equals(action)) { out.println(request.getParameter("answer")); } %> </body> </html>

    Read the article

  • jsp getServletContext() error

    - by Reigel
    html <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Murach's Java Servlets and JSP</title> </head> <body> <%-- import packages and classes needed by the scripts --%> <%@ page import="business.*, data.*" %> <% //get parameters from the request String firstName = request.getParameter("firstName"); String lastName = request.getParameter("lastName"); String emailAddress = request.getParameter("emailAddress"); // get the real path for the EmailList.txt file ServletContext sc = this.getServletContext(); String path = sc.getRealPath("/WEB-INF/EmailList.txt"); // use regular Java objects User user = new User(firstName, lastName, emailAddress); UserIO.add(user, path); %> <h1>Thanks for joining our email list</h1> <p>Here is the information that you entered: </p> <table cellspacing="5" cellpadding="5" border="1"> <tr> <td align="right">First name:</td> <td><%= firstName %></td> </tr> <tr> <td align="right">Last name:</td> <td><%= lastName %></td> </tr> <tr> <td align="right">Email Address:</td> <td><%= emailAddress %></td> </tr> </table> <p>To enter another email address, click on the Back <br /> button in your browser or the Return button shown <br /> below.</p> <form action="index.jsp" method="post"> <input type="submit" value="Return" /> </form> </body> </html> and it's giving me this error page... Compilation of 'C:\bea\user_projects\domains\mydomain.\myserver.wlnotdelete\extract\myserver_sample01_WebContent\jsp_servlet__display_email_entry.java' failed: C:\bea\user_projects\domains\mydomain.\myserver.wlnotdelete\extract\myserver_sample01_WebContent\jsp_servlet__display_email_entry.java:140: cannot resolve symbol probably occurred due to an error in /display_email_entry.jsp line 19: ServletContext sc = this.getServletContext(); Full compiler error(s): C:\bea\user_projects\domains\mydomain.\myserver.wlnotdelete\extract\myserver_sample01_WebContent\jsp_servlet__display_email_entry.java:140: cannot resolve symbol symbol : method getServletContext () location: class jsp_servlet.__display_email_entry     ServletContext sc = this.getServletContext(); //[ /display_email_entry.jsp; Line:19]                                    ^ 1 error Thu Jun 03 15:56:09 CST 2010 any hint? I'm really new to JSP, and this is my first learning practice... can't find it by google.com.... thanks!

    Read the article

  • Stack Overflows in the Eclipse JSP Editor

    - by stevedbrown
    When editing JSPs in Eclipse, I periodically get stack overflows. Once I get one, each time I click a character I get a pop-up telling me there was another stack overflow. This continues until I close the JSP and re-open it, at which time it's fine for a while. org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser: input could not be parsed correctly at position 1 java.lang.StackOverflowError Has anyone else seen this issue, do you know the cause, and is there a way to fix it?

    Read the article

  • JSF Managed Bean auto-create?

    - by rat
    Is it possible to have a JSF managed bean be automatically created? For example I have several session scoped beans. Sometimes it becomes necessary to access these instances in code (rather than just in JSF) this is done by: PageBean pageBean = (PageBean) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("pages"); However if no page has already been visited which calls to '#{pages}' this resolves to null ... is there anyway to get JSF to create a bean when the scope 'begins'? So in this case ideally when a user session begins the 'pages' bean would be instantiated in the session immediately?

    Read the article

  • JSF Spring Bean set property

    - by Sebastian
    Hi, i have a JSF web application. I use Beans as Spring Beans (not JSF managed beans). Now i have an URL to application www.xxx.com?parameter=2 I would like to set this parameter into bean on the page load. I now how to do this with spring web flow but with JSF Navigation i cant do this. What do you think about using JSTL c:set... or jsp:setProperty...? Thanks for your help. Kind regards Sebastian

    Read the article

  • ajax : multiple ajax calls for included js files inside jsp fragment

    - by Nrj
    I am including a jsp fragment by making an ajax call. Now this jsp frag happened to include several js files. When the ajax request is completed, it is loading each of the included js files (on fragments) using a separate get request. (I checked this using firebug.) Now is this the correct behavior (making separate get calls) or am I missing something. Is there a way to include the js files and send the response in one go ?

    Read the article

  • How to insert JSP functionality in Servlets?

    - by chustar
    How can I use Servlets to access the HTML uses of having JSP without having to have all my client-facing pages called *.jsp? I would rather do this than using all the response.write() stuff because I think it is easier to read and maintain when it is all clean "HTML". Is this is fair assesment?

    Read the article

  • how to access owl file inside jsp

    - by Udayanga
    hi, I'm trying to access owl file using jsp.I've successfully load the owl file and quering that using SPARQL.But still I couldn't success with JSP. I'm always getting error "java.lang.ClassNotFoundException: com.hp.hpl.jena.util.FileManager " help me! Thank in advance!

    Read the article

  • Error in JSP program -Eclipse 3.5

    - by megala
    while running jsp it shows the following error error reading /opt/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.3.0_1.3.0.v200912141120/appengine-java-sdk-1.3.0/lib/shared/jsp/repackaged-appengine-ant-launcher-1.6.5.jar; error in opening zip file How to solve this

    Read the article

  • ajax and jsp integration

    - by kawtousse
    I want to capture the responseXML that i have built in my jsp. What should I do. after that i will transform it in html. I know this is annoying and we could do it with a framework or a library like jquery but i realize it with ajax. Also i have problems with jquery and jsp\servlet since i must use a JSON SERVICE. Why it seems to me that is so complicated.

    Read the article

  • JSP/JSF conversion to ASP.NET

    - by sharru
    I have a pretty big JSF web application. I must convert the application to ASP.NET. I already converted the Java code to C# code manually and also using JCLA (Java Language Conversion Assistant from Microsoft). What is the best way to convert the JSF part to ASP.NET? Is there any tool that can help shorten the work? For example convert JSF <t:dataList> to ASP.NET datagrid, or converting panelGroup to asp:panel, etc...

    Read the article

  • Using Session Bean provided data on JSF welcome page

    - by takachgeza
    I use JSF managed beans calling EJB methods that are provide data from database. I want to use some data already on the welcome page of the application. What is the best solution for it? EJBs are injected into JSF managed beans and it looks like the injection is done after executing the constructor. So I am not able to call EJB methods in the constructor. The normal place for EJB call is in the JSF action methods but how to call such a method prior to loding the first page of the application? A possible solution would be to call the EJB method conditionally in a getter that is used on the welcome page, for example: public List getProductList(){ if (this.productList == null) this.productList = myEJB.getProductList(); return this.productList; } Is there any better solution? For example, in some config file?

    Read the article

  • how to reload the whole page through a button placed in a division in jsp

    - by ajeet singh
    when i tried to make web project, i placed the links on the left on one division and a bigger division on the right to load the jsp pages on clicking the links making the main page same... but when there is a need arises to load the whole page by clicking the button placed on the right division, i found that the only page is loaded on the right division jsp calling its action... please help me to sort out this problem..

    Read the article

  • JBoss 4.2.3 Servlet API 2.5 JSF 2.0 Hibernate 3.0 Support Added [Solved]

    - by AZ_
    While deploying my project on Redhat 6 with Jboss 4.2.3 I was having following difficulties so I decided to put it on stackoverflow so that it can help other people. If anyone could suggest a good title so that it can easily be searched, please Q: How to make Jboss 4.2.x to ignore old JSF libraries and use one within your project libs? Q: How to make Jboss scan specific path for WAR file scanning? Q: How to bind Jboss with IP address rather then localhost? Q: Where Jboss put exploded WAR file? Q: Hibernate-annotations conflict with Jboss 4.2.3 annotations and throwing following Exception. java.lang.ClassCastException: org.hibernate.validator.event.ValidateEventListener cannot be cast to org.hibernate.event.PreInsertEventListener Q: How to run JSF 2.0.x on JBoss 4.0.x ? As JSF 2.0 supports at least Servlet 2.5 API and JBoss has Tomcat 5.x that can support Servlet 2.4 at max. Q: How to change Servlet version of a Dynamic Web Project?

    Read the article

  • JSP application scope objects in Java library

    - by FrontierPsycho
    I am working on a preexisting web application built with JSP, which uses an external Java library. I want to make some JavaBeans that were instantiated with jsp:useBean tags available to the Java code. What would be a good practice to do that? I suppose I can pass the objects in question to every function call that requires them, but I'd like to avoid that.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >