ADF Faces: Making a selectOneChoice in java code?

I need to make a selectOneChoice to reuse in my pages (country selection) but can't seem to find how to do it on the web?
here is what i've attempted with the error output...
-------------------- the java code:
public void contextInitialized(ServletContextEvent event)
ServletContext servletContext = event.getServletContext();
Utils.log(servletContext, "Initializing Supply Chain Management System...");
// intitilize selectOne component
CoreSelectOneChoice countrySelectOne = new CoreSelectOneChoice();
List countrySelectItems = new ArrayList();
CountryCoordinator countryCoordinator = new CountryCoordinator();
try
List all = countryCoordinator.getAllCountries();
Iterator i = all.iterator();
for(;i.hasNext();)
Object object = i.next();
CoreSelectItem item = new CoreSelectItem();
item.setValue((Country)object);
item.setLabel(((Country)object).getCountry_name());
countrySelectItems.add(item);
// place the list of select items into the selectOne component
countrySelectOne.setValue(countrySelectItems);
servletContext.setAttribute("countrySelectOne", countrySelectOne);
Utils.log(servletContext, "Initializing Countries [SUCCESS]");
} catch(Exception e)
Utils.log(servletContext, "Initializing Countries [FAILED]");
Utils.log(servletContext, "Initialization complete...");
------------------------------ the JSP:
<af:selectOneChoice label="#{bundle.ADDRESS_COUNTRY}:" required="#{region_entity_address.required_entity_address_country}" binding="#{applicationScope.countrySelectOne}"/>
------------------------------ the error:
15:36:48,984 INFO [STDOUT] Sep 16, 2005 3:36:48 PM oracle.adfinternal.view.face
s.renderkit.core.xhtml.SimpleSelectOneRenderer _getSelectedIndex
WARNING: Could not find selected item matching value "CoreSelectItem[UINodeFaces
Bean, id=null]" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=_id30]
....

That's right. JSF produces such IDs. They are causing problems with JAAS login forms, so we should use plain JSPs for login, but for the rest of the tasks such IDs are okay.
What I meant is that currenty the buttons are not rendered as
<input type="button" ... />but as pictures embedded in hyperlinks (&lt;a>).
It's possible, though not likely, that in some future version of ADF Faces some component will be rendered as an HTML element that doesn't support tab ordering (although I haven't really considered if there are such elements). Then the trick with manually setting the tabIndex of the parent HTML element won't work.
Of course, I deeply appreciate the fact that you take the time to help us on this forum. In fact, I will go ahead and do just that -- I will dynamically set the tabIndex via JavaScript. I was simply wanting to make sure that I wasn't taking such a hack-like approach, if there was a better method.
Thank you again.
Best regards,
Bisser

Similar Messages

  • ADF Faces - filtering a selectOneChoice after select from another

    Hi,
    I'm new to ADF faces and I've been experimenting with developing applications using Jdeveloper 10.1.3 and ADF faces. I've run into a little problem.
    I have two selectOnceChoice fields on a page (division and dept.) When user selects a Division I would like to filter the dept. But it seems that the value I get when I try to filter when the div changes is the array index not the value of the division. Basically what I've done is set the valueChangeListener to a function on the backing bean for the Div selectOneChoice and set auto submit to true. If I look at the values on the valueChangeEvent they are the indexes not the actual values. I've tried using ExecuteWithParms in the page def and binding to to #{bindings.div.inputValue} but the results are the same the inputValue at this point contains the array pointer not the actual value. as seem by turning on -Djbo.debugoutput=console.
    Does anybody have any suggestions?
    Thanks
    Chris

    Scott - check out Re: How to do? Save-and-Return with ADF Faces and ADF BC, JDev 10.1.3
    John

  • ADF Faces: Making a component non-navigable. How?

    Hi,
    Is it possible to make an ADF Faces component non-navigable? Something like specifying
    tabindex="-1"in HTML.
    I need this most for buttons.
    Best regards,
    Bisser

    That's right. JSF produces such IDs. They are causing problems with JAAS login forms, so we should use plain JSPs for login, but for the rest of the tasks such IDs are okay.
    What I meant is that currenty the buttons are not rendered as
    <input type="button" ... />but as pictures embedded in hyperlinks (&lt;a>).
    It's possible, though not likely, that in some future version of ADF Faces some component will be rendered as an HTML element that doesn't support tab ordering (although I haven't really considered if there are such elements). Then the trick with manually setting the tabIndex of the parent HTML element won't work.
    Of course, I deeply appreciate the fact that you take the time to help us on this forum. In fact, I will go ahead and do just that -- I will dynamically set the tabIndex via JavaScript. I was simply wanting to make sure that I wasn't taking such a hack-like approach, if there was a better method.
    Thank you again.
    Best regards,
    Bisser

  • Making https: connection from java code loaded into Oracle 8i database

    A bit of a blast from the past, really, as 8i provides a JVM at 1.2.2.
    I need to provide an PL/SQL function which accesses a RESTful web service requiring https connection. Got the call working under 1.2 locally without much trouble using:
    static {
            System.setProperty("java.protocol.handler.pkgs",
                    "com.sun.net.ssl.internal.www.protocol");
            Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
        }The trick is to get the Oracle database to run the code internally. What libraries do I need where? I get an extremely unhelpful NoClassDefFoundError, without mention of the offending class.
    By doing loadjava with jcert.jar,. jnet.jar and jsse.jar (the libraries I'm using with the test program) I can get loadjava to accept and allegedly resolve the class.

    endasil wrote:
    malcolmmc wrote:
    Well, sadly look at the colour scheme.Yeah, sarcastic was I. The NoClassDef error seriously doesn't give a class name? I find it astonishing that any implementation would be that stupid.Seriously. The strange thing is that before I got to the NoClassDefFound I had a Initialization error (until I added a security rule for setting the Provider) and for that I got a full stack trace (in an obscure trace file, granted).

  • Reference faces-config.xml file from java code.

    I would like to reference the navigation rules I have set up in my faces-config.xml file from inside my source code.
    For example:
    Navigation Rule:
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>pricingEngine</from-outcome>
    <to-view-id>/faces/template/t_pricing_engine.jsf</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    I would like do some sort of lookup by 'pricingEngine' and get '/faces/template/t_pricing_engine.jsf' back.
    Any ideas?

    I would like to reference the navigation rules I have set up in my faces-config.xml file from inside my source code.
    For example:
    Navigation Rule:
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>pricingEngine</from-outcome>
    <to-view-id>/faces/template/t_pricing_engine.jsf</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    I would like do some sort of lookup by 'pricingEngine' and get '/faces/template/t_pricing_engine.jsf' back.
    Any ideas?

  • JDev 10.1.2 ADF UIX - Help required in wrinting java code

    Ok here is wher iam stuck.
    I have used a method which is used to run search form.
    That is the field name to be searched and the value is sent into this method.
    The uix page is a master detail page.
    So from the UIX page the user selects the field and the value, which is then sent to the customised method of mine.
    The method code is as given below.
    public final void setCourseRegistrationSearch(String p_field, String p_value)
    ViewObject REGDETAILVO=findViewObject("RegistrationDetailView4");
    ViewObject REGMASTERVO=findViewObject("RegistrationMasterView1");
    if (p_value.equalsIgnoreCase(""))
    String whereclause="1=1";
    REGDETAILVO.setWhereClause(whereclause);
    REGDETAILVO.executeQuery();
    else
    if( (p_field.equalsIgnoreCase("mod_name")))
    String whereclause="reg_master_id in
    (select reg_master_id from registration_detail where "
    p_field"LIKE '%"+p_value+"%')";
    REGMASTERVO.setWhereClause(whereclause);
    REGMASTERVO.executeQuery();
    if((p_field.equalsIgnoreCase("bt_description")))
    String whereclause= "reg_master_id in
    (select reg_master_id from registration_detail where bt_id in
    (select bt_id from batch_timing where"
    p_field" LIKE '%"+p_value+"%'))";
    REGMASTERVO.setWhereClause(whereclause);;
    REGMASTERVO.executeQuery();
    Now when I use the first if statement where mod_name is filtered it works fine.
    When I use the second option for bt_description its doesn't work.
    The error i get is an oracle error which says missing right parenthesis.
    So I checked through the debugger for the whereclause String.
    There I found that the string gets trimmed to...
    (select reg_master_id from registration_detail where bt_id in
    (select bt_id from b
    hence the error.
    Could someone tell me why this is happening? Is there a workaround method for this?
    Would be of great help.
    Regards,
    Vineet

    Solved it!! :-)
    In the UIX page I check for the proxy in the event result, if it is there I take it, otherwise I take it from bindingcontext. Is this the right way to do it? Here is the UIX code:
                            <hGrid id="pptoHGrid" alternateText="No items were found"
                                   treeData="${bindings.bindingContext['tree']}">
                              <boundAttribute name="proxy">
                                <if>
                                  <comparison type="equals">
                                    <null/>
                                    <dataObject default="${uix.eventResult.hGridProxy}"/>
                                  </comparison>
                                  <dataObject default="${bindings.bindingContext['hGridProxy']}"/>
                                  <dataObject default="${uix.eventResult.hGridProxy}"/>
                                </if>
                              </boundAttribute>Greets,
    Fernando

  • Panel Page in ADF Faces using Facelets not rendering correctly

    Hi, I am attempting to integrate facelets into a web app built using adf faces and am running into a problem with the panel page component. I have integrated facelets and adf faces without any problems by adding relevant jars (jsf-facelets and adf-facelets) to the project and specifying alternate facelets view handler in web.xml.
    However, when I try to render any component inside <af:document> or <af:html> tags, all the font style in components seems to be lost ( all the text and input fields turn large and ugly!).
    I tried to leave out the <af:document> tag and put the <f:view> inside some vanilla html instead, but then panelPage component dosen't render properly and I get following message on top of page :
    "Skip navigation elements to page contents"
    So seem to be in a bit of a catch 22. By the way, this all works fine if I don't use facelets (remove the facelets view handler from web.xml and page renders correctly).
    Does anyone have any ideas or examples of panelPage rendering correctly with facelets or an alternative to using adf faces html tags that will allow panelpage to be displayed?
    The following is the code from a simple test jspx page :
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <f:view>
    <af:document>
    <af:form>
    <af:panelPage title="Title 1">
    <af:panelHorizontal>
    <af:panelGroup layout="vertical">
    <af:outputLabel value="Username"/>
    <af:inputText id="lo_username" value="" columns="20"/>
    <af:objectSpacer width="1" height="10"/>
    <af:outputLabel value="Password"/>
    <af:inputText id="lo_password" secret="true" value="" columns="20"/>
    <af:objectSpacer width="1" height="15" />
    <af:panelHorizontal>
    <af:objectSpacer width="50" height="1"/>
    <af:commandButton id="lo_loginButton" text="Login"/>
    </af:panelHorizontal>
    </af:panelGroup>
    <af:objectSpacer width="50" height="1"/>
    <af:panelGroup layout="vertical">
    <af:outputLabel value="Please use your windows account username"/>
    <af:outputLabel value="and password to logon to the system"/>
    <af:objectSpacer width="1" height="50"/>
    </af:panelGroup>
    </af:panelHorizontal>
    </af:panelPage>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

    The problem was the <jsp:root> tag. Removed this tag and modified <af:document> to the following so that namespaces are declared :
    <af:document xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    Page now renders properly using facelets.
    Message was edited by:
    mjc

  • How to  we  use Tiles Framework  with ADF Faces  ?

    Hello Every body,
    Can anyone tell me whether We mix Tiles framework of Struts, and ADF Faces Framework?
    I 've found that we can mix JSF and Tiles, but can we use ADF Faces and Tiles together?
    Waiting for your answer!
    Thanking you ,
    Samba.

    Dear Experts,
    Please help me !
    As I could not get enough help from you masters,
    I set out to do on my own, hoping that at some time you would come to my rescue.
    I designed a simple jspx page SiteLayout.jspx whose code is given below:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>SiteLayout</title>
    </head>
    <body>
    <h:form binding="#{backing_SiteLayout.form1}" id="form1">
    <af:table id="PageLayout" width="100%" >
    <!-- <tiles:getAsString name="title" /> -->
    <f:subview id="siteview">
    <tiles:insert definition="siteLayoutDef">
    <af:table id="headertable" width="100%">
    <tr>
    <td width="100%" colspan="2">
    <f:subview id="header">
    <tiles:insert attribute="header"/>
    </f:subview>
    </td>
    </tr>
    <tr>
    <td width="100%" colspan="2">
    <f:subview id="topview">
    <tiles:insert attribute="topmenu"/>
    </f:subview>
    </td>
    </tr>
    <tr>
    <td width="100%" colspan="2">
    <f:subview id="navigationview">
    <tiles:insert attribute="navigationbar"/>
    </f:subview>
    </td>
    </tr>
    <tr>
    <td width="30%">
    <f:subview id="leftview">
    <tiles:insert attribute="leftmenu"/>
    </f:subview>
    </td>
    <td width="70%">
    <f:subview id="contentview">
    </f:subview>
    <tiles:insert attribute="content"/>
    </td>
    </tr>
    <tr>
    <td width="100%" colspan="2">
    <f:subview id="footerview">
    <tiles:insert attribute="footer"/>
    </f:subview>
    </td>
    </tr>
    </af:table>
    </tiles:insert>
    </f:subview>
    </af:table>
    </h:form></body>
    </html>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_SiteLayout-->
    </jsp:root>
    My SiteLayout.jspx defines the layout of the pages on my Web application.
    My Home page is this:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:afc="http://xmlns.oracle.com/adf/faces/webcache"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:afi="http://xmlns.oracle.com/adf/industrial/faces"
    xmlns:graph="/webapp/graph.tld"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Home</title>
    </head>
    <body>
    <!-- <tiles:getAsString name="title" ignore="true" /> -->
    <h:form binding="#{backing_Home.form1}" id="form1">
    <tiles:insert definition="siteLayoutDef" flush="false">
    <tiles:put name="header" value="/Header.jspx" />
    <tiles:put name="footer" value="/Footer.jspx" />
    <tiles:put name="leftmenu" value="/LeftMenu.jspx" />
    <tiles:put name="content" value="/Content.jspx" />
    <tiles:put name="header" value="/TopMenu.jspx" />
    <tiles:put name="footer" value="/NavigationBar.jspx" />
    </tiles:insert>
    </h:form>
    </body>
    </html>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Home-->
    </jsp:root>
    My <tiles-defs> page is this:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
    <tiles-definitions>
    <definition name="tiles-defs"/>
    <definition name="siteLayoutDef" path="/SiteLayout.jspx">
    <!--<put name="title" value="SiteBean.getQuoteofDay()" /> -->
    <put name="header" value="/header.jspx" />
    <put name="footer" value="/footer.jspx" />
    <put name="content" value=""/>
    <put name="topmenu" value="/TopMenu.jspx"/>
    <put name= "leftmenu" value="/LeftMenu.jspx"/>
    <put name="navigationbar" value="/NavigationBar.jspx"/>
    </definition>
    </tiles-definitions>
    My Web.xml is this:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    <!-- Tiles ViewHandler config file -->      
    <context-param>      
    <description>Tiles configuration      
    definition files and a listener need to be defined.      
    the listener will initialize JspTilesViewHandlerImpl with tiles definitions.      
    </description>
    <param-name>tiles-definitions</param-name>      
    <param-value>/WEB-INF/tiles-defs.xml</param-value>      
    </context-param>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml, /WEB-INF/tiles-defs.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.jspx</param-value>
    </context-param>
    <context-param>
    <param-name>oracle.adf.view.faces.ALTERNATE_VIEW_HANDLER</param-name>
    <param-value>
    org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl
    </param-value>
    </context-param>
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <servlet>
    <servlet-name>Tiles Servlet</servlet-name>
    <servlet-class>
    org.apache.struts.tiles.TilesServlet
    </servlet-class>
    <init-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    </web-app>
    The Error I'm getting is :
    IllegalStateException :No ADFRenderingContext;
    What happened?
    Where did I go wrong?
    could you please help me?
    Thanking you in advance,
    Waiting for your response,
    Samba.
    Message was edited by:
    saasira
    Message was edited by:
    saasira
    Message was edited by:
    saasira

  • How to set values of a parameterized message in ADF Faces?

    Hi all,
    i've got the following problem: I want to set the values of a parameterized message before i add the message to the FacesContext.
    Contents of the message resource bundle:
    testPage.successMsg.create=The device {0} was created successfully!
    Code within backing bean method:
    String message = getStringFromBundle("testPage.successMsg.create");
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(message));
    In Struts/ADF UIX the following code did the job:
    protected void setUIXInfoMessage(HttpServletRequest request, String key, Object[] args)
    MessageData msgs = new MessageData();
    MessageResources mr = this.getResources(request);
    String msg = "";
    if (mr != null)
    msg = mr.getMessage(request.getLocale(), key, args);
    msgs.addMessage(null, msg, null, UIConstants.MESSAGE_TYPE_INFO);
    request.setAttribute(UIX_MESSAGE_KEY, msgs);
    Can anyone help me with this problem? I have searched a lot in the Oracle ADF Development Guide and within forum, but did not find any solution.
    Another interesting thing is, how to set the parameters from jspx-Code.
    How can i achieve the same results in ADF Faces corresponding to the following UIX-Code:
    <boundAttribute name="title">
    <messageFormat format="${nls['deleteTip.confirmation']}">
    <dataObject source="${bindings.TipName}"/>
    </messageFormat>
    </boundAttribute>
    Resource Bundle:
    deleteTip.confirmation=Do you really want to delete the tip {0}?
    Another question:
    What are the corresponding elements in ADF Faces corresponding to <concat> and <if> in UIX or what possibilites exist in ADF Faces to dynamically concatenate strings depending on certain conditions?
    I know, these are many questions. I am familiar with UIX, but now i have to start developing applications with ADF Faces and there are some things i don't find corresponding equivalents.
    Thanks in advance!
    Regards,
    Stefan

    Hi,
    SRDemo shows you how to do this declratively
    <h:outputFormat value="#{res['srcreate.confirmPanel.message']}"
    escape="false" id="nextButton">
    <f:param value="#{requestScope.SRDEMO_CREATED_SVRID}"/>
    </h:outputFormat>
    where the <f:param ...> element sets the value of the variable
    To programmatically access internationalized strings, SRDemo uses
    private static ResourceBundle getBundle() {
    FacesContext ctx = getFacesContext();
    UIViewRoot uiRoot = ctx.getViewRoot();
    Locale locale = uiRoot.getLocale();
    ClassLoader ldr = Thread.currentThread().getContextClassLoader();
    return ResourceBundle.getBundle(ctx.getApplication().getMessageBundle(),
    locale, ldr);
    public static String getStringFromBundle(String key) {
    ResourceBundle bundle = getBundle();
    return getStringSafely(bundle, key, null);
    You take it from there and put it to a FacesMessage, If it uses parameters I guess you will have to parse the string
    Frank

  • ADF Faces + hardware device in the client side.( adf swing  or adf java fx)

    We are using adf+swing in desktop app.
    We like ADF Faces but we need interations with Hardware device in the client side: scan reader, web cam, bar code reader, finger prints reader …
    How to do that’s in the adf faces web environment ( what about with sandbox security) how to obtain in the adf faces web page in the client side de video streams.
    In the future adf will be use Java FX?
    Thanks
    Juan Carlos Llanes

    Hi,
    see sample 71 http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples
    You can use ActiveX plugins or JavaApplet to access the client system. To reach out of the sandbox, it will require a certificate
    In the future adf will be use Java FX?
    No.

  • ADF CoreTree API is missing the ability to expand collapse from Java code?

    ADF-faces-10_1_3_0_4 CoreTree API:
    How do I expand and collapse a tree from Java code?
    Thanks,
    --Todd                                                                                                                                                                                                                                   

    You can use the search on the read only (normal mode) of the PL/SQL Editor. Either through menu or using ctrl F.
    The other is still an enhancement and is being tracked.
    Sue.

  • Access ViewObject from Java code in ADF

    Hello everyone,
    I've got one problem with ADF, which I can't deal with on my own.
    I've created web application that consists of two UI components:
    - table that displays data from database (i've created entity object/view object/application module and drag onto JSF page)
    - button that can refresh table / change data in it (i've got java bean method, that do some logic on view object, which is added as a action to a button)
    My problem is, that i've got SQL query, for example: "select * from dept" and I want to my view object (which I've created before) displays result of this query. How can I do it?
    I don't know how from a java code (in my java bean method) access a view object and execute a sql query on it? I've got some code:
    ViewObject dynamicVO = this.findViewObject("VO1");
    dynamicVO.remove();
    dynamicVO = this.createViewObjectFromQueryStmt("VO1", "SELECT * FROM dept");
    dynamicVO.executeQuery();
    but the dynamicVO is always null.
    Thanks for any help.

    Ok, my jdev version is: Studio Edition Version 11.1.2.2.0.
    I've got some problems which i can't deal with, access ViewObject in my Java class.
    I will show you my project file tree:
    http://i46.tinypic.com/2myxkwz.png
    and
    my TestClass.java:
    package model;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.Number;
    public class TestClass {
        public TestClass() {
            super();
        public static void main(String[] args) {
            String amDef = "models";
            String config = "AppModule";
            Configuration.createRootApplicationModule(amDef, config);
    }which causes error:
    Error Configuration File bc4j.xcfg is not found in the classpath
    cle.jbo.client.Configuration.loadFromClassPath(Configuration.java:471)
    at oracle.jbo.common.ampool.PoolMgr.loadConfiguration(PoolMgr.java:600)
    at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:526)
    at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1513)
    at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1490)
    at model.TestClass.main(TestClass.java:16)I found some similar topics to my, but none of them can help to solve my problem.

  • [adf faces] selectonechoice autosubmit problem

    hello
    i am trying to make a adf faces website, but i have 2 dropdownlists in an overview page
    the first dropdownlist (af:selectonechoice) contains the YEAR
    the second dropdownlist (af:selectonechoice) containts the WEEKS IN THAT YEAR
    the weeks have to be drawn from the database, by using the managed bean "filterBean"
    somehow at this moment i can only get the weeks inside the second dropdownlist by clickin on a commandbutton. the autosubmit from the first dropdownlist doesn't do shit...
    even with partialtriggers it won't work right
    can anybody give me a working example in which a dropdownlist updates another dropdownlist?
    thanks in advance!

    Hi,
    2-minute googling gave these examples:
    "ADF Faces: Building ADF dependent list boxes in ADF Faces table" at http://thepeninsulasedge.com/frank_nimphius/2008/04/08/adf-faces-building-adf-dependent-list-boxes-in-adf-faces-table/
    "62. Cascading Lists in JSF" at http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    "Three Dependent List Boxes in af:table Component" at http://andrejusb.blogspot.com/2007/08/three-dependent-list-boxes-in-aftable.html
    "Implementing dependent select boxes in JSF" at http://www.it-eye.nl/weblog/2006/04/04/implementing-dependent-select-boxes-in-jsf/
    "ADF Learning 6 - Dependent List Boxes" at http://www.scribd.com/doc/2633296/ADF-Learning-6-Dependent-List-Boxes
    HTH,
    Patrik

  • From where can I download ADF Faces java doc

    From where can I download ADF Faces java doc, i.e. all packages in oracle.adf.*.
    --Mukul                                                                                                                                                                                                                       

    Hi,
    see http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/apidocs/index.html
    Frank

  • Create dynamic code on a JSF with ADF Faces

    Hi,
    the next is just sample, nothing to production system, but if I can do the sample I can do something to production system.
    Fine.
    let's suppose that I want to create a html link
    in run-time over a JSF page with ADF Faces component.
    I can do that, I did using javascript and Custom tag,
    but the html link is placed out of the body of the page instead of put it over the place that I put it in development-time
    so, now my question is:
    how I can generate dynamic code using ADF FACES component commandButton or any others.
    any suggestion??
    P.D. if you need more info ask me.

    Hello Jeanne.
    You are right, I used <f:verbatim> element to wrap all my non-JSF elements and it work. :)
    so good so far.
    but, dynamic code mean generate code in this case HTML in run-time.
    That is to say: write code HTML just in time I invoke a page.
    That is posible through Custom Tags.
    You create a Custom Tags this tag generate HTML code after to process any Business Logic. then you put the tag in the page that you want to use it
    someting like this:
    <afh:rowLayout halign="center">
    <afh:cellFormat halign="center">
    <ESE-utilities:populateMenu/>
    </afh:cellFormat>
    </afh:rowLayout>
    the just above bold line is my Custom Tag that generate HTML code
    and not work.
    but, if I replace the tag directly using HTML code in the page, for example:
    <afh:rowLayout halign="center">
    <afh:cellFormat halign="center">
    <f:verbatim>
    prueba
    </f:verbatim>
    </afh:cellFormat>
    </afh:rowLayout>
    it work
    so, now my new question is:
    ¿How can I use a Custom Tagthat generate HTML code, and that code have been written inside of my body page?
    Thanks in advantage for your reply.
    Mauricio

Maybe you are looking for

  • Home dir quotas not showing up in Server Admin

    We have 8 AFP servers here and for some reason 2 of them are not displaying the quota information in Server Admin. Nothing has been changed to these machines so I'm puzzled as to why this is happening all of a sudden. Any ideas? Thanks.

  • Is there any function module to convert date formats

    i want to conver from any format of date to mmddyyyy how to do this

  • Count multiple nodes in XML using xPath

    Hi', How to count the CUSTSERIAL node in the below XML using xPath. <missingICCRec> <MissingField xmlns="http://www.Google.com/MissingFields/v1.0"> <CUSTSERIAL xmlns="http://Google.com/InboundService">23809002RN</CUSTSERIAL> <CUSTSERIAL xmlns="http:/

  • Can I set session variables from inside my Javascript?

    hi all, i want to set a couple of session variable while i am inside my javascript. can I do that? m_asu

  • Java.exe (urgent,urgent)

    I am developing a project using jsp,oracle9i database with the builtin apache webserver provided by oracle,operating system win2000. I am frquently getting java.exe error,which is listed below. java.exe has generated errors and will be closed by wind