massimo tarantelli

Ranch Hand
+ Follow
since Jun 19, 2012
massimo likes ...
Netbeans IDE Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
13
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by massimo tarantelli

Hello guys,
I'm between this two data structures: I would like to have a DataTable but i would like to give the possibility to order the rows like in a OrderList, not just sorting it, but put the row in any possible sequence...is there a way?
thanks
11 years ago
JSF
thanks for the answer, i have sorted out the problem in this way:



ajax now works.
Anyway it evaluates the target size before the transfer, so it's always one click shifted...
how can I sort out it?
11 years ago
JSF
Hello guys, here the issue:
I need to update the disable attribute of a commandButton based of the number of item in the picklist target, in particular if the target size is 0 the button must be disabled.
here my code (i'm using PrimeFaces 3.4):
Face:


Bean:


The idea was to use the setter method of the pickSize component in a non-ortodox way...
So, when an user transfer an item, the ajax will execute the hidden inputText trought its setter that in turn will set the size value in the pickSize, and finally it will change the value of the disabled attribute of the button.
...I have this is the track error:
any suggestion? thanks guys.

11 years ago
JSF
Hello to everybody, i know that i can use both:


and


But i don't understand the need of the second one, infact in both I can write what i want inside the method.
I mean, what is customizable in the second one that is not possible in the first one?
thanks
Massimo
11 years ago
JSF

The request scope bean is created, referenced, and destroyed when the page is initially displayed


Does It mean that the bean is destroyed after the page rendering? (always speaking about request beans)
Or it'll be destroyed when a new request occurs?
thanks
11 years ago
JSF

If you mean that managed property values are not available when the constructor executes, that's true.


It was what I meant.
thanks for the complete explanation.
11 years ago
JSF
thanks for the answer, anyway i've noticed that the 4) way doesn't work in the constructor...why? thanks
11 years ago
JSF
Thanks for the answer, I still have a doubt....
A very simple scenario could be this one:

index.xhtml



page2.xhtml



model.java



Well, I Have noted that the bean is first created when I access to the page (during the rendering, ok) but than it is acreated again again after i click on the commundButton, even though in the page02 there isn't any bean reference, and so it should not be a request...why?
11 years ago
JSF
Hello,
Since I have still a lot to learn, i always use System.out.println("something") in the code to understand its flow...for example i put System.out.println("Bean created") to the bean constructor to better follow the bean lifecycle.
Where i can write System.out.println("Bean created") to know where it's destroyed?
thanks
11 years ago
JSF
Hello to everybody,
to acces a Beans from an other one I know these ways:
1)


2)


3)


4)


which are the differences, and when one is better from an other?
thanks

11 years ago
JSF
Thanks for the answer,
I have implemented the @ManagedProperty in my request bean and in this way I can use the viewSoped bean method, but I have noted that when i call the page linked to the requestScope bean, toghether with its constructor, it is also called the viewScoped constructor...so when I try to get the values that i had previously saved obviously I get an empty field.
In fact I "lose" the view and then the viewScoped is "distroyed".
It's possible to avoid this "distruction" and get those values or do exist some other technics ?
thanks
11 years ago
JSF
Thanks for the answer,
I would like to add an other important detail.
In my request bean i don't want to create a new view scoped bean, but i would like to get a value that was previously setted.
thanks
Massimo
11 years ago
JSF
Hello to everybody,
How can I do that?
I tryed with these:

and


but it seams they don't work.
thanks
Massimo
11 years ago
JSF