Piotr Cierny

Greenhorn
+ Follow
since Jul 21, 2008
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Piotr Cierny

Well i use dictionary table where every name value is unique and so this column can be used as primary key.
Besides if i use id as pk, column name will be repeated many times (when joining) what i think is not a very nice solution.

I still don`t know if hibernate will assign my string name value taken from bean to pk and if there are any joins to fk column (I`m rookie in hibernate). But if so than i don`t have to worry about generation because the only way to add new name is through WEB UI.
I don`t have any exceptions because i`m on DB project stage.

So you`re saying that if have dictionary table say with two unique names (john, mike) and name column is my PK i don`t have to worry about inserting and updating becasue hibernate will insert the value of name taken form Bean to the PK column in my DB and to FK column (if there are any joins)

I this right?
Hi,
I have a table with primary key which is a string.
How should mapping for such id look like?

<id name="name" column="name" type="string">
</id>

Is this enough or the id element should have <generator class="assigned"/>?
If so what does it mean that id is assigned, hibernate won`t insert id when creating a new object or maybe it won`t insert it to join table fk column and i have to do it my self.

Any help will be appreciated
I fixed the problem by adding locale="#{facesContext.viewRoot.locale}" to f:view tag.

But could anyone explain me why this does`t work without specifying the locale in the view tag?

Shouldn`t the fmt:setLocale tag set locale for jstl tags only using parameter given in URL
12 years ago
JSF
This is my first post. Sorry for bad code. here is a good one.

welcome.jsp


User.java


faces-config.xml
12 years ago
JSF
I have created a simple application that uses 2 languages - english and polish. I want to set locale with html link for myfaces and jstl tags.
The problem is that when i press the link, it only changes the messages outputed by jsf tags. The jstl messages remain unchanged.
The locale is changing (checked with c:out) but messages aren`t.
The funniest thing happends when i change language to english and check the chceckbox - All messages change to english and the jstl locale variable is emptied (c:out doesn`t write anything out).

This example worked with jsf1.1.5 but it doesn`t work with jsf 1.2.
Can any one tell me why??

I enclose the code of this example:
welcome.jsp


User.java


faces-config.xml


I`ve tried to download new jstl.jar and standard.jar, add tlds and declarations in web.xml but it didn`t help.

If anyone knows answer to this mystery please help.
12 years ago
JSF