Re: itemDisabled doesnt works in f:selectItem of h:selectOneMenu

2007-05-22 Thread bansi

Forgot to mention in my earlier posting 
I have observed itemDisabled="true" works in Firefox browser but not in IE.
Even in Firefox browser the item is disable only onChange i.e. pick
different value form the list.  I want the item to be disable as soon as the
page loads

The dropdown is the first component in my JSF page  and it does CRUD
operation. The first value in the dropdown is "New".
When users pick "New" value from the dropdown it facilitates Create
operation 
If users pick a value othet than "New"  from the dropdown then all other 
fields are dynamically populated facilitating "Update" operation

As picking "New" value from dropdown results in "Create" operation so its
role based and needs to be disabled as follows


which unfortunately doesnt work as soon as the page loads

I am setting the value for property "hasRole" in the Constructor of backing
bean as shown below
public ManufacturerBean() {
  System.out.println("Inside Manuf Constructor");
 UserInfo userInfo = UserInfoHolder.getUserInfo();
userRoles = userInfo.getUserRoles();
Iterator it = userRoles .iterator();
while (it.hasNext()) {
// Get element
userRole = (UserRole) it.next();
roleName = (String) userRole.getNamsRole().getName();
}
if (roleName.equals("NAMS Admin"))
hasRole=true;
else
hasRole=false;

  }


Any pointers/suggestions will be highly appreciated

Regards
Bansi

bansi wrote:
> 
> Here is the dropdown in which itemDisabled="true" doesnt works for
> f:selectItem 
> 
>  value="#{manufacturerBean.selectedManufacturer}" >  
>   
>  
>/>   
>action="#{manufacturerBean.loadManufacturerDetails}" event="onchange"
> reRender="manufName,manufDescription,manufSource,btnSave,btnDelete" />
>
> 
> 
> Any pointers/suggestions will be appreciated
> 
> Regards
> Bansi
> 

-- 
View this message in context: 
http://www.nabble.com/itemDisabled-doesnt-works-in-f%3AselectItem--of-h%3AselectOneMenu-tf3800807.html#a10755372
Sent from the MyFaces - Users mailing list archive at Nabble.com.



itemDisabled doesnt works in f:selectItem of h:selectOneMenu

2007-05-22 Thread bansi

Here is the dropdown in which itemDisabled="true" doesnt works for
f:selectItem 

  
  
   
 

 


Any pointers/suggestions will be appreciated

Regards
Bansi
-- 
View this message in context: 
http://www.nabble.com/itemDisabled-doesnt-works-in-f%3AselectItem--of-h%3AselectOneMenu-tf3800807.html#a10753832
Sent from the MyFaces - Users mailing list archive at Nabble.com.