[JBoss Seam] - Re: iText (PDF) support in Seam
by elponderador
I agree with the templates idea, a case where you have forms provided to you or you create one and then need to fill it in, to save the user time.
I am not sure about overlays, but I have built a component set based off of the ITextComponent class that uses the PdfContentByte more extensivly. I have color, shape, line, style, text, column and image components all based off the ItextComponent but using direct content for everything, which comes in handy when you want more control over where and how things are displayed. I would like to commit the stuff I have and contribute it, but I have not yet gotten a response on my contributors agreement. Anyways I vote for such functionality if it has not been already started in the back ground and will be glad to contribute what I have once I can if norman.richards thinks its a good idea.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122743#4122743
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122743
18 years, 6 months
[JBoss Seam] - Re: Displaying dataTable row numbers with uiComponent, what
by Oberiko
I've tried without the <h:output /> (so that it looked exactly as the demo) and had the same result.
Nothing special about person, it's a fairly standard basic entity bean:
| package org.domain.myProject.entity;
|
| import java.util.ArrayList;
| import java.util.Collection;
|
| import javax.persistence.CascadeType;
| import javax.persistence.Entity;
| import javax.persistence.GeneratedValue;
| import javax.persistence.Id;
| import javax.persistence.OneToMany;
|
| import org.hibernate.validator.NotNull;
| import org.jboss.seam.annotations.Name;
|
| @Entity
| @Name("person")
| public class Person {
|
| @Id @GeneratedValue
| private Long id;
|
| @NotNull
| private String name;
|
| @OneToMany(cascade = CascadeType.ALL, mappedBy="person")
| private Collection<EmailAddress> emailAddresses;
|
| public Long getId() {return id;}
| public void setId(Long id) {this.id = id;}
|
| public String getName() {return name;}
| public void setName(String name) {this.name = name;}
|
| public Collection<EmailAddress> getEmailAddresses() {
| return emailAddresses;
| }
| public void setEmailAddresses(Collection<EmailAddress> emailAddresses) {
| this.emailAddresses = emailAddresses;
| }
| public void addEmailAddress(EmailAddress email){
| if (emailAddresses == null) emailAddresses= new ArrayList<EmailAddress>();
| email.setPerson(this);
| emailAddresses.add(email);
| }
| public void removeEmailAddress(EmailAddress emailAddress){
| if (emailAddresses != null){
| emailAddresses.remove(emailAddress);
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122741#4122741
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122741
18 years, 6 months
[JBoss Seam] - Value is not Valid with <s:entityConverter and equals and ha
by franck93
hi
After submitting a form for saving a "Dossier", I'm getting the jsf validation error "value is not valid" for the value "Paiement" selected from a dropdown list .
For that dropdown list i used the seam entity converter.
i overrid the methods equals and hashcode for the entity (Paiement) that is to be displayed in the dropdownlist.
i checked the html generated by seam for the dropdownlist and the values are correct. they match the primary key (Paiement.id)
Any idea of what's going wrong? Below i copied some code to make it clearer.
Dossier
| public class Dossiers implements java.io.Serializable {
|
| private Integer dosId;
|
|
|
| private Paiement paiement;
|
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "pai_id", nullable = false)
| @NotNull
| public Paiement getPaiement() {
| return this.paiement;
| }
|
| public void setPaiement(Paiement paiement) {
| this.paiement = paiement;
| }
|
|
Paiement :
| @Override
| public boolean equals(Object obj) {
| if (!(obj != null && obj instanceof Paiement))
| return false;
| Paiement ct = (Paiement) obj;
| if (paiId.equals(ct.paiId))
| return true;
| return false;
| }
|
| @Override
| public int hashCode() {
| return paiId==null ? 0 : paiId.hashCode();
| }
|
|
the view
| <h:selectOneMenu value="#{dossier.paiement}" id="paiement" layout="pageDirection" styleClass="radio" required="true" >
| <s:selectItems value="#{referential.listePaiements}" var="paiement" label="#{paiement.libelles[langUser].libLib}"/>
| <s:convertEntity/>
| </h:selectOneMenu>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122740#4122740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122740
18 years, 6 months