You didn't have an <h:form/>?  Man!  your bug was driving me crazy
there.  I'm glad it finally got resolved.  That explains everything!

I'm going to start a new topic for this problem, to bring light to
problems like it.


On Sun, 20 Mar 2005 17:29:54 +0100, Bruno Aranda <[EMAIL PROTECTED]> wrote:
> I don't know Kostas... have you tried a valueChangeListener to see if
> selection is changing? You might try also with an empty jsp with the
> selectManyCheckbox in the page (including the form tags, I always
> forget them too ;-)) to see if there is no interference with other
> elements...
> 
> Good luck,
> 
> Bruno
> 
> On Sun, 20 Mar 2005 13:59:46 +0000, Kostas Karadamoglou
> <[EMAIL PROTECTED]> wrote:
> > Yes Bruno That was my mistake!!!!
> > Now it works, but only for selectOneMenu
> >
> > but not for selectManyCheckBox or selectManyList
> > my selectManyCheckBox has the following decleration:
> >
> > <h:form>
> > <h:selectManyCheckbox converter="#{categoryConverter}"
> > value="#{userHandler.regCategories}">
> >                    <f:selectItems value="#{eventHandler.categories}"/>
> >                </h:selectManyCheckbox>>
> > </h:form>
> >
> > the userHandler.regCategories is of type List
> > Do you have any idea why it does not work in the "many" mode?
> >
> > thank you in advance, Kostas
> >
> > Bruno Aranda wrote:
> >
> > >Hi Kostas,
> > >
> > >Are your <h:form> tags included in the jsp file?
> > >
> > >Bruno
> > >
> > >
> > >On Sat, 19 Mar 2005 14:56:36 +0000, Kostas Karadamoglou
> > ><[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >>I have also done this. String and then parse it. But it doesn't work. I
> > >>am afraid that the problem is of MyFaces or
> > >>of wrong configuration :-(
> > >>
> > >>Slawek wrote:
> > >>
> > >>
> > >>
> > >>>i have never tried int and Interer
> > >>>but i have tried int and String witht the same result as You
> > >>>
> > >>>now im using String and String - current selection is ok
> > >>>maybe try Integer and Integer
> > >>>if doesnt help just use String and String + Integer.parseInt() :P
> > >>>
> > >>>
> > >>>Slawek
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>><[EMAIL PROTECTED]> napisaÅ:
> > >>>
> > >>>
> > >>>
> > >>>>Hi again!
> > >>>>
> > >>>>I have a problem with SelectOneMenu, JSF does not set the current
> > >>>>selection of the user.
> > >>>>this is the jsf tags that I use:
> > >>>>
> > >>>><h:selectOneMenu id="selectCategory"
> > >>>>value="#{eventHandler.selectedCategory}">
> > >>>>        <f:selectItems id="allCategories"
> > >>>>value="#{eventHandler.allCategories}"/>
> > >>>></h:selectOneMenu>
> > >>>>
> > >>>>the allCategories returns a list of selectItems which contain
> > >>>>java.lang.Integer as object. The
> > >>>>selectedCategory is of type int.
> > >>>>
> > >>>>While I was debugging the application I 've noticed that JSF does not
> > >>>>invoke the setter of
> > >>>>selectedCategory.
> > >>>>
> > >>>>Do you know how canI solve this problem?
> > >>>>
> > >>>>Below I have the getter for each property in the above jsf tags:
> > >>>>
> > >>>>    public int getSelectedCategory() {
> > >>>>        return selectedCategory;
> > >>>>    }
> > >>>>
> > >>>>    public void setSelectedCategory(int selectedCategory) {
> > >>>>        this.selectedCategory = selectedCategory;
> > >>>>    }
> > >>>>
> > >>>>    public List getAllCategories(){
> > >>>>        if(this.allCategories==null){
> > >>>>            this.allCategories=new ArrayList();
> > >>>>            this.allCategories.add(new
> > >>>>SelectItem(converter.getAsInteger(new Category()),"Choose a
> > >>>>category..."));
> > >>>>            List categories=this.eventRegistry.getCategories();
> > >>>>            for(Iterator iter=categories.iterator(); iter.hasNext();){
> > >>>>                Category category=(Category)iter.next();
> > >>>>                this.allCategories.add(new
> > >>>>SelectItem(converter.getAsInteger(category), category.getTitle()));
> > >>>>            }
> > >>>>        }
> > >>>>        return this.allCategories;
> > >>>>    }
> > >>>>
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
> 


-- 
-Heath Borders-Wing
[EMAIL PROTECTED]

Reply via email to