Questions tagged [uirepeat]

JSF/Facelets component to iterate over a collection or array without generating markup.

The <ui:repeat> is a Facelets component which allows you to iterate over a collection or an array without generating any additional markup.

224 questions
34
votes
6 answers

Display database blob images in inside

I'm using PrimeFaces 3.2 on JBoss 7.1.1. I am trying to display an image which is stored in a BLOB in a MySQL database in . The image is stored in a byte[] and then converted to a StreamedContent as follows: InputStream stream = new…
25
votes
2 answers

How to repeat output of text via simple for loop in Facelets without model?

How to repeat output of some content in JSF using only standard tags (ui:, h: etc) ? In other words - how to do equivalent to PHP code below in JSF ? I immediately wanted to take advantage of ui:repeat, but it needs collection - I have only…
marioosh
  • 24,528
  • 42
  • 132
  • 181
25
votes
1 answer

Specify conditional rendering of element inside ? The does not seem to work

I am trying to conditionally build a custom list using . On every occurrence of -1 as item-value in list, I need to add a line break. I tried to use inside for that, but it does not seem to work. It always evaluates…
Rajat Gupta
  • 23,343
  • 56
  • 165
  • 281
20
votes
3 answers

How to use in or to select multiple items?

I have a Facelets page with a . In each row there is a . If the checkbox is selected the object behind the corresponding row should be set in the bean. How do I do this? How to get the selected rows or their…
c0d3x
  • 661
  • 5
  • 11
  • 19
13
votes
2 answers

How to set converter properties for each row/item of h:dataTable/ui:repeat?

I have created a custom ISO date time Converter: public class IsoDateTimeConverter implements Converter, StateHolder { private Class type; private String pattern; private boolean transientValue = false; public void setType(Class…
Miguel Iglesias
  • 339
  • 2
  • 3
  • 6
12
votes
2 answers

Output a map collection in facelets JSF 2

I have seen a couple other examples on SO discussing some weird workarounds but none seem to work and they were all addressed at versions prior to JSF 2. So, it it possible to simply output the keys of a map? I've tried ui:repeat and c:forEach like…
Adam
  • 3,860
  • 8
  • 42
  • 70
11
votes
2 answers

How can I set id of a component/tag inside ui:repeat

I'm trying to assign an id to a component inside a like that: The thing is…
Daniel
  • 35,598
  • 9
  • 108
  • 184
11
votes
4 answers

How to re-render using

I have implemented a list created by a repeater: and a Button that filters my list:
Sven
  • 5,990
  • 23
  • 69
  • 110
11
votes
1 answer

JSF 2 dataTable row index without dataModel

I've been using ui:repeat to generate tables. With ui:repeat it's easy to get the rows numbered using the varStatus. I'm depending on the row id's from varStatus when calling the backing bean to handle list navigation, for example moving an item up…
nivis
  • 873
  • 3
  • 16
  • 32
9
votes
2 answers

How to show hashmap values in jsf?

I have bean "MyBean", which has property HashMap - "map" which values type is MyClass. I want to show some properties of map in jsf using ui:repeat. But these code:
Aram Gevorgyan
  • 2,025
  • 6
  • 35
  • 56
9
votes
1 answer

How to use to iterate over a nested list?

Using JSF 2.0, I need to display a table wherein each row contains a link which opens a popup. I have two models: A which has id and List properties and B which has id and name properties. In my backing bean, I have a List property. In my…
user2228591
  • 115
  • 1
  • 1
  • 9
9
votes
2 answers

How to use with DefaultStreamedContent in an ui:repeat?

I was trying to display a panel where user can see a list of items category(displayed as images) and on clicking they can view products within the category(images will be displayed) For displaying the item category, i used the ui:repeat nad the…
user1433804
  • 657
  • 5
  • 16
  • 30
9
votes
1 answer

Using on a List doesn't update model values

Here is the scenario (simplified): There is a bean (call it mrBean) with a member and the appropriate getters/setters: private List rootContext; public void addContextItem() { rootContext.add(""); } The JSF code:
Ben
  • 9,162
  • 21
  • 89
  • 151
7
votes
1 answer

Using validator with a variable attribute in ui:repeat

I'm using com.sun.faces version 2.1.18. In my application I have a dynamic list of questions. I use to render each question. Depending on the type of question I render a type of input component and validation. In case of a number range…
Jasper de Vries
  • 13,693
  • 6
  • 54
  • 86
6
votes
1 answer

Setting a validator attribute using EL based on ui:repeat var

I am looking for a little bit of guidance today with the issue I am running into. What I am trying to accomplish is build a page on the fly with validation and all. The end result is to allow the user to configure the fields on the page through…
MikeR
  • 613
  • 8
  • 21
1
2 3
14 15