[jboss-user] [JBoss Seam] - bijection question - value could not be converted to the exp

X490812 do-not-reply at jboss.com
Mon Jul 9 19:52:42 EDT 2007


I am almost done evaluating seam - bijection is cool. However, I am trying to avoid it. What is its value if we have getter/setter introspection?. In any case, here is my issue:

controller - the below getters and setters are also in the interface

  | @Stateful
  | @Name("indexPage")
  | @Scope(org.jboss.seam.ScopeType.SESSION)
  | public class IndexPageBean implements IndexPage {
  | 
  | 	@Logger
  | 	private Log log;
  | 
  | 	@In
  | 	FacesMessages facesMessages;
  | 
  | 	private LoanApplication loanApplication;
  | .
  | .
  |         public LoanApplication getLoanApplication()
  | 	{
  | 		return loanApplication;
  | 	}
  | 	public void setLoanApplication(LoanApplication loanApplication)
  | 	{
  | 		this.loanApplication = loanApplication;
  | 	}
  | 

view

  |       <form name="BorrowerForm" id="BorrowerForm" jsfc="h:form">
  | 		<div id="ageDiv">
  | 		  <label>AGE:
  |           <input type="text" name="textfield" jsfc="h:inputText" value="#{indexPage.loanApplication.borrower.age}"/>
  | 		  </label>
  | 		</div>
  | 		<div id="grossIncomeDiv">
  | 		<label>GROSS:
  | 		<input type="text" name="textfield" jsfc="h:inputText" value="#{indexPage.loanApplication.borrower.grossIncome}"/>		  
  | 		  </label>
  | 		</div>
  | 		<div id="submitBorrower">
  | 			<input type="submit" jsfc="h:commandButton" id="submitBorrowerButton" action="#{indexPage.submitBorrower}" value="Submit" />
  | 		</div>
  | 	</form>
  | 

model

  | @Entity
  | @Name("LoanApplication")
  | //could have @table annotation here to specify which table to map to
  | public class LoanApplication {
  | 	
  | 	//RELATIONSHIPS
  | 	private Borrower borrower = new Borrower();
  | 	private Property property = new Property();
  | .
  | .
  |     @OneToOne
  |     // If name parm is ommitted, then assumed to be fieldName_reference PK, i.e. borrower_id
  | 	// If referencedColumn ommitted, assumed to be the referenced PK, i.E. Borrower.Id, i.e. Id
  | 	@JoinColumn(name="BorrowerId", referencedColumnName="Id", updatable=false, insertable=false)
  | 	public Borrower getBorrower()
  | 	{
  | 		return borrower;
  | 	}
  | 	public void setBorrower(Borrower borrower)
  | 	{
  | 		this.borrower = borrower;
  | 	}
  | 

  | @Entity
  | @Name("Borrower")
  | public class Borrower {
  |     private int Id;
  | 	private int age;
  | 	private BigDecimal AffordableLoanAmount;
  | 	private BigDecimal grossIncome;
  | .
  | .
  | getters/setters
  | 


ERROR - comes from h:messages tag after submitting borrower form

anonymous wrote : 
  |     * value could not be converted to the expected type
  |     * value could not be converted to the expected type
  | 

Why the above errors?

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

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



More information about the jboss-user mailing list