isInserting is stable. It is used in another part of application, and has nothing to do with this part (it is always false). No luck with valuePassThru. It is really funny because 3 lines before in the same xhtml I have this code snippet and it's working correctly as expected:

<tr:selectOneChoice readOnly="#{sessionBean.readOnly}" label="Podrucje plovidbe:" value="#{objectBean.navigationArea}" > <f:selectItems value="#{AdminMB.navigationArea.navigationAreasSelectItem}" />
</tr:selectOneChoice>

AdminMB.navigationArea.navigationAreasSelectItem:
   public SelectItem[] getNavigationAreasSelectItem(){
       List<NavigationArea> lc=getNavigationAreas();
       SelectItem si[]=new SelectItem[lc.size()];
       int i=0;
       for(NavigationArea c:lc){
           si[i++]=new SelectItem(c,c.getNameHR());
       }
       return si;
   }

   public List<NavigationArea> getNavigationAreas() {
List<NavigationArea> nal=em.createQuery("select c from NavigationArea c order by c.nameHR").getResultList();
       if(isInserting())
           nal.add(0,getNavigationArea());
       return nal;
   }
-----------------------------------------------------------------
AbstractPolicy - class where value is holded (objectBean in xhtml):

public NavigationArea getNavigationArea() {
       return navigationArea
}

public void setNavigationArea(NavigationArea navigationArea {
       this.navigationArea = navigationArea;
}

---------------------------------------------------------

Is there any possibility that there are some issues with facelets and what is recommended version (I'm working with 1.1.12). I've also noticed following issues with facelets:

- duplicate id in tr:showDetail after expanding
- from time to time (unreproducible for me) ui:param inside ui:include is not assigned. Example:
<ui:include src="my.xhtml">
   <ui:param name="objectBean" value="#{ManagedBean.myObject}" />
</ui:include>

Sometime objectBean is null inside my.xhtml, but ManagedBean.myObject is not ?!

So is there any other know issue between facelets and trinidad?

Regards,
Luka

Simon Lessard wrote:
Hello Luka,

Is the method isInserting() stable? Is it possible that it returns false on postback? Also, you cna try setting the valuePassThru attribute of the selectOneMenu to true to see if it helps.


Regards,

~ Simon

On 9/5/07, *Luka Surija* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I'm not so sure about this. Here is my code:


    --- xhtml code snippet:

    <tr:selectOneChoice readOnly="#{sessionBean.readOnly}"
    label="Vinkulacija:" value="#{objectBean.vinkulant }"
    unselectedLabel="--- Bez vinkulacije ---" >
                            <f:selectItems
    value="#{AdminMB.vinkulant.vinkulantsSelectItem}" />
    </tr:selectOneChoice>

    AdminMB.vinkulant.vinkulantsSelectItem (managed bean for selectItems):

    public SelectItem[] getVinkulantsSelectItem(){
            List<Vinkulant> lc=getVinkulants();
            SelectItem si[]=new SelectItem[lc.size()];
            int i=0;
            for(Vinkulant c:lc){
                si[i++]=new SelectItem(c,c.getName());
            }
            return si;
        }

        public List<Vinkulant> getVinkulants() {
            List<Vinkulant> cl=em.createQuery("select c from Vinkulant c
    order by c.name <http://c.name>").getResultList();
            if(isInserting())
                cl.add(0,getVinkulant());
            return cl;
        }

    -----------------------------------------------------------------
    AbstractPolicy - class where value is holded (objectBean in xhtml):

    public Vinkulant getVinkulant() {
            return vinkulant;
    }

    public void setVinkulant(Vinkulant vinkulant) {
            this.vinkulant = vinkulant;
    }

    ---------------------------------------------------------

    I'm sure that the value is properly stored (visible on other places).
    The problem is that only this tr:selectOneChoice for this data isn't
    showing correctly (if value is null then nothing is displayed as value
    in this component and if is there any value then the warning message
    logged on server and unselectedLabel is displayed), all other
    selectOneChoice (more then 20) in this form are working properly.



    Simon Lessard wrote:
    > Hello Luka,
    >
    > This is not a component bug, most likely an application one (true
    > component bugs rarely log a warning, they more often throw an
    > exception or, at worst, don't print anything at all).
    >
    > The error you have occurs when the list of value either cannot be
    > restored or changed during the postback, thus preventing the
    component
    > to identify what value was selected by the user. If you could
    provide
    > the code snippet from your page that uses the selectOneMenu as
    well as
    > the managed bean code that provide the list of values (and its
    scope),
    > I would probably be able to suggest you a solution.
    >
    >
    > Regards,
    >
    > ~ Simon
    >
    > On 9/5/07, *Luka Surija* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
    >
    >     I've found out that tr:selectOneChoice isn't working
    properly in some
    >     cases (probably German characters):
    >
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer

    >
    >     Hypo-Leasing Kärnten GmbH & Co
    >     KG;CoreSelectOneChoice[UIXEditableFacesBeanImpl,
> id=j_id156];_RequestID=552df7f7-a8b8-4887-a77b-8b3f864c0b01;|Could not
    >     find selected item matching value "Hypo-Leasing Kärnten GmbH
    & Co
    >     KG" in
    >     CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=j_id156]|#]
    >
    >
    >     This is very serious bug because every time someone edit
    some data
    >     where
    >     is this selectOneChoice, after saving, data is lost.
    >
    >



Reply via email to