[JBoss Seam] - avoiding excessive bijection question
by X490812
In Michael Yuan's seam book, there is a secion on avoiding excessive bijection.
I have tried to implement this idea in a test app with the following code:
the controller
| @Stateful
| @Name("indexPage")
| @Scope(org.jboss.seam.ScopeType.SESSION)
| public class IndexPageBean implements IndexPage {
|
| @Logger
| private Log log;
|
| @In
| FacesMessages facesMessages;
|
| private Property property;
|
|
| private Borrower borrower;
| .
| .
| .
| public Borrower getBorrower()
| {
| return borrower;
| }
| public void setBorrower(Borrower borrower)
| {
| this.borrower = borrower;
| }
| .
| .
| .
|
the view
| <div id="Borrower">
| <h2>Borrower</h2>
| <form name="BorrowerForm" id="BorrowerForm" jsfc="h:form">
| <div id="ageDiv">
| <label>AGE:
| <input type="text" name="textfield" jsfc="h:inputText" value="#{indexPage.borrower.age}"/>
| </label>
| </div>
| <div id="grossIncomeDiv">
| <label>GROSS:
| <input type="text" name="textfield" jsfc="h:inputText" value="#{indexPage.borrower.grossIncome}"/>
| </label>
| </div>
| <div id="submitBorrower">
| <input type="submit" jsfc="h:commandButton" id="submitBorrowerButton" action="#{indexPage.submitBorrower}" value="Submit" />
| </div>
| </form>
| </div>
| .
| .
| .
|
|
I am getting the error:
anonymous wrote :
| /home.xhtml @16,101 value="#{indexPage.borrower.age}": Bean: org.javassist.tmp.java.lang.Object_$$_javassist_91, property: borrower
|
with a stacktrace of
anonymous wrote :
| javax.faces.el.PropertyNotFoundException: /home.xhtml @16,101 value="#{indexPage.borrower.age}": Bean: org.javassist.tmp.java.lang.Object_$$_javassist_91, property: borrower
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:58)
| at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
|
Why? It seams to be saying that I do not have a borrower property in my controller, yet that is not true. Is it because I must first initialize something? The book gives a very similar example, but I must be missing something.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062172#4062172
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062172
18Â years, 9Â months
[Messaging, JMS & JBossMQ] - Re: Monitoring new connections to a topic
by chris05atm
The subscribe interceptor method was actually my first attempt. I am afraid my first message was not detailed enough in its description.
Using subscribe() my Interceptor will broadcast a message to the topic whenever a client connects. The problem is I guess the message is broadcast before the connecting client starts receiving messages. Every other connected client receives the broadcasted message except the client that caused the subscribe() method to fire.
With a durable connection the connecting client receives the message but on a non-durable connection... the timing seems slightly off and therefore the message is missed by the connecting client.
I am thinking about just adding a timer delay or something but that seems rather hackish. Is there a better means for broadcasting a message and ensuring that connecting client receives the message? Some later method to hook into perhaps?
You've been lots of help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062164#4062164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062164
18Â years, 9Â months