JSF components within jsf components programatic

I am using the java sun pane_tabbed component on a jsf page and I want another jsf page to be the tab body. I tried to include another jsp page but that doesn't work. The include in the example something like
<h:panelGroup>
<h:outputText value="here is some info to display on tab "/>
</h:panelGroup>
It seems I just can't say
<h:panelGroup>
here is some info to display on tab
</h:panelGroup>
This remind me of servlet days where everything was out.println and why we came up with jsp in the first place and I figure there's got to be a better way.
So what's the way? I understand I could make the inner html another jsf tag but thats overkill for what I am trying to do. Also I need the inner html to be treated itself like an entirely different page (like a component) so just to put outputText around everything just wouldn't work.
So what's the way

In addition.... I understand that part of the JSF concept is that the client can be many different devices and depending on which client different widgets get displayed. A way that that could still be true is that I register a components in faces-config.xml by specifying that it is a jsp page (with jsf components). Then a jsf tree is built with the widgets I have included on the jsp page. Then I specify that the renderer is a jsp page renderer which would mean for my application it would display the jsf page like I wanted with the components where I wanted them. Then if I want to render on for instance a swing application I then need to program a renderer which says how to display these widgets there.
I'm pretty new to JSF but I'm hoping that I am on the right track here. There should be some way for non java developers to help with the creation of components I would think.

Similar Messages

  • Searching for class or method to add mobile components programatically

    Hello,
    I'm searching for a class and/or a method to add a mobile component and version to a mobile device programatically.
    Furthermore I would like to know in which datbase-table I can find
    a) The roles and their mobile components
    b) The installed components of the registered devices.
    I Hope you can help me with this issue.
    Best regards.
    Lars

    Hello,
    thanks for your responses. I think the answer of Shobha is very good. I've found a second solution for this problem.
    1. Set the MCD-Attributes
    DATA: mcd_name TYPE SMMW_MCDNAME,
                mcd_ver    TYPE SMMW_MCDVERSION.
        CLEAR mcd.
                 mcd-MCDNAME = mcd_name.
                 mcd-VERSION   = mcd_ver.
                 APPEND mcd TO mcds.
        CLEAR mcd.
    2. Call method
    CALL METHOD CL_SMMW_DEV_ADM=>ASSIGN_MCD_TO_DEVICE
        EXPORTING
          RECEIVERID                                 = 'Your receiver-ID'
          MCDS                                           = mcds
          AUTO_FLAG                                = 'X'
        INVOKE_RULE_EVALUATION     = 'X'
        IMPORTING
          NON_AVAIL                                 = NON_AVAIL
          FAILED_MCDS                              = FAILED_MCDS
          MESSAGE_RETURN                     = MESSAGE_RETURN
        EXCEPTIONS
          MCDNAME_VERSION_INCOMPLETE = 1
          others                                                = 2.
      IF SY-SUBRC <> 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    With the method of class CL_SMMW_DEV_ADM you can easily add MCDs to your device.
    Thank you for your help.
    Best regards.
    Lars

  • Create Spark Components programatically

    Good Day...
    I am developing a mobile application using XML data to create components during runtime. The only problem is that how to set the font size, fontface of the created component (eg. label) and this label component is group by another component which the group. How to make this group look good. I mean how to set the background color and others.
    Thank you very much

    Thank you for your reply.
    In fact, adding the following line to the code seems to solve the problem
    _win.height = 600;
    _win.setStyle("backgroundAlpha", 0);
    _win.transparent = true;
    _win.open(true);
    Nevertheless, to me this seems to be just a workaround, not a solution. For 2 reasons:
    1) mx.core.Window worked without the workaround
    2) I don't see a reason why one should need to set the transparency twice - setting transparent=true should automatically set the backgroundAlpha style of the UIcomponent to 0.
    Could someone please explain this to me?

  • Jdev 12c create components programatically

    Hi friends
    I am adding new columns to my treetable using a number slider component, it works fine but I want to add an outputtext with a contextinfo inside
    just like this:
    <af:outputText value="This is a test" id="ot2">
                                <f:facet name="context">
                                    <af:contextInfo id="ci1">
                                        <af:showPopupBehavior align="beforeStart" triggerType="contextInfo" popupId="p1"/>
                                    </af:contextInfo>
                                </f:facet>
                            </af:outputText>
    I am able to add the outputtext but not the facet,contextinfo and showpopupbehavior so far I have this:
    the val is the number of columns its adding
            for(int c = 0; c < val; c++) {
                RichColumn col = new RichColumn();
                col.setHeaderText("Valor "+c);
                col.setWidth("40");
                RichOutputText coldata = new RichOutputText();
                coldata.setValue("desc");
                /*PERFECT UNTIL HERE*/
                FacetTag fc = new FacetTag();//the import is: javax.faces.webapp (I dont know if it is correct)
                fc.setName("context");
                coldata.getChildren().add(fc);//error only allows UIComponents
                RichContextInfo ci = new RichContextInfo();
                ShowPopupBehaviorTag sp = new ShowPopupBehaviorTag();
                fc.setParent(sp);
               // ci.getChildren().add(sp);
                coldata.getChildren().add(ci);
               // sp.setAlign(new ValueExpression()); << I dont know how to pass this parameter :(
    /*END OF FUSTRATION*/
                col.getChildren().add(coldata);
                children.add(col);
    (From line 08 - 17 ) I am trying to add the facet as a child of  the RichOutputText and the RichContextInfo a child of this and the ShowPopUpBehavior a child of RichContextInfo
    Thanks!

    Well I managed to have it working but! the problem now is:
    When I refresh the page the TreeTable loses all of its children( the ones that were added programatically)
    I tried putting the same method is a PhaseEvent (<f:view beforePhase="#{bRegistrarFicha.agregarColumnas}">)
    it worked but! this is a fragment and in the main page there is a  PhaseEvent (beforePhase) which is executing too but! when
    I hit F5 only the phaseevent of the fragment executes, why doesn't the other phaseEvent executes?

  • Programatic Value/MethodBindings with JSF tags

    I read thread http://forum.java.sun.com/thread.jsp?forum=427&thread=526026 "Using JSP scriplets in the JSF tags". The following was suggested but not recomended in order to use JSF Tag EL with a programatically set value.
    <%
    String myString="MyLabel";
    request.setAttribute("myString", myString);
    %>
    <h:view>
    <h:outputText id="myID" value="#{myString}" />
    </h:view>
    Is it possible to set up ValueBinding's and MethodBindings in a similar way or would it be better to dump the JSF tags and use JSF altogether programatically. Below is an example that seems like it should work but the result is the ValueBinding.toString() ends up being the value.
    thanks in advance;
    <%
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    ValueBinding vb= app.createValueBinding("#{MyBean.member}");
    request.setAttribute("vb", vb);
    %>
    <h:inputText id="myid" value="#{vb}"/>

    --right ValueBinding.getValue() takes a FacesContext, which you definately would not want to pass as and arg in El, even if you could I would think. 
    To answer your question, we are generating several software layers based on an MDA approach. We reverse engineer the database schema into XML then use that "Platform Independent Model" to generate a JDO model and set of persistence-capable Java classes, and now a Faces Bean model and Bean classes. We also have a set of constants files which have all the entity and property names to be used in the web layer.
    Since the database model is huge, and changes alot (government project), hard-coding EL expressions in a thousand places is a very bad idea given the code-generation/reverse-engineering approach.
    We want 100% compile-time checking for all persistent-access properties and the Faces programatic approach to Value/Method bindings gets us there, if it will somehow work.
    --any other ideas would be greatly appreciated.
    --cheers; Scott

  • Programatically change JSF Components

    Hi all,
    I need to change "Disable" property of all components of a UIViewRoot based on calculated information. I can put an EL on Disable property to it, but i need to change all components once, and wouldn't like to put a EL on each component. I've tried to do it on Customized ViewHandlerImpl that extends oracle.adfinternal.view.faces.application.ViewHandlerImpl, method renderView
    public void renderView(FacesContext facesContext,
    UIViewRoot uiViewRoot) throws IOException,
    FacesException {
    // Try to get Children here, and change all editables components.
    super.renderView(facesContext, uiViewRoot);
    So, i've attempted get Children before super.renderView call, but in this moment Children is 0 length, only after super.renderView, i can get Children components.
    Has anybody any tip about this?
    Thanks

    user9546730 wrote:
    1. Do we loose any of the ADF faces (including Rich Client framework, partial rendering, Expression bindings, AJAX calls etc) feature by adding the component at runtime or programatically against the typical way of dragging and dropping the component to the screen at design time.(Except the drag and drop functionality and filling the component property at property window!)?No.
    user9546730 wrote:
    I am worried on the features part while taking programmatic approach bcoz i heard that there is no 100% guarantee on Postback features available and Adf component state feature in my scenario, if i take the programmatic approach.Should not be an issue if done correctly.
    user9546730 wrote:
    The scenrio in programatic approach:
    There is one static yyy.jspx, where a declarative component(might be a layout kind of declarative component) is placed and binded to a bean, from the bean i am adding the ADF controls dynamically to the declarative component by parsing an xml.
    Here if multiple users are accessing the yyy.jspx the content inside the declarative component can change user to user, So here the worry is whether the JSF/ADF lifecycle will work properly(the postback, ADF component state saving mechanism etc) for all the users.I would not use a declarative component nor the binding to initialize the component, else you'll calling for state issues that you fear about. Make a fully fledged component and initialize the component subtree in the tag file (or TagHandler if using Facelets, which I doubt you are), after creating the root component (the container).
    Regards,
    ~ Simon

  • Page is not rendering as per requirement request

    Hi All,
    Basically Here is the scenario.
    Based on selectoin of particular service item from combo box(dropdown list), We are creating the JSF controls dynamically on new page for further process.
    We are maintaining the controls information in database that need to be created dynamically and rendered for each service.
    And I am able to create the controls dynamically and able to place them on page perfectly.
    Until here everything looks ok for me.
    But main problem I have identified is when I go for new request, I am getting the same old page when I select the other service.
    Initially I though this could be a problem of caching and I have placed meta info in order to expire the page. But that was no use.
    So I logged all the data that is coming from database and logged the information where I have created the controls dynamically..
    What I have identified is I am getting the right data on paricular service selection and even I am able to see that methods execution is correct. I was stunned and not able to understand why the JSF is not able to show the controls.
    So I searched the JavaDoc for solution. I though I could use FacesContext.release() method. But that does not help me. Even I tried to clear the parent objects using gridpanel1.getChildren().clear(). Even that does not supported me :(
    In order to understand my problem, here I am pating the code.
    Please help me why the hell my page is not rendering
    Below is code in constructor
    javax.faces.context.ExternalContext ec = context.getExternalContext();
                javax.servlet.http.HttpServletRequest request=(javax.servlet.http.HttpServletRequest)ec.getRequest();
                String service=request.getParameter("form1:cmbServices");
                int serviceid=-1;
                if(service!=null) {
                    serviceid=Integer.parseInt(service);
                gridPanel1.getChildren().clear();
                controls =getControls(serviceid);
                HtmlControl[] controlArray =controls.getHtmlControls();
                //log(controlArray.length+" Length");
                for (int i =0;i<controlArray.length;i++) {
                    HtmlControl control =controlArray;
    //log(control+" Control");
    //log(controlArray.length+" Length");
    if (control.isRadio()) {
    addRadio(control);
    //log("Entered here in adding radio");
    else if (control.isCheckBox()) {
    addCheckBox(control);
    //log("Entered here in adding checkbox");
    else if (control.isTextBox()) {
    addTextBox(control);
    //log("Entered here in adding textbox");
    here is the code for dynamic creation of controls
    private void addRadio(HtmlControl control) {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue(control.getDescription());
            String desc =control.getDescription();
            desc=desc.replaceAll(" ", "_");
            outputText.setId(desc);
            outputText.setStyleClass("bodyText");
            HtmlSelectOneRadio radio = new HtmlSelectOneRadio();
            radio.setBorder(0);
            radio.setLayout("pageDirection");
            //radio.setId("Radio_"+control.getId());
            radio.setId(control.getName()+"__"+control.getId());
            UISelectItems items = new UISelectItems();
            Radio objRadio =(Radio)control;
            //  vectDefaultSelectItemsArray
            DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
            vectDefaultSelectItemsArray.add(objArray);
            //log("vectDefaultSelectItemsArray :"+vectDefaultSelectItemsArray.size());
            arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
            int size =arrays.length;
            arrays[size - 1].clear();
            for (int i =0;i<objRadio.getValues().size();i++) {
                arrays[size - 1].add(new SelectItem(objRadio.getValues().get(i)+"",""+objRadio.getTexts().get(i)));
            // array.setItems(new String[] {"Yes","No" });
            items.setValueBinding("value",getValueBinding("#{consumer$jobInfo.arrays["+(size-1)+"]}"));
            radio.setStyleClass("bodyText");
            radio.getChildren().add(items);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(radio);
            parent.getChildren().add(gridPanel);
        private void addCheckBox(HtmlControl control) {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue(control.getDescription());
            outputText.setStyleClass("bodyText");
            String desc =control.getDescription();
            desc=desc.replaceAll(" ", "_");
            outputText.setId(desc);
            HtmlSelectManyCheckbox checkBox = new HtmlSelectManyCheckbox();
            checkBox.setBorder(0);
            checkBox.setLayout("pageDirection");
            //checkBox.setId("CheckBox_"+control.getId());
            checkBox.setId(control.getName()+"__"+control.getId());
            UISelectItems items = new UISelectItems();
            CheckBox objcheckBox =(CheckBox)control;
            //  arrays[0]=new DefaultSelectItemsArray();
            //arrays[0].clear();
            DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
            vectDefaultSelectItemsArray.add(objArray);
            //log("vectDefaultSelectItemsArray :"+vectDefaultSelectItemsArray.size());
            arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
            int size =arrays.length;
            arrays[size - 1].clear();
            //  array.clear();
            for (int i =0;i<objcheckBox.getValues().size();i++) {
                arrays[size - 1].add(new SelectItem(objcheckBox.getValues().get(i)+"",""+objcheckBox.getTexts().get(i)));
                //     array.add(new SelectItem(objcheckBox.getValues().get(i)+"",""+objcheckBox.getTexts().get(i)));
            // array.setItems(new String[] {"Yes","No" });
            items.setValueBinding("value",getValueBinding("#{consumer$jobInfo.arrays["+(size-1)+"]}"));
            checkBox.setStyleClass("bodyText");
            checkBox.getChildren().add(items);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(checkBox);
            parent.getChildren().add(gridPanel);
        private void addTextBox(HtmlControl control) {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue(control.getDescription());
            String desc =control.getDescription();
            desc=desc.replaceAll(" ", "_");
            outputText.setId(desc);
            outputText.setStyleClass("bodyText");
            HtmlInputText textField = new HtmlInputText();
            //  textField.setId("textField_"+control.getId());
            textField.setId(control.getName()+"__"+control.getId());
            HtmlOutputText outputText1 = new HtmlOutputText();
            outputText1.setValue(" ");
            outputText1.setStyleClass("bodyText");
            textField.setStyleClass("frmObjects");
            gridPanel.setColumns(3);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(outputText1);
            gridPanel.getChildren().add(textField);
            parent.getChildren().add(gridPanel);
    here is my after render response method
    protected void afterRenderResponse() {
            //job_selection_templateRowSet.close();
            jiya_html_controlRowSet.close();
            FacesContext.getCurrentInstance().release();
    here is my getValueBinding method
    private ValueBinding getValueBinding(String expression) {
            return     FacesContext.getCurrentInstance().getApplication().createValueBinding(expression);
        }Thanks
    Sudhakar.

    Hi,
    You can try the following to debug and provide us more details.
    1. I am assuming you are trying to navigate by using a commandLink/Command Button ? If so, is the action handler for the command getting called ?
    2. Do you have input components in the page with Validators/converters attached to them ? If so, you may not watch for validation/conversion errors. If there are errors, the same page will be redisplayed. In that case you would need to associate message component to get more details on what went wrong.
    3. Have you set up the necessary navigation rules to navigate to the right page ?
    4. When you are adding components programatically, its better to assign explicit id's to your components, to avoid any unexpected behavior.
    Hope this helps.
    Regards
    -Jayashri

  • Help with HTMLSelectOneMenu

    I am a new developer with JSF and facing following problem with HTMLSelectOneMenu .....
    i have a HTMLSelectOneMenu on a page and wants to populate it when ever the page is rendered. I do get the data from database in a bean before page is rendered but dont know how to bind the data with HTMLSelectOneMenu...
    i have read some techniques but they seem to look like over kill. A short precise method is always preferred.......
    regards

    HtmlSelectOneMenu htmlSelectOneMenu = new HtmlSelectOneMenu();
    htmlSelectOneMenu.setValueBinding("value", "#{MyBackingBean.MyObject}));You need to be modify the above to set the ValueBinding instance instead of the expression, something like this
    HtmlSelectOneMenu htmlSelectOneMenu = new HtmlSelectOneMenu();
    ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{MyBackingBean.MyObject});
    htmlSelectOneMenu .setValueBinding("value", vb);
    Also, when you are adding components programatically, you should explicitly set "id" for your components so that you can avoid id conflicts. Hope this helps.
    -Jayashri
    JSF RI team.

  • Dynamic af:inputListOfValues causes NullPointerException

    Hi Gurus,
    We are using JDeveloper 11.1.3. Currently we are building a dynamic LOV (sort of) based on an existing listOfValuesModel in PageDef.xml.
    The existing af:inputListOfValues was built at design time with the listOfValuesModel. The goal is to share this listOfValuesModel #{bindings.LOV} with dynamic LOVs. The code snippet from jspx works flawlessly:
    +<af:inputListOfValues id="nameId"+
    +popupTitle="Search and Select: #{bindings.LOV.hints.label}"+
    +value="#{bindings.LOV.inputValue}"+
    +label="#{bindings.LOV.hints.label}"+
    +model="#{bindings.LOV.listOfValuesModel}"+
    +required="#{bindings.LOV.hints.mandatory}"+
    +columns="#{bindings.LOV.hints.displayWidth}"+
    +shortDesc="#{bindings.LOV.hints.tooltip}"+
    +launchPopupListener="#{viewScope.FaParamConfigBean.onLaunchLov}">+
    +<f:validator binding="#{bindings.LOV.validator}"/>+
    +</af:inputListOfValues>+
    We have no problem to manually duplicate more +<af:inputListOfValues id="nameId1" model="#{bindings.LOV.listOfValuesModel}" .../>+ (under +nameId2+, +nameId3+, ...) based on the same +model="#{bindings.LOV.listOfValuesModel}"+. All these LOVs share the same binding variable.
    Then in our java code, we dynamically generate RichInputListOfValues for our form and set the model to #{bindings.LOV}.
    +private ListOfValuesModel lovModel = null;+
    +if ( this.lovModel == null) {+
    +//lovModel = (ListOfValuesModel) JSFUtils.resolveExpression(this.LOV_MODEL); // returns same result+
    +FacesCtrlLOVBinding lovBinding = (FacesCtrlLOVBinding) JSFUtils.resolveExpression("#{bindings.LOV}");+
    +lovModel = lovBinding.getListOfValuesModel();+
    +}+
    +RichInputListOfValues inputLOV = new RichInputListOfValues();+
    +inputLOV.setImmediate(false);+
    +inputLOV.setModel(lovModel);+
    +inputLOV.setValue(lovValue);+
    +inputLOV.setLabel(displayLabel);+
    +inputLOV.setId(randomLovUid);+
    +FacesContext fctx = FacesContext.getCurrentInstance();+
    +ELContext elctx = fctx.getELContext();+
    +Application application = fctx.getApplication();+
    +ExpressionFactory exprFactory = application.getExpressionFactory();+
    +MethodExpression methodExpr = exprFactory.createMethodExpression(elctx, "#{viewScope.FaParamConfigBean.onLaunchLov}",null,new Class[] {LaunchPopupEvent.class});+
    +inputLOV.setLaunchPopupListener(methodExpr);+
    +this.form.getChildren().add(inputLOV);+
    From here I exam the ListOfValuesModel instance.
    +public void onLaunchLov(LaunchPopupEvent launchPopupEvent) {+
    +FacesCtrlLOVBinding lovBinding = (FacesCtrlLOVBinding) JSFUtils.resolveExpression("#{bindings.LOV}");+
    +ListOfValuesModel lovModel2 = lovBinding.getListOfValuesModel();+
    +System.out.println("lovModel2=["+lovModel2);+
    +};+
    I notice every time I click pre-defined LOV components, they get a different address (i.e., oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ListOfValuesModelImpl@48ab7b) but the popup window always works fine. If I click dynamic LOVs, the popup will throw NPE. Compare the properties of static LOVs against dynamic LOVs, I also notice the following
    -_searchBinding is null for dynamic LOVs while static LOV's has PageDef._lovSearch_LOV of class *FaceCtrlSearchBinding* ;
    -_tableModel is null for both types of LOVs.
    So I conclude since I miss FaceCtrlSearchBinding in dynamic LOVs to cause this NPE issue. What we don't understand is, sharing the same #{bindings.LOV} works fine for static LOVs but not for dynamic LOvs. Can you help me to fix this?
    More interestingly, I would always get NPE if I set listOfValues's StaticList="true" in the binding file.
    +<listOfValues StaticList="false" IterBinding="ItasCompaniesVO1Iterator"+
    +Uses="LOV_Name" id="LOV"/>+
    Thanks a lot!
    Sam
    Edited by: user719281 on Nov 4, 2010 11:31 PM
    Edited by: user719281 on Nov 5, 2010 10:15 AM

    @sudipto : I have verified the scenerio by creating few components in a panelFormLayout and set the property(Visible-false). Then i make the comopents visible programmatically,but it does not rearrange itself rather it gets visible on the screen on the location it was created.
    @Timo : I need to arrange the LOV components that need to be added horizontally in a panelFormLayout. Therefore I have created a 4columns/1Row panel form Layout . There are two such panelFormLayouts created as i have six components that is to be added in a horizontal manner . The order in which the components are to be added cannot be determined at design time as it depends purely on the end user which components he wants to make visible on the screen , also in the order he wish to add. Hence adding the components in the panelFormLayout and using the switcher does not seem to be a feasible solution and creating the components programatically looks to be the only way as of now. Please suggest if i am missing something.
    Edited by: 907302 on Feb 7, 2012 2:11 AM

  • Custom OVS is not filtering as per requirement.

    Hi ALL;
    I have created one XBO  of Account and i added "IsBuilding" one field whose type is "Indicator". The requirement is to create a custom OVS, which shows filtered account based on "IsBUilding" . But the custom OVS is not filtering the account based on "IsBuilding".
    Is their any solution for this.
    Thanks & Regards:
    Naser Ali

    Hi,
    You can try the following to debug and provide us more details.
    1. I am assuming you are trying to navigate by using a commandLink/Command Button ? If so, is the action handler for the command getting called ?
    2. Do you have input components in the page with Validators/converters attached to them ? If so, you may not watch for validation/conversion errors. If there are errors, the same page will be redisplayed. In that case you would need to associate message component to get more details on what went wrong.
    3. Have you set up the necessary navigation rules to navigate to the right page ?
    4. When you are adding components programatically, its better to assign explicit id's to your components, to avoid any unexpected behavior.
    Hope this helps.
    Regards
    -Jayashri

  • JButton array with NetBeans 6.1

    Hi,
    I am relatively new to Java and NetBeans.
    I have the following problem; wish someone could help me.
    I need to create an array of 30 buttons programatically, on a Panel, namely pnlButtonPack. I have created this panel using NetBeans 6.1 GUI builder, along with several other components which are on other panels, frames and so on.
    All the 30 buttons are with same behaviour and I need only the index of the button that a user presses to trigger different actions. Thus, one ActionListner
    for the entire array.
    I know how to create the button array if I were to create it purely on the code editor, the relevent portion of the code being;
    JButton[] btnNumbers = new JButton[30];
        JTextField txtDisplay = new JTextField();
         for (int i = 0; i < btnNumbers.length; i++){
                 String text = String.valueOf(i);
                 JButton btn = new JButton( text );
                 btn.addActionListener( this );
                 btn.setMnemonic( text.charAt(0) );
                 btnNumbers[i] = btn;
                 pnlButtonPack.add( btn );
          public void actionPerformed(ActionEvent e){
                JButton source = (JButton)e.getSource();
                txtDisplay.replaceSelection( source.getActionCommand());
           }How can I do this on NetBeans ?
    The guarded code does not allow me to insert my code at the appropriate places. (The "code" pane in the component Properties window is ****, it inserts my code at wrong places).
    One option is to drag and drop 30 buttons on my panel, but that idea and the resulting code would be rediculous.
    Another option would be to design the whole GUI from scratch on the code editor but that defeats the purpose of using NetBeans in the first place.
    Your kind advice on this is highly appreciated please.

    ViKARLL wrote:
    Thanks for your prompt response morgalr.
    Yes, I agree. But the moment I make any change elsewhere on the GUI through NetBeans, all my manual coding vanishes (as they warn in their Help)
    Of course I can cut and paste the entire code to another plain Java Class in NetBeans itself. But then my point is that, the whole purpose of using an IDE with a GUI builder is defeated ?
    Isn't there some way for me to introduce components programatically to a UI through NetBeans on the same GUI builder's editable coding areas ??The problem you are encountering is exactly why I quit using GUI Builders about 8+ years ago. I, after much frustrations and searching, finally decided that if I wanted to use a GUI Builder, then at the point it ceased to do what I needed--like where you are--then I'd just take the code from the .java file and include it in my project and be done with the AutoGen of that piece from that point (The code is actually gened in a file down on your drive that you can include and not have to copy/paste the entire file into your project.)
    What I do now, is I usually just manually code it, I don't find it any slower than using the GUI builder, and me being a control freak, I enjoy it a lot more.
    BTW: VB has a lot of the same type of problems, including ophaning code fragments. I've done a lot of VB/C/C++/C# with MS tools and that is where I started not enjoying the AutoCoding.

  • Creating Dynamic af:inputListOfValues

    Hi All,
    I need to create the component af:inputListofValues dynamically and render it on the page. I am able to create the inputListOfValues and it also fetches the first record and displays it as value.
    But when i click the search icon of the dynamically created af:inputListOfValues , there is a NullPointerException.
    Exception :
    java.lang.NullPointerException
    ADF_FACES-60097: For more information, please see the server's error log for an entry beginning with:ADF_FACES-60096:Server Exception during PPR, #2
    Sample code to create the af:inputListofValues dynamically
    FacesCtrlLOVBinding lovBinding = (FacesCtrlLOVBinding)ADFUtil.evaluateEL("#{bindings.City}");
    ListOfValuesModel lovModel = lovBinding.getListOfValuesModel();
    Object lovValue = lovBinding.getInputValue();
    RichInputListOfValues cityLOV = new RichInputListOfValues();
    cityLOV.setId("CityId");
    cityLOV.setLabel("City");
    cityLOV.setModel(lovModel);
    cityLOV.setValue(lovValue);
    FacesContext ctx = FacesContext.getCurrentInstance();
    ELContext elctx = ctx.getELContext();
    Application application = ctx.getApplication();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression methodExpr = exprFactory.createMethodExpression(elctx, "#{requestScope.TestBean.onLaunchLOV}", null, new Class[]{LaunchPopupEvent.class});
    cityLOV.setLaunchPopupListener(methodExpr);
    RichPanelFormLayout rpfl = getPanelFormLayout();
    List<UIComponent> children = rpfl.getChildren();
    children.add(cityLOV);
    AdfFacesContext adfCtx = AdfFacesContext.getCurrentInstance();
    adfCtx.addPartialTarget(rpfl);
    Since i do not need to filter the data shown in the dialog , is it necessary to set launchPopupListener. If yes , what would be the sample code for it.
    Can you please suggest some solution for the issue.
    Exception Detail:
    java.lang.NullPointerException
    at oracle.adfinternal.view.faces.renderkit.rich.RichRenderUtils.createValueExpression(RichRenderUtils.java:460)
    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase._createSearchResultsTable(SimpleInputListOfValuesRendererBase.java:912)
    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase._createSearchContentFacet(SimpleInputListOfValuesRendererBase.java:1137)
    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase._renderPopup(SimpleInputListOfValuesRendererBase.java:804)
    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase.renderElementContent(SimpleInputListOfValuesRendererBase.java:441)
    at oracle.adfinternal.view.faces.renderkit.rich.FormInputRenderer.encodeAllAsElement(FormInputRenderer.java:151)
    at oracle.adfinternal.view.faces.renderkit.rich.FormElementRenderer.encodeAll(FormElementRenderer.java:164)
    at oracle.adf.view.rich.render.RichRenderer.delegateRenderer(RichRenderer.java:1627)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.renderFieldCellContents(LabeledInputRenderer.java:228)
    at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.renderFieldCell(LabelLayoutRenderer.java:528)
    at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:305)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.encodeAll(LabeledInputRenderer.java:215)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1015)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:46)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1491)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1410)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
    at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:352)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:187)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
    at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._encodeAllChildren(PanelBoxRenderer.java:1352)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._renderContentRow(PanelBoxRenderer.java:1265)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:348)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer._encodeChildren(RegionRenderer.java:278)
    at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:201)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at oracle.adf.view.rich.component.fragment.UIXRegion.encodeEnd(UIXRegion.java:300)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
    at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1273)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    java.lang.NullPointerException
    at oracle.adfinternal.view.faces.renderkit.rich.RichRenderUtils.createValueExpression(RichRenderUtils.java:460)
    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase._createSearchResultsTable(SimpleInputListOfValuesRendererBase.java:912)
    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase._createSearchContentFacet(SimpleInputListOfValuesRendererBase.java:1137)
    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase._renderPopup(SimpleInputListOfValuesRendererBase.java:804)
    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase.renderElementContent(SimpleInputListOfValuesRendererBase.java:441)
    at oracle.adfinternal.view.faces.renderkit.rich.FormInputRenderer.encodeAllAsElement(FormInputRenderer.java:151)
    at oracle.adfinternal.view.faces.renderkit.rich.FormElementRenderer.encodeAll(FormElementRenderer.java:164)
    at oracle.adf.view.rich.render.RichRenderer.delegateRenderer(RichRenderer.java:1627)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.renderFieldCellContents(LabeledInputRenderer.java:228)
    at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.renderFieldCell(LabelLayoutRenderer.java:528)
    at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:305)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.encodeAll(LabeledInputRenderer.java:215)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1015)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:46)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1491)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1410)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
    at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:352)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:187)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
    at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._encodeAllChildren(PanelBoxRenderer.java:1352)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._renderContentRow(PanelBoxRenderer.java:1265)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:348)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer._encodeChildren(RegionRenderer.java:278)
    at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:201)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at oracle.adf.view.rich.component.fragment.UIXRegion.encodeEnd(UIXRegion.java:300)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
    at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1273)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1

    @sudipto : I have verified the scenerio by creating few components in a panelFormLayout and set the property(Visible-false). Then i make the comopents visible programmatically,but it does not rearrange itself rather it gets visible on the screen on the location it was created.
    @Timo : I need to arrange the LOV components that need to be added horizontally in a panelFormLayout. Therefore I have created a 4columns/1Row panel form Layout . There are two such panelFormLayouts created as i have six components that is to be added in a horizontal manner . The order in which the components are to be added cannot be determined at design time as it depends purely on the end user which components he wants to make visible on the screen , also in the order he wish to add. Hence adding the components in the panelFormLayout and using the switcher does not seem to be a feasible solution and creating the components programatically looks to be the only way as of now. Please suggest if i am missing something.
    Edited by: 907302 on Feb 7, 2012 2:11 AM

  • DVT: Graph - Issues with Automatic Sizing Inside PanelDashboard

    Hello. To start off, here is the background information:
    JDeveloper Version: Studio Edition Version 11.1.2.2.0, Build JDEVADF_11.1.2.2.0_GENERIC_120418.2212.6183.1
    WebLogic Version: JDeveloper built-in version
    Error messages received: None
    We have developed a DashboardAPI for internal use at my company that is largely based off of the example provided on the ADF Demo page:
    http://jdevadf.oracle.com/adf-richclient-demo/faces/visualDesigns/dashboard.jspx
    We have also implemented the minimize and maximize functionality as it exists in the demo. However, in all of your dashboard panel boxes, we have a dvt:Graph component as the direct child. The inline style for all dvt:graphs is "width:100%; height:100%;". The actual flash component for the dvt:graph appears to be completely stretched when the page is first rendered. You can tell this by right clicking on the graph component and selected the Flash settings; by doing this, the entire flash component becomes "grayed out". This is where you can see this. Now if you minimize the graph to the dock bar, then restore it, the panel box comes back, but the dvt:Graph "rerenders", and stretches even further to completely fill out the entire panel box. I'm trying to figure out why it would behave like this. The only difference I see is that while restoring the panel boxes from the "dock", the code performs a prepareOptimizedEncodingOfInsertedChild(), instead of when the dashboard is initially created upon first load by creating the graph components programatically and adding them directly to dashboard.getChildren().
    I have included two links to screenshots showing the before minimize and after minimize to illustrate what I mean:
    Before: http://www.flickr.com/photos/60499750@N05/8534801846/
    After: http://www.flickr.com/photos/60499750@N05/8534801824/
    Does anyone have any idea why this would happen?
    Thanks

    No ideas on this one? Maybe just point me in the right direction, something I can debug or look at? Anything would be greatly appreciated.
    Thanks

  • JD3 vs JD2 - jTabbedPane bug?

    In a JD3 applet, after placing several infobus components on each of several jTabbedPane jPanels, the applet runs in neither the appletviewer nor when deployed. However, when the applet is run in the appletviewer, it can be seen if you select the "restart" item in the pull-down menu of the appletviewer.
    When the components are placed on only the first of the jPanels, the applet does run correctly in the appletviewer and also when deployed. However, if after placing components on more than one JPanel, you remove the components from all but the first jPanel, the problem persists.
    The problem described above does not exist in JD2.

    The following problem applies to JD3 but not JD2, where things work correctly.
    The code below produces an applet with three tabs. Each tab has one or more components on it. If you drag and drop (reposition) the components on the second or third tab, the applet can neither be seen in the appletviewer nor deployed. You can reposition the components programatically, but this is impractical for the case where a few hundred components are involved.
    Is there a way to drag and drop components on these tabs without "breaking" the application?
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    import oracle.jdeveloper.layout.*;
    public class Applet1 extends JApplet {
    boolean isStandalone = false;
    JPanel jPanel1 = new JPanel();
    JTabbedPane jTabbedPane1 = new JTabbedPane();
    JPanel jPanel2 = new JPanel();
    JPanel jPanel3 = new JPanel();
    JPanel jPanel4 = new JPanel();
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    JButton jButton3 = new JButton();
    XYLayout xYLayout1 = new XYLayout();
    JTextField jTextField1 = new JTextField();
    JTextField jTextField2 = new JTextField();
    //Get a parameter value
    public String getParameter(String key, String def) {
    return isStandalone ? System.getProperty(key, def) :
    (getParameter(key) != null ? getParameter(key) : def);
    //Construct the applet
    public Applet1() {
    //Initialize the applet
    public void init() {
    try {
    jbInit();
    catch (Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    this.setSize(400,300);
    jPanel1.setLayout(null);
    jTabbedPane1.setBounds(new Rectangle(49, 5, 303, 274));
    jPanel4.setLayout(xYLayout1);
    jPanel3.setLayout(xYLayout1);
    jPanel2.setLayout(xYLayout1);
    jButton1.setText("jButton1");
    jButton2.setText("jButton2");
    jButton3.setText("jButton3");
    jTextField1.setText("jTextField1");
    jTextField2.setText("jTextField2");
    this.getContentPane().add(jPanel1, BorderLayout.CENTER);
    jPanel1.add(jTabbedPane1, null);
    jTabbedPane1.addTab("Pane 0", jPanel4);
    jPanel4.add(jButton3,new XYConstraints(126, 57, -1, -1));
    jPanel4.add(jTextField1, new XYConstraints(73, 143, 102, 23));
    jTabbedPane1.addTab("Pane 1", jPanel3);
    jPanel3.add(jButton1, new XYConstraints(126, 57, -1, -1));
    jPanel3.add(jTextField2,new XYConstraints(59, 140, 90, 23));
    jTabbedPane1.addTab("Pane 2", jPanel2);
    jPanel2.add(jButton2, new XYConstraints(126, 57, -1, -1));
    //Get Applet information
    public String getAppletInfo() {
    return "Applet Information";
    //Get parameter info
    public String[][] getParameterInfo() {
    return null;
    null

  • How to use Apache MyFaces components in JSF pages + Eclipse?

    I've managed to write my JSF web app. in Eclipse jee, and test it on JBoss 4.2 GA, within Eclipse, but how to import Apache MyFaces components into Eclipse JSF plug-in?
    If I can't import it nicely, how to use those components directly in JSF pages?

    The Tomahawk component library provides MyFaces components. Install it as you would any other component library.
    http://myfaces.apache.org/tomahawk/

Maybe you are looking for