Maks Besida

Greenhorn
+ Follow
since May 26, 2011
Maks likes ...
Oracle Chrome 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
1
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Maks Besida

I have a KeyUpHandler and want to disable default actions on some keys. For example, I want to disable new line to be inserted into TextArea or if the user press Tab key I want to disable focus to be changed to another element. How can i achieve this
12 years ago
GWT
Rather good tutorial of pdf handling with JSF. I think this pdf handling tutorial will help you
12 years ago
JSF
try to use <ui:repeat> tag in your component and create additional attribute for it that will hold the count.
12 years ago
JSF

Amit K Jain wrote:Hi,

Is it possible to create the hyperlink for the labels of radioButtons. I want to create the hyperlink for these to point to some static text on the same page.

Can someone please advise how to do it.



Have you tried to do the following?
12 years ago
JSF
I have such a form in jsf 2.0 in which user can change locale:

When user click on radio button to change locale the form submits and validation logic performs and error messages are shown to user. But i don't want error messages to be shown to user while he or she simply change locale. When I delete required="true" from both input fields then user doesn't see the error messages. How can i avoid error messages to be shown to the user?
12 years ago
JSF
What results do you expect of clicking the button and what you get instead? Show a piece of code where you declare the backing bean's action and code where you use it.
12 years ago
JSF
Can you initially return value "ABC" from getType()?
12 years ago
JSF

Rob Micah wrote:I have a bean that holds an array of Object parameters. When I render the view I want to choose between using a textbox or a select list for each one of those objects based on their attributes. At first glance this appeared to be simple using JSTL tags but after reading that JSTL tags evaluate only to build the component tree and not to render it, I don't think it will work (ref: http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets).

So how can I accomplish this using JSF?


as I understand you want to choose the component to be rendered based on some condition? Almost all jsf tags have such an attribute as rendered, where you can specify whether to render that component or not. So in your backing bean you have to write a property(means jsf property as getXXX() or isXXX()) and use it in rendered attribute.
In your situation it will look like this:

where is method in your backing bean which determines whether to render the specified component or not
12 years ago
JSF
You can use Lazy loading for your entities to restrict loading of all entities into the session.
Also read about Cache Managment pattern. It will be useful for solving your problem
12 years ago
JSF

H Jetly wrote:Are you using JSF 1.2 or JSF 2.0 ?


I'm using JSF 2.0

Tim Holloway wrote:
As I mentioned, it's extremely unsafe to write your own login system, no matter HOW many J2EE books use login forms as examples. But if you do, you can capture the login credentials in the login form's backing bean, use IoC to inject your user profile bean into the login form's backing bean, and have the login form's login action method configure the user profile. All without requiring constructor arguments.


1.Well, what is better to use instead in jsf 2.0?
2.If I have more than 2 types of users in my system(each of them requires session scoped managed bean), I will have to inject all these beans into login's form backing bean, but in the concrete session it will be used only one of them, so others will stay in the session
12 years ago
JSF
Hi, I'm writing a small web app for learning purpose only. My app has a login form which is used for login to different types of users(actually I have 2 types of users and each has different properties). I store info about users in database - first table(id, login, password), second table(id, info about user 1), third table(id, info about user 2). ID fields in second and third tables are foreign keys to ID field in first table. For each type of user I have a transfer object wich is actually a POJO.
I have a request scoped manged bean that handles the input of login and password and has to define on which page to redirect the user. So in action method of that bean I have to define the type of user and also instantiate a session scoped managed bean for specified type of user. Actually I have designed 2 session scoped beans for each type of user. That beans have such fields: id - id of the user, a few dao objects - for processing database access. Also that beans have such methods as (of course each bean has its own UserDTO) for accessing concrete properties of users.
I've found such solution to instantiate a bean inside other bean's action method:

Actually I can create a constructor of MyBean with parametres and pass the id(which was defined from login and password) of the user to it: . But I think it's a bit tricky way, beacause jsf is a pull-based framework and such solution is from push-based(we mannualy put beans into session).
Is there any other method to instantiate session scoped beans with certain parametres without using jsf specific code?(as one's says: good backing beans have no jsf specific code inside)
Or maybe my design approach for this problem is completly wrong? So advise better approach.

Thanks in advance
12 years ago
JSF