facelets « Facelets « JSF Q&A





1. Using JavaScript with JSF and Facelets    stackoverflow.com

I would like to use JavaScript to manipulate hidden input fields in a JSF/Facelets page. When the page loads, I need to set a hidden field to the color depth of ...

2. JSF & Facelets Flow    stackoverflow.com

I have a dynamic Facelets page that needs to show information from database when the page loads. At this point in the flow, there have not been any form submissions. Every ...

3. Show me Open Source projects using Facelets!    stackoverflow.com

I want to watch and learn from Open Source projects that are using Facelets, but my Google skills failed me so I went here. The closest thing I found ...

4. Are custom facelet functions dirty?    stackoverflow.com

I have several places in my facelets web app where we are using custom facelet functions. For some reason they feel dirty and I can't quite peg why. What ...

5. How many ways there are to declare variables in facelets?    stackoverflow.com

I noticed that c:set does not work well used inside "include of include of include", as important notice facelets documentation does't recommend it too. Now I am using ui:param inside ui:include, but ...

6. Is it possible to override facelets.development for different environments?    stackoverflow.com

We'd like to set facelets.development to false to suppress stack traces in non-development environments, but we'd like to have it set to true in dev for debugging. Our deployment process dictates one ...

7. Losing Facelets support in JSF 2 by adding libs    stackoverflow.com

I'm trying to migrate a JSF 1.2 project running on Tomcat to Mojarra 2 running on Glassfish v3 (b71). I tried creating a new test project in Eclipse (JEE Ganymede) ...

8. JSF & Facelets - Getting Started    stackoverflow.com

I'd like to learn how to develop Java-based web front-ends (I already work with J2EE server-side). Microsoft's path appears quite straight-forward (ASP.NET; like it or not). However, I'm not sure about ...

9. JSF 2.0 and Facelets    stackoverflow.com

In blogs i have read that JSF 2.0 is inlcuding Facelets. So i only included JSF-api.jar and JSF-impl.jar to my Java build path. But if i try to use Facelet tags, they ...





10. Not getting image in h:graphicImage in JSF    stackoverflow.com

I have this very strange error with h:graphicImage This code works fine :-

<h:graphicImage value="/Common/Images/#{item.templatePicName}"/>
And this one doesn't :-
<h:graphicImage alt="${app:getCommonImagePath(item.templatePicName)}"  value="${app:getCommonImagePath(item.templatePicName)}" />
It only shows alt value /Common/Images/Sunset.jpg which is perfectly fine and ...

11. Can someone explain facelets?    stackoverflow.com

I have been involved in JSF + Facelets dev for a month or so. I used composition, insert, define and other tags from facelets. I am finding it difficult to understand ...

12. Does NavigationHandler.handleNavigation() clear the flash?    stackoverflow.com

I am using JSF2.0 Mojarra 2.0.2. I have a method that logs out a user and puts a logout message in the flash, forwards to the login page (which has a div ...

13. Can we use Facelets in JSF1.1_02?    stackoverflow.com

Can we use Facelets in JSF RI 1.1_02? If we can please send me some piece of code relating to that? Can anyone tell me which version of Tomcat will support ...

14. Better layout?    stackoverflow.com

I have a JSF page. At one point, I have a <h:selectManyCheckbox> that is displaying a number of items. The tag provides 2 attributes you can set to define whether ...

15. is it possible to do this in jsf?    stackoverflow.com

I have a / group of radio buttons , and a CommandButton Two cases 1)When one of the button is clicked + The command Button is clicked, I should display some other ...

16. c:if test is not being invoked in facelet + JSF2    stackoverflow.com

I am using facelet and JSF2. I define a parameter in a page:

<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:p="http://primefaces.prime.com.tr/ui"
 template="../templates/ui.xhtml">
 <ui:param name="title" value="OnAir WebDemo"/>

...
</ui:composition>
in the ui.xhtml I have:
<html xmlns="http://www.w3.org/1999/xhtml"
 xmlns:h="http://java.sun.com/jsf/html"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:ui="http://java.sun.com/jsf/facelets"
 xmlns:p="http://primefaces.prime.com.tr/ui"
 ...





17. SelectOneRadio Problem    stackoverflow.com

I'm trying to do a search form, depending on the selected item you can do searchs by start to end or month and year Is it possible to do a form look ...

18. How to make facelets work?    stackoverflow.com

I have created a new web project and enabled its JSF and Facelets capabilities on MyEclipse, then I deployed it over weblogic. Everything look fine but it does not work for ...

19. JSF2 and Facelets    stackoverflow.com

I have tried to port JSF 1 + JSP to JSF 2 + Facelets but I have stumbled onto this error when I viewed the page in the web browser:

XML Parsing ...

20. How to display menu items from database    stackoverflow.com

I have two classes representing menu items. First one is Category, it represents the parent menu items.

@Entity
@Table(name = "category")
@NamedQueries({
    @NamedQuery(name = "Category.findAll", query = "SELECT c FROM Category c"),
 ...

21. viewId/resource association    stackoverflow.com

I'm using JSF 2.0. Is it possible to customize the way a <to-view-id>, from a navigation rule, is associated with an actual file/resource on the server when the next view is ...

22. JSF - Create a Dynamic Menu by using AJAX & selectOneListbox    stackoverflow.com

What I'd like to do is simple to explain : bean

@ManagedBean
@ViewScoped
public class Articles {
    private String selectedMenu;

    @PostConstruct
    public void init() {
  ...

23. JSF - Why setter is not called this time?    stackoverflow.com

As usual, i've some trouble by using some ajax call on a requested scoped bean. I've this Bean :

@ManagedBean
@RequestScoped
public class ArticlesSelector implements Serializable {
    @ManagedProperty(value="#{param.type}")
    private ...

25. JSF2 and Facelets - java.io.FileNotFoundException    stackoverflow.com

My JSF 2 project structure is as follow:

root
...
   WebContent
      META-INF
      resources
         ...

26. I want to call javascript confirm dialog using AddResource    stackoverflow.com

I want to call javascript from JSF back bean function. for that i have used *org.apache.myfaces.renderkit.html.util.AddResou*rce (tomahawk-1.1.3.jar).

String javaScriptText = "return confirm('hi');";

            ...

27. ViewScoped works like RequestScoped - why?    stackoverflow.com

I wrote a ViewScoped Managed-Bean and every time I refresh the page in my webbrowser, the Managed-Bean seems to be recreated, article is null, it loads a new article-object and so ...

28. How to use Facelets composition with files from another context    stackoverflow.com

I have an application that use composition (for page templates). But we think in create a web-application (war) to host all templates shared by all applications in the same host of ...

29. Readonly checkbox in JSF2 won't update from server-side    stackoverflow.com

I have a checkbox which (depending on an AJAX context) may be both readonly on writeallowed. The problem is, that when I make it readonly, it becomes RO not only to ...

30. How to create the tabs behaviour in jsf 2.0    stackoverflow.com

Simple question that I couldn't figure out how to do so far in the best way. I'm starting a new project so I'm still somewhat flexible. JSF 2.0, Facelets are welcome (Although I'm ...

31. What's the difference between and in Java Facelets?    stackoverflow.com

See this. When and why to use <h:head>, instead of <head>? I've seen Primefaces won't work with <head>, though.

32. JSF 2.0 AJAX Calls Failing    stackoverflow.com

I am working on a project to take an existing project using JSF1.2, JSP, Struts, Tiles, Richfaces ... to simply use JSF2.0, the built-in facelets support, and updating Richfaces to version ...

33. Automatically Append a value in an Input Text field onfocus using javascript    stackoverflow.com

In a create form, the user types his name, then his surname, and when he focuses on the username text field, the surname.name String must be appended automatically. In other words, Using ...

34. Java server faces link doesn't work inside loop    stackoverflow.com

I have this simple code in facelets "numbers.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"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:c="http://java.sun.com/jsp/jstl/core">
  <body>
   ...

35. h:outputLink with f:ajax - method called, but link not shown    stackoverflow.com

This does not work

<h:form style="display: inline;">
    <h:outputLink value="#{title.link}" >
        #{msg['g.readMore']}
        <f:ajax event="click" immediate="true" listener="#{titlesBean.titleClicked(title.id)}" ...

36. adding jsf-facelets.jar in JSF2 project    stackoverflow.com

Im new in JSF 2 and I wan to konw if I have to add the jsf-facelets.jar to my project lib or it's included in the JSF 2 jars. Thanks.

37. Does hx:fileUpload have file limit?    stackoverflow.com

Is there a limit on the size of the file I can upload to the server using the hx:fileUpload component? I have a requirement of receiving 100 MB files, but I ...

38. An alternative web framework (instead of JSF) to use with CDI    stackoverflow.com

Is there other Java Web frameworks other than JSF which work well with CDI? "Work well" could be simply to have a template system which can access @Named beans. Rationale: I do ...

39. How to print principal using JSF 2.0 + Facelets?    stackoverflow.com

with jsp I can easily print the logged in principal using: <%= request.getUserPrincipal() %> now I would like to do the same using JSF 2.0 + Facelets. How to do that? ...

40. data access problem in jsf    stackoverflow.com

I have the following class-files:

class RowData {
...
  ArrayList<String> valueMap;
...
}

class Bean {
...
  public List<RowData> getData() {
  ...
  }
}
jsf code snippet:
...
<h:form>
  <rich:dataTable id="overviewTable" value="#{bean.getData()}" var="row">

  ...

41. JSF + Dynatree to make a tree represenation    stackoverflow.com

I'd like to draw a tree that is generated in JSF. I thought I'd use DynaTree and avoid using component libraries, although i'm starting to have second thoughts seeing the complexity of ...

42. JSF 2 Access on Facelet Files    stackoverflow.com

I am starting to explore JSF 2 facelet and I would like to test this in a simple project. I just have some query regarding the file structure in JSF 2. ...

43. Reuse variable outside of composition - passing variables up in jsf?    stackoverflow.com

I'm using jsf 1.2 and have got some weird javascript which gets repeated at several places in my project. I do not want to repeat myself.. but i found no way to ...

44. How to use f:loadbundle with facelets    stackoverflow.com

Using f:loadbundle when using jsp as the view description language for an JSF application is pretty straight forward. I want to know where to put this f:loadbundle when i am using facelets ...

45. What are the benefits of using JSF2 resources?    stackoverflow.com

Should I use JSF2 resources instead of plain html like <link href... or url(image.png)? What are the benefits? For me this is a bit annoying when web-designer creates layout with XHTML, ...

46. Handle activation link Java    stackoverflow.com

Using facelet, jsf manager bean, netbean 7.0.1, glass fish 3.1, i want User can recovery their password. When User enter their email and confirm, an activation link will be sent to ...

47. Is Facelets Covered ?    coderanch.com

48. facelets and resin 3.0.9    coderanch.com

49. Issues with facelets and saveState?    coderanch.com

50. Facelets    coderanch.com

The bigger question is "why use html at all?". I use xhtml even on my regular html pages. Because it's more stringent, I can use smarter tools. Also, if html ever goes obsolete, it will be because xhtml or one of its relatives replaces it. Even if the replacement isn't the xhtml of today, I'll stand a better chance of being ...

51. c:import with Facelets    coderanch.com

It is interesting but c:import works in my JSF pages. Ofcourse I need to import JSTL tag library. Otherwise JSF page will not be able to understand c:import. I can also use JSP includes to include content into my JSF pages. . Have you tried that? make sure you put your included content into as shown in ...

52. Any Exam...Facelets,JSF    coderanch.com

53. JSF, Facelets & Recursion    coderanch.com

Hello all, I'm working with JSF (MyFaces) and Facelets. I've created a custom facelet (more precise: via a seperate xhtml-file), containing a tomahawk data-table But one big problem: in this file there is a reference to itselfs, because i have to represent a custom tree structure (with checkboxes to delete and create new nodes/subtrees). so it's seems logical to solve this ...

54. Help needed in facelets    coderanch.com

55. Facelets with frames    coderanch.com

56. Facelets procs and cons    coderanch.com

57. Facelets not working on Godaddy    coderanch.com

58. Design Friendly Facelets - how?    coderanch.com

60. JSF Facelets deployment problem    coderanch.com

61. Wicket versus JSF (with Facelets)    coderanch.com

62. Facelets in JSF????    coderanch.com

63. what is facelets?    coderanch.com

64. Facelets?/Visual Web JSF/JSF    coderanch.com

65. JSF, Facelets and paths inside javascript file    coderanch.com

Hi there, I am developing a simple application using JSF and Facelets, running on Apache Tomcat 6. At the main page I'm using nice JQuery based menu, found at http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/, which is the root of the problem. Directory structure is as follows: +webapp +src +web +css +img (arrows which supposed to be placed next to menu labels) +down.gif +right.gif +js (js ...

66. jsf with facelets jars    coderanch.com

67. facelets checking user's roles    coderanch.com

68. Facelets and JSF    coderanch.com

How can add my JSP (JSF) file into .xhtml facelet file? I have template file: Facelets Template

left

69. Config & Conditionals In Facelets    coderanch.com

Hi all, There's one thing in Facelets that always catches me out and I was just wondering if someone could give me guidance on what I should be doing. The webapp I'm creating (with Seam) will be created by me but configured by someone else. The configuration needs to be kept in a JSF page as the application itself is made ...

70. problem when using facelets    coderanch.com

Hi, guys i am working on a project using facelets. I got a problem on displaying my pages correctly. On my root directory, i got a template.xhtml file which is a facelet template. i divided the template into 3 layouts which are header, content and footer. All other pages should be displayed in the content layout. But, only the pages under ...

71. [facelets] custom taglibrary not recognized    coderanch.com

Hi, I'm building a JSF custom taglibrary where I define some template components. I've been struggling for a few days to solve a problem with my custom tags. The problem is that my custom tags are not rendered. This is what I've added to my project: web.xml: (I've only picked the relevant code) ... ... ...

72. JSF, Facelets losing context after reload    coderanch.com

Technically, the "context" is the part of the URL that's the same for every page in the app. So for a Tomcat URL of http://myhost.com:8080/myapp/users/page1.jsf, the context would be "myapp". It doesn't have to be a single level, but it usually is. The context URL is therefore "http:/myhost.com:8080/myapp" From the sound of it, you're using relative URLs for your scripts and ...

74. What are Facelets?    coderanch.com

75. JSF 2.0 Facelets Problem    coderanch.com

76. Getting today's date in Facelets    coderanch.com

77. Advanced theming concepts for JSF (Facelets)?    coderanch.com

TL;DR: Looking for ideas on how to do advanced theming in JSF, looking for more than just CSS/image libs tricks, need full view customization. Any ideas or concepts would be appreciated. We are attempting to build advanced themeing into a new version of our web application, to allow us to use one platform to provide many different brand/white label shops. Specifically, ...

78. Is this a facelets?    coderanch.com

79. Tiles and facelets    coderanch.com

80. Create tree using facelets    coderanch.com

81. Facelets download    coderanch.com

83. Facelets Problem    coderanch.com

84. jsf 1.2 Facelets - Double clicks on a selectManyListbox    coderanch.com

You cannot access a backing bean without doing some form of submit, because submitting is the way that the client talks to the server in HTTP, and HTTP is the underpinning of JSF. AJAX makes it possible to do a partial page submit/render, but it's still an HTTP submit at heart. Since you're using JSF 1.2, you are either going to ...

85. JSF ZUL - Facelets    zkoss.org