Paolo Pinkel

Ranch Hand
+ Follow
since May 04, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Paolo Pinkel

For some reason I had used an older version of the Expression Language library.
13 years ago
JSF
The PrimeFaces manual is free now, btw.

Do you use the latest stable version (2.2.1) or any development version (3.x)?

Which components exactly don't work? Which attributes are missing?

PrimeFaces works pretty good for me.

If you get no good answer here, you could try asking a specific question at the PrimeFaces forum.
13 years ago
JSF
Can anyone see why my listener is not fired?

There are no validation errors on the form. (Other actions are called just fine.)





Also, the selectedItems-setter is not called straight away.
13 years ago
JSF
I once use a inputTextarea to display a bean property. However, I don't want the setter to be called when the user invokes an action. Is there any way to do this?
13 years ago
JSF
How would you generally manage to change a variable value inside a thread and access the new value from the outside while the thread is running?

I passed an object to the thread's constructor and that object holds the value. The thread changes the value in it's run() method. The class that started the thread holds a reference to that object and thus can see the new value.

But this somehow seem's wrong to me. How would you achieve it?

A thread with a return value (using Future) is not an option since I need the updated value periodically while the thread is running.

Also, how do I properly terminate a thread? Do I just need to call interrupt()? That's all?
13 years ago
Thanks for this enlightening comment, Tim! I'm new to JSF, so... thank you! It's working now!
13 years ago
JSF
Can I just use the @PreDestroy annotation for any void method inside any bean? Do I have to register it or something?

Because my @PreDestroy method won't be invoked.

I put it in a @ViewScoped bean. When I navigate away, the method is not called.



Any ideas why? I'm using JSF 2 on a Tomcat 7.
13 years ago
JSF
I'm trying to put values in the requestScope from an action method.

This is what the method looks like:



This is a snippet of my form:


(Yep, it's in a dataTable.)

It will put display the value (2nd inputText), but not the key (1st inputText). That's rather strange. (Inside the action method, the key looks fine.)

Do you see anything wrong there?

Thank you!
13 years ago
JSF
Argh! I confused keySet and entrySet. Now it works. Thanks everyone!
13 years ago
This is how I try it:



tempMaps is a list of Map<String, String>. In the end, I want to have a map with the retainAll values of every Map.

Can you see why it won't work?

Your help is much appreciated!
13 years ago
This will not check if keys andvalues are the same. Only the keys.
13 years ago
I have some TreeMaps and I need to do a retainAll. In the end, I want a TreeMap made out of the key-value-pairs that were the same for every TreeMap.

Any idea? It's not just that the keys need to be equal... it needs to be the key and the value. That's why I don't know how to handle the .keySet and .values.

Thanks!
13 years ago
I don't have the source code on this notebook, but the ui:repeat-part seemed to work fine, it was the concatenation that didn't work. Do you see anything wrong there?

I called "getParts()" because it isn't a property in sense of having a getter and setter. It was just a method that provides me a list. (Which is always the same anyway.)
13 years ago
JSF
I have two forms in a xhtml-file: one displaying a dataTable, and one displaying some input-components.

In the first form, I have a selectOneRadio. Everything else should only be rendered once the user selected a value. I put a panelGroup with a rendered attribute after the selectOneRadio (that will hold everything in the first form besides the selectOneRadio itself) and I refresh that using AJAX, which works quite fine. But that panelGroup can't go past the first form (which makes sense).

So I put the components of the second form in a second panelGroup, but for some reason that second panelGroup is not rendered:


And in the first form, I tried refreshing it like this:



I tried "secondForm:secondFormGroup" instead ":secondForm:secondFormGroup" too.

Can anyone see why it's not rendering?

Edit: I forgot to mention that I tried putting another panelGroup around the second panelGroup and render *that* one. It didn't work either.
13 years ago
JSF
How can I concatenate the name of a property using the EL?

This is what I tried:



But it didn't work.

The bean has the four property resultA, resultB, resultC and resultD. getParts() returns "A", "B", "C", and "D".

Any idea how I can achieve that?
13 years ago
JSF