Comments are bellow.

I appreciate all what are you doing guys.

Tnx
Luka

Simon Lessard wrote:


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

    How do you mean see if the value "Hypo-Leasing Kärnten GmbH & Co KG"
    exists in it?


I mean if you log all calls to you getListOfValues method and its return value, does it always contain the value "Hypo-Leasing Kärnten GmbH & Co KG" that selectOneChoice cannot seem to find?
Ok, I get it.
...
Yes it does display everytime as you can see here is the output:

.. listcut
Vinkulant: Hypo Leasing d.o.o.
Vinkulant: Hypo-Leasing Kärnten GmbH & Co KG
Vinkulant: Hypo-Leasing Kroatien d.o.o.
...listcut
Could not find selected item matching value "Hypo-Leasing Kärnten GmbH & Co KG" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=j_id156]
...listcut
Vinkulant: Hypo Leasing d.o.o.
Vinkulant: Hypo-Leasing Kärnten GmbH & Co KG
Vinkulant: Hypo-Leasing Kroatien d.o.o.
... listcut

I've just cut the whole list, but this is the server output.

Simon, can you explain me how one item is selected from the list? Does it compare display names of selectItems or call equal method of selectItems value with value inside selectOneChoice?

    This entry exists in dropdown list of values for rendered ComboBox in
    browser (in source code I can't see if this is the one, because
    itemIndex is not an ID of the Vinkulant object. In database also
    everything is allright.

    I've do some more tests, and now I see that this is an general
    issue for
    this attribute (it means that doesn't work for any value, but I can't
    see whats wrong in compare of ie. NavigationArea selectOneChoice -
    there
    are the same except class type). I'm using trinidad last 8 month
    (before
    I've used ADF Faces) so I'm not newbie in this field, but this last
    project I'm working with trinidad and facelets is killing me.

    So far I've discovered following wired issues:
    - XMLMenuModel ->  has issue with locale, and doAction problem


I don't know about that one since I've been using my own implementation since ADF Faces as well. I guess I should give it a closer look at XMLMenuModel and see how I can add my own model features to it as well as the ProcessModel since I don't know such problems and its has been running in two production systems for more than one year.
There are two post addressing this issue (from me http://www.nabble.com/-Trinidad--XMLMenuModel-bug-tf4322443.html#a12308841 and from Stephen Friedrich http://www.nabble.com/-Trinidad--Bug-in-XMLMenuModel---ItemNode---tf4344401.html#a12376683

I'm also experiencing problems with locale in XMLMenuModel.
http://www.nabble.com/-Trinidad--MenuModel-locale-tf4289964.html#a12212573 this issue was resolved, but it looks like locale value is somewhere cached inside XMLMenuModel framework, because it displays the language that is set as default language, after swiching the locale, complete app change the labels in proper language except navigation links from menu model.


    - Dialog framework -> if an action is called as an method returning
    string "dialog:something" then nothing is happening (no dialog is
    displayed), but if action is 'hardcoded'  "dialog:something" then
    everything works as expected


Ugh... Wasn't that fixed?
not as I know (I've checked this issue if is working 2 weeks ago, but no luck, after that I didn't see any JIRA regarding this issue.

    - bellow mentioned issues with facelets (ok duplicate id is a know
    bug)


I'm not currently, but planning to do so in a very near future, so I cannot comment that statement right now, sorry.
Please don't think that I'm attacking you because of this bugs, I just wanted to share my discovery and summarize my problems at one point.

    - now this wired selectOneChoice issue.


It is, indeed, weird.
The problem is that this is a dangerous bug, because people that works with this app must be carefull editing policy that has vinkulant assigned (user must select right value every time is in edit mode (sessionBean.readOnly), and if he/she forgets, this attribute(data) is lost). So it is a little bit embracing for me.




    I don't know what to think about this. I can't imagine that no one
    else
    is using trinidad as much as I'm and didn't encounter the same
    problems
    (issues), so the only reasonable explanation is that something is
    wrong
    with my "constelaton" of application server (glassfish v2 b50),
    trinidad
    (1.0.3 trunk) and facelets (1.1.12) but what?

    Tnx
    Luka

    Simon Lessard wrote:
    > Odd... I'll think a bit about it, but I don't see what could
    cause the
    > problem then. Can you add a log in your getListOfValues method
    and see
    > if the value "Hypo-Leasing Kärnten GmbH & Co KG" exists in it?
    >
    > As a side note comment though, you could cache the list of
    values for
    > the length of the request (or clear it at some point if you know it
    > changed) to improve performance a bit, as the method might be
    called
    > more than once, but that shouldn't fix your issue though.
    >
    >
    > Regards,
    >
    > ~ Simon
    >
    > On 9/5/07, *Luka Surija* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
    >
    >     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?
    >
    >
    > Some small ones, but none that hindering to my knowledge.
    >
    >     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]>
    >     <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
    >     > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    <mailto:[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> <http://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]>>
    >     >     <mailto:[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]> <mailto: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>>>
    >     >     > <mailto:[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>>
    >     <mailto:[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