10 Replies Latest reply on Sep 4, 2008 3:00 AM by maumau

    rich:inplaceSelect does not display the bean property value

    maumau

      Hi,

      I'm using Seam and don't understand why when I refresh my page the rich:inplaceSelect does not display the value binded to the bean.

      <rich:inplaceSelect id="lstIndustry" label="Industry: " value="#{selectedInd}"
       showControls="false" layout="block" defaultLabel="Please select an Industry">
       <s:selectItems value="#{selectIndList.list}" var="ind"
       label="#{ind.industry}" />
       <s:convertEntity />
      </rich:inplaceSelect>
      


      when I modify the code and set the defaultLabel to "#{selectedInd.industry}" the value displays correctly but when my value is null I can't set a default message.

      What am I doing wrong ?

      Any help is appreciated.

      Sincerely

      Malte Wiskott


        • 1. Re: rich:inplaceSelect does not display the bean property va
          abelevich
          • 2. Re: rich:inplaceSelect does not display the bean property va
            maumau

            Thank you Anton,

            Sincerely

            Malte WISKOTT

            • 3. Re: rich:inplaceSelect does not display the bean property va
              abelevich

              Hi, could you plz provide generated inplaceSelect javascript from you html page. I'm interested in javascript started with new Richfaces.InplaceSelect.

              • 4. Re: rich:inplaceSelect does not display the bean property va
                maumau

                Hi Anton,

                Yes with pleasure, here it is.


                new Richfaces.InplaceSelect(new Richfaces.InplaceSelectList('listsalesform:lstIndustry', 'listParentsalesform:lstIndustry', true,
                Richfaces.InplaceSelect.CLASSES.COMBO_LIST, '200px', '200px', [['Copier','1'] ,['Cordless telephone','2'] ,['Compact Photo printer','0'] ,['Digital Color Press','3'] ,['Duplicator','4'] ,['Facsimile','5'] ,['Inkjet printer','6'] ,['Large format printer','7'] ,['Multifunctional product','8'] ,['Mobile telephone','9'] ,['Page printer','10'] ,['Production Devices','11'] ,['Scanner','12'] ,['Toner Copier-Printer','13'] ,['Wide format copier','14'] ] , null,
                'salesform:lstIndustryinplaceTmpValue', 'shadowsalesform:lstIndustry', 0, 0, '0'),
                'salesform:lstIndustry', 'salesform:lstIndustryinplaceTmpValue',
                'salesform:lstIndustryinplaceValue', 'salesform:lstIndustrytabber',
                {defaultLabel : 'Please select your industry',
                showControls : false,
                editEvent : 'onclick',
                verticalPosition : 'center',
                horizontalPosition : 'right',
                inputWidth : '',
                minInputWidth : '100px',
                maxInputWidth : '200px',
                openOnEdit: true,
                closeOnSelect: true},
                {oneditactivation : null,
                onviewactivation : null,
                oneditactivated : null,
                onviewactivated : function(event){A4J.AJAX.Submit('allbody','salesform',event,{'parameters':{'salesform:j_id47':'salesform:j_id47'} ,'actionUrl':'/isis4/modules/sales/sales.seam','eventsQueue':'eventqueue','oncomplete':function(request,event,data){}} )},
                onchange : null},
                Richfaces.InplaceSelect.CLASSES,
                ['salesform:lstIndustrybar', 'salesform:lstIndustryok', 'salesform:lstIndustrycancel', 'salesform:lstIndustrybuttons', 'salesform:lstIndustrybtns_shadow'], 'salesform:lstIndustryinselArrow');</script></div>Please select your industry</div></td>

                
                Sincerely
                
                Malte Wiskott
                
                ps: had to remove the code tag to have some readable code :-)
                


                • 5. Re: rich:inplaceSelect does not display the bean property va
                  maumau

                  The funny thing is, that when you click to open the selections,
                  the right value is displayed by default...

                  Malte Wiskott

                  • 6. Re: rich:inplaceSelect does not display the bean property va
                    maumau

                    Hi Anton,

                    Was it what you needed ?

                    Sincerely

                    Malte Wiskott

                    • 7. Re: rich:inplaceSelect does not display the bean property va
                      abelevich

                      Hi,

                      Yes thanks, this is exactly what I wanted to seen.

                      In the provided javascript when onviewactivated event occurs A4J.AJAX.Submit function is calling directly, this is not allowed . Try to use a4j:jsFunction for this purpose.

                      May be this help to solve your problem.

                      You could find example here:http://livedemo.exadel.com/richfaces-demo/richfaces/jsFunction.jsf?c=jsFunction

                      • 8. Re: rich:inplaceSelect does not display the bean property va
                        maumau

                        Hi,

                        Thank you for your feed-back, so if I understand you right,
                        I tried to remove the onviewactivated, but it doesn't work either.

                        That's the code I have now.

                        new Richfaces.InplaceSelect(new Richfaces.InplaceSelectList('listsalesform:lstIndustry', 'listParentsalesform:lstIndustry', true,
                        Richfaces.InplaceSelect.CLASSES.COMBO_LIST, '200px', '220px', [['Copier','1'] ,['Cordless telephone','0'] ,['Compact Photo printer','2'] ,['Digital Color Press','3'] ,['Duplicator','4'] ,['Facsimile','5'] ,['Inkjet printer','6'] ,['Large format printer','7'] ,['Multifunctional product','8'] ,['Mobile phone','9'] ,['Page printer','10'] ,['Production Devices','11'] ,['Scanner','12'] ,['toner Copier-Printer','13'] ,['Wide format copier','14'] ] , null,
                        'salesform:lstIndustryinplaceTmpValue', 'shadowsalesform:lstIndustry', 0, 0, '0'),
                        'salesform:lstIndustry', 'salesform:lstIndustryinplaceTmpValue',
                        'salesform:lstIndustryinplaceValue', 'salesform:lstIndustrytabber',
                        {defaultLabel : 'Click to select industry',
                        showControls : false,
                        editEvent : 'onclick',
                        verticalPosition : 'center',
                        horizontalPosition : 'right',
                        inputWidth : '',
                        minInputWidth : '100px',
                        maxInputWidth : '200px',
                        openOnEdit: true,
                        closeOnSelect: true},
                        {oneditactivation : null,
                        onviewactivation : null,
                        oneditactivated : null,
                        onviewactivated : null,
                        onchange : null},
                        Richfaces.InplaceSelect.CLASSES,
                        ['salesform:lstIndustrybar', 'salesform:lstIndustryok', 'salesform:lstIndustrycancel', 'salesform:lstIndustrybuttons', 'salesform:lstIndustrybtns_shadow'], 'salesform:lstIndustryinselArrow');</script></div>Click to select industry</div></td>
                        
                        


                        Thank you Anton

                        Sincerely

                        Malte Wiskott


                        • 9. Re: rich:inplaceSelect does not display the bean property va
                          abelevich

                          Could you send me simple war there this bug reproduced?
                          abelevich@exadel.com

                          • 10. Re: rich:inplaceSelect does not display the bean property va
                            maumau

                            Hi Anton,
                            Thank you, let me just a couple of days time
                            and I send you the war file.

                            Thank you for your help

                            Malte Wiskott