[jboss-user] [JBoss Seam] - How to validate only if the user entered a string

2008-01-12 Thread chrismalan
In the User entity bean an e-mail address is validated using @Email. It works fine, but the user should also be allowed not to enter anything in this field. The field is not annotated with @NotNull and the default in the database is null for this field. However, Seam wants a value there.

[jboss-user] [JBoss Seam] - Re: How to validate only if the user entered a string

2008-01-12 Thread chrismalan
Hi Tynor, Seam 1.2.0GA and JBoss-4.2.0. I downloaded hibernate validator 3.0.0 and will now use that. Thanks very much. Chris View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4119387#4119387 Reply to the post :

[jboss-user] [JBoss Seam] - Re: selectOneMenu - NullPointerException

2007-11-20 Thread chrismalan
I don't know if I have a Seam Managed Persistence Context in my components.xml. I'm mailing this from work. But I at last did get s:selectItems to work. What did the trick was that every @entity that is used as a source for s:selectItems must implement a boolean equals(Object obj) and an int

[jboss-user] [JBoss Seam] - Re: null injected values

2007-11-10 Thread chrismalan
These conversation scoped variables you are injecting should have non null objects backing them. They should be outjected from one of your action beans (session beans). Create a @Factory method in the relevant bean where you outject them to make sure they don't have null values. When you

[jboss-user] [JBoss Seam] - org.hibernate.HibernateException: identifier of an instance

2007-11-09 Thread chrismalan
This is the set-up: a document belongs to a category. Category is a class with an ID (Integer - auto generated), a name and a description. One category can have many documents. A data table of documents is displayed. The category is in a selectOne and the name is displayed. This is what it

[jboss-user] [JBoss Seam] - Can s:selectItems work in this scenario?

2007-08-07 Thread chrismalan
As I am still new to Seam (read the book twice, looked at a lot of the docs and examples), I decided to build an application to get my feet wet. The application is based on the hotel booking demo, but quite different. One by one the problems have yielded, sometimes not without spirited

[jboss-user] [JBoss Seam] - Dynamically sized pop-up window

2007-07-31 Thread chrismalan
Any idea how to implement a pop-up window just big enough for an image? I don't know what size images are going to be uploaded. This is how I've done the pop-up, and it works: pages.xml | page view-id=/search.xhtml | navigation from-action=#{searchSessionBean.setPhoto} |

[jboss-user] [JBoss Seam] - Re: How do I upgrade my Seam version?

2007-07-31 Thread chrismalan
Just download the version you want and unpack it. Then use the jars (jboss-seam.jar, etc.) in its root directory in your application instead of your older seam version jars. If you need any of the jars in the /lib directory on your classpath, use them instead of others with the same name you

[jboss-user] [JBoss Seam] - Re: s:fileUpload woes

2007-07-25 Thread chrismalan
Got it. formdata should be form-data. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4067312#4067312 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4067312 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Re: s:fileUpload woes

2007-07-19 Thread chrismalan
Hi Markus, Yes, it's there. Only, I called it Seam Filter and not Seam Multipart Filter. I changed the name, moved it up in web.xml - no luck. A simple text input get its value propagated to the session bean. The file upload input is totally invisible to the application. As far as I'm

[jboss-user] [JBoss Seam] - s:fileUpload woes

2007-07-18 Thread chrismalan
s:fileUpload doesn't work for me. Here is what I have: Seam 1.2.1.GA, JBoss-4.2.0. I use xhtml, not jsp's. In the ear I have jboss-seam.jar and in WEB-INF/lib jboss-seam-ui.jar, jboss-seam-debug.jar and jsf-facelets.jar. This is what is in web.xml: | listener |

[jboss-user] [JBoss Seam] - option values generated by s:selectItems

2007-07-02 Thread chrismalan
The following html is generated: option value=0admin/option | option value=1manager/option | option value=2user/option It should be this: option value=adminadmin/option | option value=managermanager/option | option value=useruser/option This comes from the Role class which has an @Id

[jboss-user] [JBoss Seam] - Re: Function 's:hasRole' not found

2007-06-27 Thread chrismalan
So far nothing helps. The problem only arises when I perform an action from a xhtml page containing #{s:hasRole(... When I log in from another page and then request the offending page via the browser address field, everything is fine. The links are correctly rendered according to the role of

[jboss-user] [JBoss Seam] - Re: Function 's:hasRole' not found

2007-06-24 Thread chrismalan
Hi Gavin, Facelets. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4057175#4057175 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057175 ___ jboss-user mailing list

[jboss-user] [JBoss Seam] - Re: Function 's:hasRole' not found

2007-06-24 Thread chrismalan
Hi Shane, I downloaded 1.3.0 and tried. That caused a whole new universe of problems. If I remove jboss-seam.jar from the ear and copy it to $JBOSS_HOME/server/default/lib everything works well. The only problem was s:link value=User Go Home view=home.xhtml rendered=#{s:hasRole('user')} /

[jboss-user] [JBoss Seam] - Re: Function 's:hasRole' not found

2007-06-22 Thread chrismalan
In addition to the above, the stack trace in the console window gives the following information not found in the Seam window: | 15:54:29,481 ERROR [STDERR] java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.security.SecurityFunctions | 15:54:29,481 ERROR [STDERR]

[jboss-user] [JBoss Seam] - Function 's:hasRole' not found

2007-06-21 Thread chrismalan
Here is a bit more of the stack trace: | javax.faces.FacesException: javax.el.ELException: /login.xhtml @36,93 rendered=#{s:hasRole('manager')}: | Function 's:hasRole' not found | at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:373) | at

[jboss-user] [JBoss Seam] - Re: Function 's:hasRole' not found

2007-06-21 Thread chrismalan
PS I am using Seam 1.2.1 on JBoss-4.2.0 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056727#4056727 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056727 ___ jboss-user mailing

[jboss-user] [EJB 3.0] - Cannot find a suitable constructor

2007-02-25 Thread chrismalan
I have a custom util class called LessonView. It looks like this: public class LessonView{ | private String subject; | private int year, count; | | public LessonView(){} | | public LessonView(String subject, int year, int count){ | sets the variables via setters | } | |

[jboss-user] [EJB 3.0] - Re: How can I use a EJB Query with this?

2007-02-25 Thread chrismalan
Hi Dornus, There are two solutions I can think of. The first side-steps an EJB query. One of class A's attributes will be a collections of some sort of class B. Simply get an instance of class A by primary key, get an instance of the collection of Bs and do a bees.size(). The second is to

[jboss-user] [Installation, Configuration Deployment] - Re: Class not found

2006-12-28 Thread chrismalan
Hi Peter, Thanks for your answer. Clear, unambiguous and easy to implement. I like them that way. ;-) Yes, I am running Gentoo. I am just finished updating everything - new gcc (4.1), new kernel (2.6.18), new KDE (3.5.5) and new everything else, including JDK. When I do date on the

[jboss-user] [Installation, Configuration Deployment] - Re: Class not found

2006-12-28 Thread chrismalan
Hi Peter, Here is the solution to the java time problem in Linux. I added one line to my JBoss start-up script and that does it. Here is the whole start-up script: #!/bin/bash | export JBOSS_HOME=/usr/local/jboss-4.0.4.GA | export JAVA_OPTS=-Duser.timezone=Australia/Sydney |

[jboss-user] [Installation, Configuration Deployment] - Class not found

2006-12-27 Thread chrismalan
There is a utility class (UsernamePasswordHandler) in the war container. It is used for log-ins. When instantiated from any class in the war container, things are fine. However, when the only class in the jar container that needs it tries to instantiate it, a java.lang.NoClassDefFoundError

[jboss-user] [JBoss Seam] - Re: Mapping between form field and database fields

2006-12-21 Thread chrismalan
Thanks for the replies. I thought about three fields because there are so many ways to enter dates; 2006-12-22, 22/12/06, 22-12-2006, etc. Of course, with the examples given one can find the right date in some instances. 6-9-06 is harder to figure out. Each field clearly labeled as day,

[jboss-user] [JBoss Seam] - Mapping between form field and database fields

2006-12-20 Thread chrismalan
I'm new to Seam. After reading some of the documentation and looking at the examples I'm left with one question. Searches of the forum provide no answer. One html form field in Seam seems to map to one attribute in a POJO which in turn seems to map to one field in a database. Now say I want

[jboss-user] [Installation, Configuration Deployment] - Re: Got NoClassDefFoundError when deployed to production ser

2006-11-09 Thread chrismalan
Hi Kingcu, Which class is not found? All I can recommend is a step by step drill-down to find the problem. 1)Get the name of the specific class not found, e.g., xyz.dkl.Wonderful.class 2)Find out in which jar this class is 3)Make sure that jar is on your classpath at the production server

[jboss-user] [Installation, Configuration Deployment] - Re:

2006-10-12 Thread chrismalan
This is a long shot: does whoever starts JBoss have permissions to write to all the directories in and under JBOSS_HOME? I also vaguely remember there was an issue with the IP Address assigned to the machine that should be referred to somewhere. Why use such an old JBoss? View the original

[jboss-user] [EJB 3.0] - Re: List in EJB3 Entity:

2006-10-12 Thread chrismalan
Make both your List and long[] transient by annotating them as such. You will not be able to persist them in the database, but can use them inside your SimpleEntity class. Do not try to do too much in a persistence pojo. It is mainly, as the name says, an entity to persist. View the

[jboss-user] [Installation, Configuration Deployment] - Re:

2006-10-12 Thread chrismalan
http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigurePorts will show you which services use which ports. Looking at your exceptions again, it seems your problems start with classes in subpackages of com.appiancorp.asl3.runtimefw.rta To the best of my knowledge this is not part of JBoss. It

[jboss-user] [Installation, Configuration Deployment] - Re: Access Logging

2006-09-16 Thread chrismalan
I've narrowed it down a bit. When entering the IP address to go to the JBoss Console, all access requests are logged. It must be because of the virtual host created in jboss-web.xml. I've looked at the Tomcat Access Log Valve documentation - not a word on virtual hosts or anything else that

[jboss-user] [Installation, Configuration Deployment] - Re: Access Loggin

2006-09-16 Thread chrismalan
Found the solution in the Wiki pages virtual host how-to. Basically, it consists of a few more entries in server.xml. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3972132#3972132 Reply to the post :