[jboss-user] [JBoss Seam] - Seems to be a bug
KoniKoni
do-not-reply at jboss.com
Fri Apr 20 18:26:45 EDT 2007
Environment jboss as 4.2.0CR2, seam 1.2.1 cvs today.
Value of selectOneMenu will not be set:
1.
| @In(required=false)
| @Out(required=false)
| private Kfz kfz;
|
| @DataModel
| private List<Kfz> bearbkfzList;
|
| @Begin(join=true)
| public String searchKfz(){
|
| currentPage=0;
| if ( ! bid.equals("") ){
| try{
| lid = Long.parseLong(bid);
| }catch(NumberFormatException ex){
| facesMessages.add("FNr ist keine Ziffer!");
| return "null";
| }
| }else{
| lid = 0L;
| }
| updateResults();
| if ((bearbkfzList == null) || (bearbkfzList.isEmpty()) ){
| facesMessages.add("Keine Treffer");
| return "null";
| }
|
| return "/kfzresultbearb";
| }
|
2.From kfzresultbearb
@DataModelSelection("bearbkfzList")
| Kfz selectedKfz;
|
| public String editKfz() {
| kfz = selectedKfz;
| return "/editkfz";
| }
|
Than to follow view
<h:form>
| <rich:panel>
| <h:panelGroup id="frms">
| <h:panelGrid columns="2">
| <h:outputText value="FNr: "/> <h:outputText value="#{kfz.id}"/>
| </h:panelGrid>
| <h:panelGrid columns="3">
| <h:outputText value="Fabrikat: "/>
| <h:panelGroup style="display:block">
| <a4j:region renderRegionOnly="false">
| <h:selectOneMenu id="hrs23" value="#{kfz.hersteller}" required="true">
| <s:convertEntity />
| <s:selectItems value="#{hListe.resultList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| <a4j:support event="onchange"
| reRender="modelsel" />
| </h:selectOneMenu>
|
| </a4j:region>
| </h:panelGroup>
| <h:message for="hrs23" />
<framework:entity-query name="hListe" ejbql="select h from Hersteller h" />
All take place in a session statefull bean
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039455#4039455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039455
More information about the jboss-user
mailing list