[JBoss Portal] - Errors when trying to edit JSF admin pages with custom compo
by jl7791
I have successfully added an attribute to the user profile object, but I want to be able to pull a list from a database and display it back to the user so that they may select from it.
| <h:selectOneMenu id="company" value="#{manager.uiUser.attribute.company}" required="#{metadataservice.company.required}">
| <f:selectItems value="#{customerManager.customerNames}" />
| </h:selectOneMenu>
|
Backing bean:
| package com.mycompany.ui;
|
| import java.util.ArrayList;
| import java.util.List;
|
| import javax.faces.model.SelectItem;
|
| import com.mycompany.data.Customer;
| import com.mycompany.service.CustomerManager;
|
| public class CustomerBean {
|
| private List<SelectItem> customerNames;
|
| public void setCustomerNames(List<SelectItem> customerNames) {
| this.customerNames = customerNames;
| }
|
| public List<SelectItem> getCustomerNames() {
| if (customerNames == null) {
| customerNames = initNames();
| }
|
| return customerNames;
| }
|
| private List<SelectItem> initNames() {
| List<SelectItem> custNamesSelectItem = new ArrayList<SelectItem>();
| try {
| List<Customer> customerListFromDb = CustomerManager.getAllCustomers();
| for (Customer c : customerListFromDb) {
| custNamesSelectItem.add(new SelectItem(c.getId(), c.getName()));
| }
| } catch (Exception e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
|
| return custNamesSelectItem;
| }
| }
|
When I access the page, I get the following exception. What causes this, since I am returning a list of SelectItem objects?
| Caused by: java.lang.IllegalArgumentException: Collection referenced by UISelectItems with binding '#{customerManager.customerNames}' and Component-Path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /WEB-INF/jsf/admin/editProfile.xhtml][Class: javax.faces.component.html.HtmlForm,Id: _id26jbpns_2fadmin_2fMembers_2fIdentityAdminPortletWindowsnpbj][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id43jbpns_2fadmin_2fMembers_2fIdentityAdminPortletWindowsnpbj][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: company][Class: javax.faces.component.UISelectItems,Id: _id85jbpns_2fadmin_2fMembers_2fIdentityAdminPortletWindowsnpbj]} does not contain Objects of type SelectItem
| at org.apache.myfaces.shared_impl.util.SelectItemsIterator.next(SelectItemsIterator.java:184)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:451)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:428)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:294)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:267)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:59)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:540)
| at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:498)
| ... 236 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139738#4139738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139738
18 years
[Security & JAAS/JBoss] - Client Certificate using Keytool and OpenSSL
by sunnym_a
Environment:
JBoss-4.2.1.GA
Java 1.5.0_11
OpenSSL 0.9.8g
Is there a way to set Netscape Cert Type property to SSL Client while exporting it to PKCS12 certificate using OpenSSL?
I created a client certificate using the following steps:
a. Generated key pair using Keytool
b. Generated CSR and got it signed by the CA (Verisign)
c. Imported signed certificate and all Root + Intermediate authorities in client keystore for proper certificate chaining
d Exported private key from the keystore
e. Used OpenSSL command to export pkcs12 certificate:
openssl pkcs12 - export -out client.p12 -inkey client.pem -in client.cer - passout pass:*********
This certificate gets installed in both IE and Firefox successfully, however the Netscape Cert Type attribute shows: SSL Server Authentication This causes the following exception on the server side (Sun JVM) when passed through the browser:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: Netscape cert type does not permit use for SSL client
When I used a another pkcs12 certificate generated by IIS, that worked fine as its Netscape Cert Type attribute was set correctly to SSL Client.
I came across nscerttype attribute but it seems it's only applicable to openssl commands: ca, req and x509.
TIA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139734#4139734
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139734
18 years
[JBoss Tools (users)] - Re: JBoss Tools AS 1.0.0.GA update for JBoss 5 AS ?
by dlmiles
"max.andersen(a)jboss.com" wrote : anonymous wrote : I agree with the issue on the other error being due to not using the rest of the nightly build, I did not download and take apart the nightly build to see why it did not gel. Also why does Content Assist require access to IJBossRuntime (when I've not runtimes setup) and also why does Type Hierachy fail to work at all when IJBossRuntime class is apparently missing! So what!
| |
| You need to explain that to me a bit better ;)
|
| What kind of content assist is failing ?
All kinds, in all contexts I tried, on all artifacts I tried. Simply unzip JBossTools-AS-*-nightly over your GA installation and bootup and try to do some Java work.
I really would not be so concerned about it, I'm pretty sure the issue is not with JBoss Tools but the way in which Eclipse hunts/looks/finds things.
anonymous wrote : anonymous wrote : < rant > Gee it would be really good when you booted eclipse and it detected a change in plugins if it diagnosed problems an tell you which things were new and which things have become disconnected/disabled < / rant >
|
| start eclipse with -debug and you get the disconnected/disabled info in the Error Log view.
|
G-r-e-a-t A-d-v-i-c-e T-h-a-n-k Y-o-u!
< sarcasm >Hey with that content assist problem (if you really wanna knock yourself out on that bug), try attaching GDB to the process and looking a look at the disassemble view.< /sarcasm >
G-rr-eee-aaaa-ttttt-!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139730#4139730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139730
18 years