facelets

Troubles Iterating Over A HashMap with JSF, MyFaces & Facelets

被刻印的时光 ゝ 提交于 2019-12-07 14:20:05
问题 I'm having some trouble looping over a HashMap to print out it's values to the screen. Could someone double check my code to see what I'm doing wrong. I can't seem to find anything wrong but there must be something. In a servlet, I am adding the following to the request: Map<String, String> facetValues = new HashMap<String, String>(); // Filling the map req.setAttribute(facetField.getName(), facetValues); In one case "facetField.getName()" evaluates to "discipline". So in my page I have the

Tags from http://xmlns.jcp.org namespace do not render, while http://java.sun.com/jsf work fine

旧城冷巷雨未停 提交于 2019-12-07 11:32:21
问题 I have this: <html xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://java.sun.com/jsf/html" > <h:selectOneRadio> <f:selectItem value="1" itemValue="1" itemLabel="123"/> <f:selectItem value="2" itemValue="2" itemLabel="321"/> </h:selectOneRadio> And I get this: <f:selectItem value="1" itemValue="1" itemLabel="123"></f:selectItem> <f:selectItem value="2" itemValue="2" itemLabel="321"></f:selectItem> <select name="j_idt5" size="1"></select> Why are xmlns:f="http://xmlns.jcp.org/jsf/core"

PrimeFaces Dialog + appendToBody=true not working

旧街凉风 提交于 2019-12-07 10:58:53
问题 I'm using PF 3.5 and JSF Mojarra 2.1. I have a dialog which I want to use appendToBody=true. This usually results in "unpredictable behavior" though. Basically what the dialog does is, when I choose an entry (a persn entity) from a datatable, it gives me filled up input boxes which I can edit, thus editing the particular entry (person details). Sometimes the input boxes get filled up properly with the entries data. Sometimes they dont. This behavior does not happen with appendToBody=false.

JSF problem with FireFox 3.5 caching, wyciwyg:// prefix

左心房为你撑大大i 提交于 2019-12-07 09:21:40
问题 I am new to JSF and have a problem with my simple JSF application. I use Facelets and Richfaces on WebLogic 10.3.2 (11g). The application is essentially 3 pages: A <--> B <--> C where the intermediate arrows denote navigation rules. The navigation is performed through a4j:commandButtons The problem is in Firefox 3.5, when I click from B to C, I get a url starting from wyciwig:// . In more detail, the starting url is: http://localhost:7001/myapp/index.faces and the url I get when I navigate

How do I use the latest version of jQuery and get back the '$' for jQuery in RichFaces?

旧巷老猫 提交于 2019-12-07 09:09:28
RichFaces 3.3.3 comes baked in with jQuery 1.3.2 and prototype and scriptaculous as well. How can I try and use the latest version of jQuery? Can I use the Google CDN one? Also the $() object is defaulted to prorotype and to use jQuery I have to do jQuery() is there a way to get back the $ for jQuery without breaking RichFaces? UPDATE: You can use multiple versions of jQuery side by side. For now, I've gone ahead and used the version that comes baked with RichFaces. You can use $ with jQuery without breaking RichFaces by wrapping your jQuery code in this manner: (function($) { /* your jQuery

How to remove white spaces in JSF output?

余生长醉 提交于 2019-12-07 07:55:04
问题 Is it possible to configure JSF 2.0 to remove unnecessary white spaces between XHTML tags? 回答1: No. Facelets cannot distinguish unnecessary whitespace from necessary whitespace. For that it would need to determine individual HTML tags, parse CSS and JS files for any evidence that it is really unnecessary. In case of the HTML <pre> and <textarea> tags, the CSS white-space:pre property and JS element.style.whiteSpace='pre' code, the whitespace is namely significant. It's simply too expensive

JSF 2 Update Component Outside of Form and Outside of Facelet

天涯浪子 提交于 2019-12-07 04:37:53
问题 I have a form in the <ui:insert name="content" /> When I save the data with a p:commandButton I can update the form and things within the <ui:insert name="content" />. But I am having trouble figuring out how to update components in the <ui:include src="/sections/menus/topMenu.xhtml"/> Inside the topmenu I have a subview for a panel with links that get rendered depending on whether a person is logged in or not. when they are logged in I show their username. If I update the user name in the

JSF & ui:repeat - issue with adding an object to cart

限于喜欢 提交于 2019-12-06 21:01:28
Once again I need some help with my pizza-search-programm I have written with Java Server Faces. The program: A user can search for pizzas by entering a form. A filtered search is possible as the user can decide whether he searches for a pizza name, a pizza id or other specified criteria. The program will generate a SQL query which returns pizza objects and stores it into a list of objects. A JSF page displays the list of pizza objects by iterating them through a ui:repeat tag. Pizza name, pizza ID, available sizes (displayed as radio buttons) and a list of possible quantities are displayed.

JSF template, include a piece of HTML in each page

爷,独闯天下 提交于 2019-12-06 16:03:13
I can't figure out how to include a piece of HTML (say a little table ) in each of the pages of my web app. Say this is the table I want to include, so I made a template: <?xml version ... ?> <!DOCTYPE ..."> <html xmlns="... all the required namespaces ..."> <head> </head> <body> <table> <tr><td>first</td><td>second</td><td>third</td><td>...</td></tr> </table> </body> </html> then I have the code that uses it: <?xml version ...?> <!DOCTYPE ..."> <html xmlns="... all required namespaces ..."> <body> <h3>Will this be displayed?</h3> <ui:composition template="tableTemplate.xhtml"> <h4>Will this?<

Facelet selectOneMenu with POJOs and converter problem

浪子不回头ぞ 提交于 2019-12-06 15:49:54
I want to have a facelet page with a formular and a dropdown menu. With the dropdown menu the user shoul select a POJO of the type Lieferant: public class Lieferant extends AbstractPersistentWarenwirtschaftsObject { private String firma; public Lieferant(WarenwirtschaftDatabaseLayer database, String firma) { this(database, null, firma); } public Lieferant(WarenwirtschaftDatabaseLayer database, Long primaryKey, String firma) { super(database, primaryKey); this.firma = firma; } public String getFirma() { return firma; } @Override public String toString() { return getFirma(); } @Override public