[jboss-user] [Beginner's Corner] - Re: OneToOne could be null
swenu
do-not-reply at jboss.com
Fri Nov 20 06:20:33 EST 2009
Hi Wolfgang
Sorry long time ago i've posted!
I have a person which i can edit and this person could be assigend to a compnay.
But this assignment is optional!
Here's the code for the selection
<s:decorate id="companyField" template="layout/edit.xhtml">
| <ui:define name="label">Firma</ui:define>
| <h:panelGrid columns="3" border="0" cellpadding="0" cellspacing="0">
| <h:inputText id="companySelection" converter="#{companyConverter}" value="#{personHome.instance.company}" required="false"/>
| <h:graphicImage value="img/arrow.png"
| onclick="#{rich:element('companySelection')}.value = '';#{rich:component('suggestion')}.callSuggestion(true)"
| alt="call company list" />
| <a4j:outputPanel id="companyEdit">
| <s:link view="/companyList.xhtml" id="companyLink"
| value="#{personHome.instance.company.name} bearbeiten" propagation="none"
| rendered="#{personHome.instance.company.id > 0}">
| <f:param name="companyId" value="#{personHome.instance.company.id}" />
| </s:link>
| </a4j:outputPanel>
| <rich:suggestionbox id="suggestion" for="companySelection" suggestionAction="#{companyBean.autocomplete}" var="_c" ajaxSingle="true">
| <a4j:support event="onselect" reRender="companyEdit,companyAddress">
| <f:param name="companyId" value="#{_c.id}" />
| <f:param name="company" value="#{_c}" />
| </a4j:support>
| <h:column>
| #{_c}
| </h:column>
| </rich:suggestionbox>
| </h:panelGrid>
| </s:decorate>
Yes i got @Transient annotation used within person.java
Thanks for you advice
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266722#4266722
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266722
More information about the jboss-user
mailing list