Dynamic rendered component

Expert,
I am using jdev10g ADF BC and JSF page
I have two pages, I have a table in first page, user can select one row to edit the record in second page.
in the table in first page, there is a column called 'status'. there are total 10 status definition.
There are 10 kind input remarks corresponding to the above 10 status in second edit page.
I want when user select a reccord with status 'a', only remarks for 'a' rendered to let user enter remarks in second page, if select a reccord with status 'b',
only remarks for 'b' rendered to let user enter remarks in seconde page, .......
I have tried to use SetActionListerner : from #{row.status}, to #{processScope.status} in select comand in first page.
and using {processScope.status =='a'}, {processScope.status =='b'} , {processScope.status =='c'} ..... as remark input component Rendered property to switch off and on in second page , but it is not work?
or i need to create a bean to do it?
Please help me on that. Thanks a lot!!!
Rgds!
Merry Christmas!!!
Edited by: xsyang on Dec 29, 2010 1:31 AM

thank you so much! Suganth
my query table in first page like :
booking# date status button
====== ======== ===== ==========
001 "01/09/2010" 'confirmed' edit button
002 "30/12/2010" 'received' edit button
003 "25/10/2010" 'unpacked' edit button
I have another view object with fields : booking#( key) , date, confirm_date, confirm_remarks, received_date, received_remarks, unpacked_date, and unpacked_remarks. will drag and dropped as <af:panelForm>
I want when user click the button 'edit' , then come to the second page to edit the each booking record, based on the value of status column in first page, let see ' received' , only the received_remarks text input field display, the other two fields unpacked_remarks. confirm_remarks will not be rendered.
Edited by: xsyang on Dec 29, 2010 2:23 AM

Similar Messages

  • Dynamic rendered component doesn't appear in source file! How to get hold

    I have three select components on my page, the 1st one is selectOneRadio2, the 2nd one is selectManyCheckbox1, and the 3rd one is selectOneRadio3. The selectManayCheckbox1 and selectOneRadio3 do not display at the same time. Their rendered properties are dynamically set in the managed bean depending on the choice of the selectOneRadio2. It toggles between those two components just fine when I set the rendered property in the managed bean dynamically in a value change event, however when I tried to retrive the value from the 3rd component selectOneRadio3 which was not rendered initially (or by default), I get nothing. When I viewed the source file after the component is rendered on the page, that component is not in the source file at all, and I saw the default rendered 2nd component (selectManyCheckbox1) instead!!! How can I get hold of the later rendered component (selectOneRadio3)???
    <tr:selectOneRadio value="#{bindings.expenseTypeList1.inputValue}"
    label="Expense Type"
    binding="#{backing_eef_expense.selectOneRadio2}"
    id="selectOneRadio2"
    valueChangeListener="#{backing_eef_expense.expenseTypeChange}"
    autoSubmit="true">
    <f:selectItems value="#{bindings.expenseTypeList1.items}"
    binding="#{backing_eef_expense.selectItems2}"
    id="selectItems2"/>
    </tr:selectOneRadio>
    <tr:panelGroupLayout binding="#{backing_eef_expense.panelGroupLayout3}"
    id="panelGroupLayout3"
    partialTriggers="selectOneRadio2">
    <tr:selectManyCheckbox label="Multi Choice"
    rendered="#{backing_eef_expense.renderMultiChoice}"
    binding="#{backing_eef_expense.selectManyCheckbox1}"
    id="selectManyCheckbox1"
    valuePassThru="true">
    <f:selectItems binding="#{backing_eef_expense.selectItems4}"
    id="selectItems4"
    value="#{backing_eef_expense.itemList2}"/>
    </tr:selectManyCheckbox>
    </tr:panelGroupLayout>
    <tr:panelGroupLayout binding="#{backing_eef_expense.panelGroupLayout4}"
    id="panelGroupLayout4"
    partialTriggers="selectOneRadio2">
    <tr:selectOneRadio label="Single Choice"
    rendered="#{!backing_eef_expense.renderMultiChoice}"
    binding="#{backing_eef_expense.selectOneRadio3}"
    id="selectOneRadio3" valuePassThru="true">
    <f:selectItems binding="#{backing_eef_expense.selectItems3}"
    id="selectItems3"
    value="#{backing_eef_expense.itemList2}"/>
    </tr:selectOneRadio>
    </tr:panelGroupLayout>
    I use Trinidad components because it's a migrated application from 10g to 11g. I'm using 11g now.
    Edited by: SophiaM on Feb 3, 2011 10:23 AM

    Hi Joonas, Thank you for your replay. I don't know the answer to your question.
    First, I have no idea if that will cause any problem, or the libraries would have conflict or not if I use both within the same application. We are very careful about that becaue we had a lot trouble when we did the migration. A LOT of things were broken after the migration and some of the issues were caused by conflict on libraries. That's why although I am creating new pages in the application, I still carefully stay with Trinidad components.
    Second, out of curiosity from your suggestion, I tried to add ADF library and technology into my project, I still don't see the ADF components avaiable in my Component Palette panel, even after I restarted JDeveloper. So I don't know how to switch it even if I dare.
    I just read something like this, seems apply to my situation:
    Your correct in the fact that rendered=false is useless. However, that is not how it's typically used. Typically this will be bound to a backing bean which will allow you to turn the component on/off. You should use a hidden input field and a switcher if you need to keep the value in the form submission. Adam is totally correct in that it will break a bunch of stuff if we all of a sudden just "turned it on" because people have come to expect the current behavior.
    Do you know what a switcher is?

  • Embedded Fonts on Dynamic Label Component

    I am working on a project that calls for multiple label
    components to be dynamically rendered based on a selected comboBox
    selectedItem. The comboBox is a choice of fonts available to the
    user - all of which are embedded fonts. For some reason, the fonts
    are not embedding correctly for systems that do not have the font
    on the system.
    I have added the fonts to the library and selected "Export to
    ActionScript" as well as "Export in First Frame" (although I want
    to preload these later once this issue is resolved). In my steps to
    simplify and solve, I created a basic movie with a label on the
    stage with an instance name of "label0".
    In my Actions frame, I use the following code:
    label0.text = "This is a font test";
    label0.setStyle("fontFamily", "Vivaldi");
    label0.setStyle("fontSize", "40");
    label0.setStyle("embedFonts", "true");
    I have seen examples on the web where someone uses
    label0.embedFonts = true; but that doesn't seem to work either. I
    have also tried various fonts to verify the font will embed.
    Thinking I may not be embedding it correctly, I checked the
    bandwidth profiler and variables list and the size goes up after I
    try to embed the font as well as the label0 variables correctly
    show embedFonts = true as well as the fontFamily is set to Vivaldi
    (sample).
    Many people have used Dynamic Text Fields but I need to use a
    Label so I can use the autoSize feature as users are allowed to
    choose their own font size (between 10pt and 40pt). The label
    component seems to be the right option for me with the exception of
    the font selection. To be safe, I added a dynamic text field and
    embedded the fonts there as well and hid it off stage. When viewing
    it on another system, the dynamic text field worked (poorly) but it
    showed the font. The label did not show the correct font.
    Any help would be greatly appreciated.
    Thanks

    Yes, when I set label0.setStyle("fontSize", "40"); the size
    changes for both systems (the one that has the font installed as
    well as the one that doesn't). On the system that doesn't have the
    font, it appears as a Times New Roman font in large type.
    Reference:
    Using
    styles with the Label component (Adobe Live Docs)

  • Challenge with dynamic rendered content

    I have a complex JSF file that I want to conditionally render a portion of the page based on a dynamic value. Here is the simplified scenario.
    <h:form>
    <h:inputHidden value="#{aRequestScopedMbean.id}"/>
    <h:outputText value="JSF rocks" rendered="#{aRequestScopedMbean.showValue}"/>
    </h:form>
    ...The JSP's mbean has an id value binding which is key to determining the return value of aRequestScopedMbean.showValue. In other words the getShowValue method uses the id to determine its return result. Unfortunately, during server side processing, it appears that during the early JSF phases (I believe the restore view phase) the framework tries to determine the result from our showValue method, but that method fails because the id has not yet been restored.
    I must be missing something as this scenario seems fairly simple. The only solution that I can devise is to put the id as a session scoped variable, that is a viable solution for this trivial case, but that won't suffice because the actual pages that I'm working with would contain too much session data.
    What am I missing?
    Thanks,
    Josh.

    I don't think you are missing anything. That's just how it works.
    The rendered component property is checked many times within the lifecycle as the lifecycle methods are applied to the component tree.
    As you already seem to know, the problem is that your showValue expression is being called before you set the id value. Here are a couple suggestions:
    1. You can try to "send" the id parameter to your managed bean as an HTTP parameter. You can then set the id property on your managed bean using the managed-property element. Something like:
    <managed-bean>
    <managed-bean-name>aRequestScopedMbean</managed-bean-name>
    <managed-bean-class>foo.aRequestScopedMbean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>id</property-name>
    <value>#{param.id}</value>
    </managed-property></managed-bean>
    The setId() method will be called right after the constructor is done and this will be before your showValue method is called.
    2. It might be possible to ask the FacesContext what phase it's in or something similar and use this information in your showValue method (although that seems very messy and prone to error)
    3. As you suggest, persist the id in session. Though, as you also point out, this has it's drawbacks as well.
    In any case, you must devise a way to populate your id value before showValue gets called.

  • Dynamic declarative component won't work properly within table row

    Hi guys,
    I built a dynamic declarative component which basically consists of an af:inputText surrounded by a af:panelLabelAndMessage tag.
    The component works fine until I put it inside a table column, then none of the attribute values get set.
    The problem seems to be related to the table row binding #{row.binding.Name.inputValue} , if I use a regular binding #{binding.Name.inputValue} it works ok.
    The declarative components attribute is defined as
    <attribute>
        <attribute-name>kbez</attribute-name>
        <attribute-class>java.lang.Object</attribute-class>
    </attribute>and is used as the inputText's value attribute
    <af:componentDef var="attrs" componentVar="component">
        <af:panelLabelAndMessage label="#{attrs.label}" id="dc_plam1"
                                 for="dc_it1" labelStyle="white-space:nowrap;"
                                 showRequired="#{attrs.showRequired}"
                                 rendered="#{attrs.rendered}">
            <af:inputText id="dc_it1" value="#{attrs.kbez}"
                          autoSubmit="true" immediate="false" ...>The component inside a table column is set like this
    <af:declarativeComponent viewId="/WEB-INF/ikb.adf.kreda.basis/mitarbeitersuche/ddc/mitarbeiterLOV.jsff"
                             id="ddc1" label="Mitarbeiter"
                             kbez="#{row.bindings.Kbez.inputValue}"/>My JDeveloper version is 11.1.1.5.
    Am I doing it wrong or is this a bug?
    Any help is appreciated.
    Thank you,
    Achim
    Edited by: Achim Rosenfeld on Mar 8, 2013 8:41 AM

    Hi,
    +#{row.binding.Name.inputValue} , if I use a regular binding #{binding.Name.inputValue} it works ok.+
    Don't think that #{binding.Name.inputValue} works okay in a table because it doesn't stamp the component per row. Actually I don't know if we support dynamic declarative components in a stamped environment (table). I know though that we don't for taglib declarative components in this context.
    Reason why it doesn't work: Tables are stamped at runtime, which means that for better performance, only the generated HTML is reused for each row with different data - not the component. Your component requires itself to be re-created for each row so it can re-read the attribute again. This is not the case in a stameped environment
    Solution: For your particular use case I don't think that a dynamic declarative component is needed as you can add the construct (af:inputText surrounded by a af:panelLabelAndMessage) directly into an af:column tag. The declarative component makes more sense for reuse of layout areas (e.g. custom tabs) that are iterated within an af:forEach (in which case instances of the decalarative components would be created).
    Bottom line: tables stamp their components and as such the attribute property exposed on a DDC doesn't seem to be called for each row, which is by design. This can be considered a bug if there is a use case demanding for a DDC in a table. If this is a requirement for you (and you can't directly add the components to the af:column tag) feel free to file this as a service request with customer support (required a support contract) so development can have a look if the requirement is feasible to implement.
    Frank

  • Dynamic Form componants in my jsf page?

    how could i make dynamic form componant in my jsf page ,depend on user inputs or result from database or whatever , where i use sun studio creator ???

    you need to use the "rendered" attribute of the components...
    for example in your jsp put this...
    <h:outputText value="Hello" rendered="#{myBean.renderHello}"/>
    the render hello method looks like this in your backing bean "myBean"
    public boolean getRenderHello() {
    return true; // or false
    if getRenderHello() returns true, "Hello" will be displayed, if getRenderHello() returns false, it will not...
    you can also use expressions in the jsf... for example...
    <h:outputText value="Hello" rendered="#{myBean.someNumber == 5}"/>
    if the "getSomeNumber()" method in your backing bean returns 5 it will be true and "Hello" will show up... otherwise it won't... :)
    Hope this helps...
    -Garrett

  • Dynamic add component to panel, it does't work

    I want to add a label in a panel when you click button.
    I used revalidate() and revalidate() method, but it didn't appear in panel.
    HELP ME?? WHAT'S WRONG!
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    jPanel1.add(new JLabel("Hello"));
    jPanel1.revalidate();
    jPanel1.repaint();
    }

    i add Layout manager to panel. It works. Thanks,
    So tricky things for dynamic adding component:
    1, setup layout manager to container (such as panel),
    2, add component to container
    3, call revalidate() method to relayout these components in container
    You can't miss any one of those.
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    jPanel1.setLayout(new FlowLayout());
    jPanel1.add(new JButton("Hello"));
    jPanel1.revalidate();
    }

  • Dynamically add component question?

    Hi:
    Here is part of my code in short:
    public class TextInputWithAutoComplete extends TextInput
    private function addComp():void{
    list = new List();
    list.id = "autoCompleteList";
    list.x = 0;
    list.y = 20;
    list.addEventListener(MouseEvent.MOUSE_UP, handleMouseDown);
    parentDocument.addChild(autoCompleteList); OR addChild(autoCompleteList); //my question is here
    private function handleMouseDown():void{
    //TODO
    I realized that if I do addChild, I can't really see the dynamically added component, since flex did not reserve space for my List to display. So I do parentDocument.addChild, and then the component appears no problem. My question is since it's being added in the parentDocument, so it is suppose to be a component belong to parentDocument, so is that component still be able to call this handleMouseDown?
    From my experience, it's still able to, but which doesn't make sense to me.
    Can someone explain a little about why it can still work, or any better approach other than parentDocument.addChild
    Thanks.

    In Flex there is a lifecycle that represents the contract between the component and its parent.  See the chapters on creating custom components and the lifecycle methods createChildren, commitProperties, measure and updateDisplayList.
    Some components size to content like Containers.  When you add a child to a container it will measure the child and make room for it or add scrollbars if there isn't enough room.
    If you add a child to TextInput, it doesn't expect additional children so it will not make room for it.  You can subclass and override its measure and updateDisplayList methods to make room for an additional child.
    I would not recommend adding another interactive control to an interactive control since that will make managing focus and accessibility much harder.  It is better to group these in a container in most cases.
    The reason the mouse handler still gets called is because a handler can be on any object whether it is a child or sibling or parent and will be called by the object dispatching the event if the handler is listening to that object.  If you had attached the handler to "this" it would not get called when the List is not a child of "this".
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Dynamic Declare Component cannot find property

    We currently have one main page calls a DDC(Dynamic declarative component) page fragment to create/update a record in database. The main page pass in a key to DDC when it loads DDC. The DDC binds to a view object with bind variable (get value from the passed key and load data from table) and several LOV attributes. Once user clicks submit button in main page, we wish that all the fields displayed in DDC could be committed to a database table to save.
    I use 11.1.1.5.
    In order to assign the bind variable of VO, we wrote a method in Application Module and make it invoked as the first executable when the main page is loaded. The deployment is fine. However, the runtime always thrown some exception to complain it cannot find property definition like this:
    ####<Aug 15, 2011 6:32:24 PM CDT> <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <curmailts1-corp> <AdminServer> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <6b1af60b3a40d50a:-6c52e935:131cfc2d522:-8000-000000000000024c> <1313451144494> <BEA-000000> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    javax.el.PropertyNotFoundException: Target Unreachable, 'WorkDescription' returned null
         at com.sun.el.parser.AstValue.getTarget(Unknown Source)
         at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
         at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:486)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:416)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.beforeEncode(LabeledInputRenderer.java:128)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:334)
         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)
    Questions: 1) Why my method in Application Module not called?
    2) Whether DDC is a right solution for our use case? Any suggestion or sample are welcomed!
    Thanks,

    Hi,
    I appreciate if you can show your code, but before that, make sure if you're following this tip below:
    "Declarative Components are regular JSF components except that they are built as a composite out of existing ADF Faces components. Declarative components cannot have a PageDef file associated with it and instead use value or method attribute to communicate with the consuming page. When creating a declarative component, the attrs implicit object is defined that allow you to reference the component's exposed value attribute from ADF Faces components within.
    An input text field contained in an declarative component may reference a value attribute "compValue" defined on the declarative component by using the following EL
    #{attrs.compValue}
    The declarative component compValue attribute then would us an EL reference like shown next to read/write values from or to the ADF binding layer:
    #{bindings.attribute_name.inputValue}"
    (Oracle ADF Code Corner)
    Regards,

  • Renderer Component

    I have a renderer component that looks like this:
    <mx:Canvas 
    xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Label id="rowLabel" textAlign="left" width="100%">  
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert; 
    override public function set data( value:Object ):void 
    super.data = value; 
    rowLabel.htmlText = data.REMA2W;
    ]]>
    </mx:Script>
    </mx:Label>
    Looks like the samples I see but does not show any data. I have tried alot, posted alot and it does not seem to be an issue for anyone else. How can I show data where the rowLabel is?
    REMA2W is a long description and myWine is the ArrayCollection
    Have tried:
    data.REMA2W
    value.REMA2W
    parentDocument.myWine.getItemAt(0).REMA2W - this shows the first record but cannot seem to just get each row, I'd think it would be like this:
    parentDocument.myWine.REMA2W but no go.
    I have also tried looping but I dont think thats right either
    Any thoughts would be great this is the 3rd week I have been at this.
    Thanks
    George

    This is my ADG it gets filled in from a remote Object...
    <mx:AdvancedDataGrid 
    id="adg" displayItemsExpanded="true" width="100%" height="100%" themeColor="#73B9B9" initialize="gc.refresh()">  
    <mx:dataProvider>
    <mx:GroupingCollection id="gc" source="{myWine}">  
    <mx:Grouping groupingObjectFunction="grpObjFunc">  
    <mx:GroupingField id="gf" name="myHeader"> 
    <mx:Array id="summ">  
    <mx:SummaryRow summaryPlacement="group">  
    <mx:fields>
    <mx:SummaryField dataField="REMA2W" label="REMA2W"/>  
    <mx:SummaryField dataField="myList" operation="SUM" label="myTotal"/>  
    </mx:fields>
    </mx:SummaryRow>
    </mx:Array>
    </mx:GroupingField>
    </mx:Grouping>
    </mx:GroupingCollection>
    </mx:dataProvider>
    <mx:groupedColumns>
    <mx:AdvancedDataGridColumn dataField="CMPT2W" headerText="Item" minWidth="175"/>  
    <mx:AdvancedDataGridColumn dataField="DESC2W" headerText="Desc"/>  
    <mx:AdvancedDataGridColumn dataField="SDIVDE" headerText="Size" width="50"/>  
    <mx:AdvancedDataGridColumn dataField="NOFF2W" headerText="Btls" width="50" textAlign="right"/>  
    <mx:AdvancedDataGridColumn dataField="BPRC5W" headerText="Inc BBC" width="60" textAlign="right" />  
    <mx:AdvancedDataGridColumn dataField="myList" headerText="List" width="60" textAlign="right" />  
    <mx:AdvancedDataGridColumn dataField="myTotal" itemRenderer="com.esria.samples.dashboard.view.NumberItemRenderer" headerText="Cost" width="60" textAlign="right"/>  
    <mx:AdvancedDataGridColumnGroup headerText="Inventory">  
    <mx:AdvancedDataGridColumn dataField="INV_41" headerText="Morgan Hill" width="60" textAlign="right" visible="{myDetail.selected}"/>  
    <mx:AdvancedDataGridColumn dataField="INV_31" headerText="Chino" width="60" textAlign="right" visible="{myDetail.selected}"/>  
    </mx:AdvancedDataGridColumnGroup>
    </mx:groupedColumns>
    <mx:rendererProviders>
    <mx:AdvancedDataGridRendererProvider dataField="REMA2W" columnSpan="5" columnIndex="1" depth="1"renderer="com.esria.samples.dashboard.view.SummaryRenderer"/>
    </mx:rendererProviders>
    </mx:AdvancedDataGrid>

  • Dynamic Rendering of Child Component based on SQL Query

    I want to preface this with I am very new to ADF.
    I have a page with a parent-multi child (tabbed) layout, and what I want to do is render one of the children based on the values of a sql query. I tried creating a manged bean but I had no idea how to get the database connection, so I added a method to my application module implementation instead. The method is of type boolean that runs my sql query and based on the results, returns true or false. I then set the tab's Rendered property to this method, #{bindings.method.execute}. Unfortunately, when I run the application the tab is not rendered, no matter what the value of the results. I therefore set a breakpoint on the code and ran it through the debugger, but the code is never being executed.
    If anyone could help, it would be greatly appreciated.
    I am running JDeveloper 11.1.1.3, hitting an Oracle 11g database, using ADF BC.
    Thanks,
    Michelle

    I don't really know what you mean, here is my code:
      public boolean checkLevel2Needed(String revwId)
        PreparedStatement stmnt = null;
        StringBuffer sql = new StringBuffer();
        Object[] procArgs = new Object[]{ revwId };
        ResultSet rs = null;
        boolean level2Required = false;
        System.out.println(revwId);
        sql.setLength(0);
        sql.append("Select count(*) as yesCount from usq.vu_review_response ");
        sql.append(" where revw_id = ? ");
        sql.append(" and gp_name = 'Level 1 Screen' ");
        sql.append(" and resp_text = 'Yes' ");
        try
          stmnt = getDBTransaction().createPreparedStatement(sql.toString(), 0);
          if (procArgs != null)
            for (int z = 0; z < procArgs.length; z++)
              stmnt.setObject(z + 1, procArgs[z]);
          rs = stmnt.executeQuery();
          if (rs.next())
            if (rs.getInt("yesCount")>0)
              System.out.println(rs.getInt("yesCount"));
              level2Required = true;
          rs.close();
        catch (SQLException e)
          throw new JboException(e);
        finally
          try
            if (stmnt != null)
              stmnt.close();
          catch (SQLException e) {}
        return level2Required;
      }But I don't think it is ever executing this code, the system.out.println's don't show up in the console and if I run it through the debugger with a breakpoint it never stops.
    What I really need is for this code to execute when I enter this page, and also any time the page is updated. Should I be using a backing bean?
    Thanks,
    Michelle
    Edited by: MSchaffer on Jan 6, 2011 5:27 PM

  • Dynamic selectOneChoice component default value problem

    Hi again,
    I'm facing a big problem. I have created a selectOneChoice which is binded to a dynamic list:
    <af:selectOneChoice value="#{bindings.managerId.inputValue}"
    label="Manager" valign="middle"
    binding="#{backing_searchDocuments.managersList}"
    valuePassThru="true" immediate="false"
    rendered="#{bindings.ListManagersIterator.estimatedRowCount > 1}">
    <f:selectItems value="#{bindings.managerId.items}"/>
    </af:selectOneChoice>
    Binding is used to set the default value of the component:
    public void setManagersList(CoreSelectOneChoice managersList) {
    this.managersList = managersList;
    BindingContainer bc = this.getBindings();
    DCIteratorBinding dcIterBinding =
    (DCIteratorBinding)bc.get("ListManagersIterator");
    Row[] rwarray = dcIterBinding.getAllRowsInRange();
    FacesContext ctx = FacesContext.getCurrentInstance();
    Application app = ctx.getApplication();
    ValueBinding bind = app.createValueBinding("#{backing_userBean.userName}");
    Object o = bind.getValue(ctx);
    if (rwarray != null) {
    for (int i = 0; i < rwarray.length; i++) {
    if (((String)rwarray.getAttribute("Manager")).equalsIgnoreCase((String)o)) {
    this.managersList.setValue(i);
    break;
    Everything works fine until I press the link which redirects me to the same page where I am and then default value isn't shown.
    Where could be the problem?

    I've created a testcase replicating the same problem. The results showed that when using for example commandLink component redirecting to the same page default selected value is shown properly but if using commanMenuitem redirecting to the same page default value dissapears..
    Where could be the problem?

  • Dynamic create Component usage and embed it in view container

    There is a view_container_uielement VC_TEST  in view V_MAIN, in wd component ZTEST.
    I created a web dynpro component named ZWDR_TEST and add it into the wd component ZTEST.
        gr_comp_test = component->create_cmp_usage_group(
          name = 'TEST_GROUP'
          used_component = 'ZWDR_TEST' ).
        lr_comp_usage = me->gr_comp_test->add_component_usage(
          embedding_position = 'V_MAIN/VC_TEST'
          name = 'TEST'
          used_component = 'ZWDR_TEST' ).
        if lr_comp_usage->has_active_component( ) is initial.
          lr_comp_usage->create_component( component_name = 'ZWDR_TEST' ).
        endif.
        ifc_test ?= lr_comp_usage->get_interface_controller( ).
    I thought the wdr ZWDR_TEST was embeded in the view V_MAIN in the position VC_TEST by the embedding_position parameter.
    But in the result web page, there is no ZWDR_TEST in the position of VC_TEST.
    Could any one explain why?
    Thanks

    Hi,
    for dynamic comp usage.. check this..
    http://help.sap.com/saphelp_nw70/helpdata/en/bc/191a427ff6db2ce10000000a1550b0/frameset.htm
    Dynamic Component Usage
    embed view
    Dynamic View embed
    How to create a webdynpro view dynamically and embed into view container?
    Cheers,
    Kris.

  • How to get the Dynamic UI component value from JSFF page to any managedbean

    HI ,
    We have list of bean objects in jSF page we are iterating the list of bean using the forEach loop and displaying the value into Input type text (UI component) value filed .
    If we try to get the UI component value in Managed bean we are not getting the dynamic values .
    The below piece of code used to retrieve the dynamic values from the JSF page doesn't have any form :
    UIComponent component = null;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
    UIComponent root = facesContext.getViewRoot();
    component = findComponent(root, componentId);
    then component type casting to the based on UI component which we trying to access and getting the value as " NULL " ..Please let me know how to get the dynamic values form the JSF ?
    Please let me know if any other approach or any changes required on above ?
    Thanks

    Hi,
    the root problem is this
    <h:inputText id="it3" value="#{familyList.ctn}" />
    <tr:commandButton text="Save" id="cb3"Note how each row writes to the same managed bean property, thus showing the same data. Instead your managed bean should expose a HashMap property that you then apply values to using a key/value pair. The key could be the ID of the field, which then you also should dynamically define e.g. cb<rowIndx>. The command button could then have a f:attribute assigned that has the row HahMap key as a value. This way you truly create value instances for the object
    Frank

  • Dynamically Rendering and editing JTable cell

    Hi all,
    I wonder if some body can help me.
    As in my application each cell in Jtable returns java Object. and what i am trying to do is based on each object returned in cell my renderer is going to change dynamically. for example if the object returned is primitive data types the renderer is defualt, if the returned object is Map, Set or List, then the Cell Renderer should show clickable button with icon on right hand side and TextField on left hand side and so on for other objects. i am able get renderer for Map, set or list, which is button on right hand side of cell and text field on left hand side displaying toString of Object. then what i want is when i click button it should show those values in popup window and if i double click it should edit the cell which i am able to do it. so how can i handle events or what i have to do to make button clickable. if any body come accross these situations or got idea. please let me know how to move further.
    Thanks,
    Kotesh.

    Hi,
    Thanks for your advise and as i said i am able to get render for Map as (TextField in left hand side+Button with icon in right hand side side) of Cell. but what i need is when i click button which is on right hand, then i should be able to show popup wvindow with map values and if i double click on TextField which is on right hand side, then i should be able to edit Cell which is happening. but i am not able to get popup window when i click button on right hand side of cell. basically i am not sure how to handle events on cell and the button on right hand side?
    if some one can guide me that will be great as i am in big trouble.
    Thanks
    Kotesh.

Maybe you are looking for

  • Guest OS Frezzeing on Virtual Host

    Hello Everyone, I am looking for a second opinion into an issue we are experiencing. We have a virtual server running server 2012 R2 Hyper-V. It has 6 Guest OS's on it (Server 2012 R2) Running web servers. Every so often i find 1 virtual "dead in the

  • Mail transfer - no messages in mailboxes

    I transfered my mailboxes to a new computer by copying the files in Library-Mail-Mailboxes to an external hard drive and then dropped them onto a new Mac Book Air. The mailboxes are showing up perfectly but there are no messages contained within each

  • Need Script to save multiple FrameMaker 9.0 files as .mif

    I am using FrameMaker 9.0 on a PC. I have a number of UNIX scripts that work on .mif files. With the older versions of FrameMaker, I was able to run FrameMaker on Unix and use the batch capabilities to create a script that opened the book and saved e

  • Edit Idoc destination port in control header

    Hello to all, I've generated a lot of idoc's with the wrong port name in the idoc control header. So all Idoc's went in status 29 "Error in ALE service" Is there a way to set the receiver port in the idoc control header manually? Please help Thanks C

  • Non-blocking SocketChannels

    I'm trying to learn how to use non-blocking socket channles, but I haven't found much info (nor luck) so far. To learn, I'm building a server and a client. The server accepts input from the clients and process it in only one thread. The clients shoul