[jboss-user] [JBoss Seam] - Re: When would SEAM 2.0.0 GA and SEAM 2.0.1 GA be released a

2007-09-19 Thread goku2
"[EMAIL PROTECTED]" wrote : Yes, if everybody would work a little more, for 
free of course, the world would be a better place. 
jaja Great quote!
You guys are doing a great job! 
Keep the good work! 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086205#4086205

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4086205
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Performance Tuning] - Re: Best performance monitoring tool for jboss?

2007-09-19 Thread goku2
http://java-source.net/open-source/profilers

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086123#4086123

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4086123
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Attach Entity

2007-09-18 Thread goku2
mcsous, if you specify 


  | @Basic(fetch=FetchType.LAZY)
  | @Column(updatable=false)
  | @Lob
  | private byte[] content; 
  | 

In postgres (al least 8.2) it will map to a Oid column, not a blob.
Cheers


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085795#4085795

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085795
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Attach Entity

2007-09-18 Thread goku2
Add the @Lob annotation


  | @Basic(fetch=FetchType.LAZY)
  | @Column(updatable=false)
  | @Lob
  | private byte[] content; 
  | 



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085687#4085687

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085687
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: PropertyNotFoundException, problem with a EL-attribute

2007-09-18 Thread goku2
Maybe you miss the @Name("client") annotation


  | @Entity
  | @Table(name="CLIENT")
  | @Name("client")
  | public class Client implements Serializable {
  | 
  | 

I look it in a rush, maybe is another thing.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085684#4085684

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085684
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to insert chinese charactors in database with import

2007-09-18 Thread goku2
I have nerver used SLQ Server 2000 but i found this article googling.

http://support.microsoft.com/default.aspx?scid=kb;en-us;232580

Hope it helps

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085487#4085487

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085487
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to insert chinese charactors in database with import

2007-09-17 Thread goku2
Try to save your import.sql file as UTF-8 and make shure your database schema 
is set to utf-8 too.
I think this should work.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085118#4085118

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085118
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam PDF issue

2007-09-17 Thread goku2
Yes, thats the normal thing to do but the deploy task in build.xml provided by 
seam setup doesn't add this jar.
For example
$ ant deploy
Creates a .war in the dist folder and copies the data source xml and this .war 
inside the deploy folder of your jboss as.
The thing is that the .war doesn't contains itext-2.0.x.jar in the lib folder. 

You can solve this adding 

inside the war task in your build.xml

Like this

  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085048#4085048

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085048
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam PDF issue

2007-09-17 Thread goku2
Thsi problem is beacuse the itext-2.0.x.jar is not on the classpath.

Place this file(is inside your project´s lib) inside your JBoss AS 
sever/default/lib folder (if your using the default).
That wil solve the problem.

But the thing is.. is this a simple bug in the build.xml? It should include 
this file in the deployed .war o .ear

:D

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085000#4085000

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085000

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Downloading Files

2007-09-16 Thread goku2
Put this action in some Seam component.



And the action in SomeSeamComponent


  | public void download() {
  |//Here you get the entity that has a byte array with the data
  | SomeEntity entity = getEntityFromEntityManager();
  | 
  | 
  | FacesContext facesContext = FacesContext.getCurrentInstance();
  | HttpServletResponse response = (HttpServletResponse) facesContext
  | .getExternalContext().getResponse();
  | response.setContentType(entity.getContentType());
  | //Asume a data property inside entity
  | byte[] data = entity.getData();
  | response.setContentLength(data.length);
  | response.setHeader("Content-disposition", "inline; filename=\""
  | + entity.getFileName() + "\"");
  | 
  | try {
  | 
  | OutputStream out = response.getOutputStream();
  | 
  | out.write(data);
  | 
  | out.flush();
  | out.close();
  | 
  | facesContext.responseComplete();
  | } catch (IOException ex) {
  | FacesMessages.instance().add(
  | "Error while downloading the file: " + 
entity.getFileName());
  | }
  | 
  | }
  | 
  | 

Cheers

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084868#4084868

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084868
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: cannot start with Seam and JSF and Facelets, that is no

2007-09-14 Thread goku2
Are you sure you have Java 1.5.0_06-b05 installed correctly?
try 
java -version 

and

javac -source 1.5

If you get
javac: invalid source release: 1.5

If because your PATH locates a compiler that doesn't support java 1.5

I think this is the problem because 
[javac] import static org.jboss.seam.ScopeType.SESSION;
[javac]^

The static import is a new feature in JDK 1.5

Hope this helps

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084549#4084549

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084549
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam deployment problem

2007-09-13 Thread goku2
Try this:

1) Shutdown your JBoss AS 4.0.5.GA
2) Delete the folder server/default/tmp/ . It contains deployment info and some 
times creates conflict with entities.
3) Go to your project folder and run:
ant clean
4) Run
ant undeploy
5) Then do the deploy(wit hthe profile you need)
ant deploy 
6) Then start the jboss AS.

This works for me when i have problems with diferent versions of the same 
Component.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084200#4084200

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084200
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam Pros - Need your opinion...Date vs Long

2007-09-13 Thread goku2
Use 
   
 
  | @Basic
  | @Temporal(TemporalType.TIMESTAMP)
  | private Date someDate;
  | 

It will store the timestamp and you could use the date class. I think it can 
work with Calendar too.

If you want the time represented in milliseconds sine the Epoch(1/jan/1970) use 
the method .getTime() from the Date class.

In your .xhtml use 


  | 
  | 
  | 
  | 

to show the date.

Hope this helps

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084050#4084050

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084050
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: inputText / empty string versus NULL

2007-09-13 Thread goku2
Try this

  | public void setField(String field) {
  |   if(field == null) {
  | this.field = null;
  |   } else {
  | if("".equals(field.trim())) {
  |   this.field = field;
  | } else {
  | //you could trim before asignement too. 
  | this.field = field;
  | }
  |   }
  | }
  | 
To eliminate multiple spaces.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084045#4084045

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084045
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Absolute text position with itext and Seam

2007-09-12 Thread goku2
Hi people, i would like to know how to place a text in a absolute position.
For example:





The positionx and positiony are invented but it´s just to have an idea of the 
funcionality i´m looking for.

It would be great if the position is assigned in millimeters.

Thanks in advance

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083442#4083442

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083442

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Usage for downloading uploaded file

2007-07-11 Thread goku2
Hi people! I have a simple problem but i'm a little lost here.

I use


  | 
  | 
to upload a file but i don't know how to make a link to the resource.
The file can be a pdf, a txt, doc, any binay file. 
How can i create a link to download this file?

Thanks!!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063312#4063312

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063312
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Domain model duplicates validation

2007-05-28 Thread goku2
Thanks 4 the reply Fer! 

This works great.
anonymous wrote : 
  | I don't know what exactly you mean with "without mapping that to the 
database"
  | 
Sorry about that. I want to validate this uniqueness in my models. But is also 
great to have then validated in the database to.
But in some weird case where my validation require some kind of twisted logic 
using some properties from the Person entity and all the other entities already 
persisted, is there a clean way to add this logic in the model? Or this is 
conceptually wrong?
I think that using an Staless or Statefull bean for this kind of validation may 
mix up the controller with the model.

Pleas correct me. 

The validation you gave me works great. The only complain is that a get some 
error logs about:

  | 10:36:54,795 ERROR [JDBCExceptionReporter] ERROR: duplicate key violates 
unique constraint "person_name_key"
  | 10:36:54,795 ERROR [AbstractFlushingEventListener] Could not synchronize 
database state with session
  | org.hibernate.exception.ConstraintViolationException: Could not execute 
JDBC batch update
  | at 
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
  | at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  | 

Which is a little annoying :) 

Thanks again

Hey, i'm your neighbor! From Paraguay :D



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049060#4049060

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049060
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Domain model duplicates validation

2007-05-26 Thread goku2
If a have a entity like this(is just an example :D)


  | @Entity
  | @Name("person")
  | public class Person implements Serializable {
  | private Long id;
  | private String firstName;
  | private String lastName;
  | private int age;
  | 
  | @Id
  | @GeneratedValue
  | public Long getId() {
  | return id;
  | }
  | 
  | public void setId(Long id) {
  | this.id = id;
  | }
  | 
  | @NotNull
  | @Length(max=50)
  | public String getFirstName() {
  | return firstName;
  | }
  | 
  | public void setFirstName(String firstName) {
  | this.firstName = firstName;
  | }
  | 
  | @NotNull
  | @Length(max=50)
  | public String getLastName() {
  | return lastName;
  | }
  | 
  | public void setLastName(String lastName) {
  | this.lastName = lastName;
  | }
  | 
  | @Min(0)
  | public int getAge() {
  | return age;
  | }
  | 
  | public void setAge(int age) {
  | this.age = age;
  | }
  | }
  | 

And i would like to know how can i create a validation method telling seam to 
use the firstName and the lastName as a compound id for the entity without 
mapping that to the database?
I want to use the id property as the id for the mapping but the logic has to be 
in a method. If this logic is in a @PrePersist annotates method i can only 
compare the entity properties but not compare them with the persisted ones.

I would like to know how can i compare if there is an existent entity in the 
data source like the one i'm trying to persist. Maybe i have to override the 
equals method?
At witch layer do i have to do this validation rule? It would be ideal to have 
that logic in the domain model and not have it in some stateless or statefull 
bean.

Thanks in advance

Humber

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048860#4048860

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048860
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: jBPM books

2007-05-25 Thread goku2
look at this for jboss seam in general. And 3 chapters about jBPM integration 
and usage with seam.
http://www.michaelyuan.com/blog/seam-next-gen-web-framework/

Great book! Recommended 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048731#4048731

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048731
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user