I'm not sure whether "advertisementCategoryDataAction.componentList"
is a collection of string or not. but I guess
selectedAdvertisement.title is a String.
Probably you've bound the selectItems tag lib to a collection of
object and the selectOneMenu to a String. So there is an
incompatibility in types.
I suppose that advertisementCategoryDataAction.componentList is a
collection of YourComponent class which has a member called title. You
must override the equals method and compare the input argument with
this.title. Something like this
public class YourCompoenent {
public String getTitle() {...}
public void setTitle(String title) {...}
@Override
public boolean equals(Object object) {
if(object instanceof String)
return this.getTitle().equals(object);
}
return super.equals(object);
}
}