ADF Faces - how do stop table navigation?

im have <af:table with rangeChangeListener="#{ResPage.RangeChL}" on JSF page
in RangeChL im check on last rows in ResultSet:
if(sr.rs.isLast())
System.out.println("%%%%%%%%AbortProcessingException");
// throw new AbortProcessingException("EEEENNNNDDDD!!!");
is record is last - im generate new AbortProcessingException.
But it dont stop table from switch on next range.
where I was wrong? why its dont work?

Im also try generate
System.out.println("%%%%%%%%AbortProcessingException");
sr.rs.previous();
sr.rs.previous();
throw new AbortProcessingException("EEEENNNNDDDD!!!");
in rangeChangeListener without condition - on each change. But it dont stop navigation on table ...

Similar Messages

  • ADF Faces - ConvertNumber, aligning in table column

    Is there a way in ADF Faces to display a table with a column of currency figures, with possible trailing sign for negatives, aligned on the decimal point? With a total at the bottom? These seem like such elementary requirements, but I can find no reference to them in the documentation. ConvertNumber javadocs mentions a pattern property, but no details of what constitutes a pattern.
    Any help gratefully received.

    Hi,
    drag and drop the ConvertNumber component and double click on it in the StructureWindow of the page (strl+shift+s). This brings up a dialog that provides help when moving the mouse over the labels
    As a pattern try e.g. 0000.00
    The currency can be specified in the last field as the type. The symol can be expressed as a character $ or in ISO format USD
    There is no native component to compute the total, but since the table shows the values in page ranges, you can add a output field and compute this information in a backing bean
    Frank

  • ADF Faces: How do I set values for input controls in an af:table

    Use case: user enters master/detail information into an input form using an af:table for the desired number of detail rows.
    I have an ADF Faces input form with master level input controls, and an af:table (bound to a backing bean CoreTable) for the detail data set.
    The input controls are value bound to updateable view objects built from entity objects, with the appropriate view links providing master/detail iterators.
    Once the user has entered the master keys (via inputTexts, and selectOneChoices), I create a row in the detail VO, thus creating a visible blank row in the af:table.
    The user then completes the key for the detail row (in the af:table) by selecting a value in a selectOneChoice (in a af:column) with autoSubmit on and a valueChangeListener that sets the VO row attribute with the new value.
    The user then continues to enter into the remaining inputTexts and selectOneChoices in the af:columns until all values have been entered.
    I do not have autoSubmit on for any input controls in the af:columns other than the key, for performance improvement.
    The user can then use a command button (which has an action method) to create another row in the af:table.
    But, (in the action method) I need to set the values for the 1st detail VO row attributes, from the input controls, before creating another row.
    The input controls are bound to backing bean CoreInputText and CoreSelectOneChoice objects, and they have not set their values at this point, even though I have partialSubmit on for the "New Row" command button.
    I do not value bind the input controls in the af:columns to the backing bean objects, because we need to display data for all rows entered into the af:table.
    Any advice on the best way to perform this operation would be very appreciated!!!!

    Thanks for the reply Steve!!
    Yes, I followed the techniques in Screencast#7, and it works great in my edit page.
    But I am having problems with my input form.
    I actually have master/detail/detail relationship for which I am creating an input form.
    I created the input form as a copy of the edit form, and am making revisions as necessary.
    I created new view objects for the input form (from my three entity objects), which have the "Tuning" set to retrieve "No Rows (i.e. used only for inserting new rows)"
    I added an invokeAction that binds the "CreateInsert" action on the master iterator, so when the page is first displayed, the master level controls are available for data entry (as in 13.6.2 in the Developers Guide): but the first level detail controls are not rendered, and the af:table (for the second level detail) is rendered but with no rows.
    Once the user enters key values for the master (a three part key), I manually create a first level detail row by executing the "CreateInsert" action binding for the first level detail iterator.
    Continuing on, the user then enters a key value for the first level detail I manually create a second level detail row using it's "CreateInsert" action binding.
    Now the user has a form with all master and first level detail controls completed and one empty row in the af:table for it's first entry.
    The key column in the af:table has autoSubmit on, and an value change listener. That listener uses it's getNewValue() to set the key value ("locationCode" in this case) using
    setLocationCode from the ViewRowImpl. Here is that value change listener:
    public void locationChanged(ValueChangeEvent event) {
    if (null != event.getNewValue()) {
    LocObsCreateViewRowImpl locCreateRow = (LocObsCreateViewRowImpl)appMod.findViewObject("LocObsCreateView").getCurrentRow();
    if (null == locCreateRow.getLocationCode()) {
    locCreateRow.setLocationCode(event.getNewValue().toString());
    Now comes my problem: once they have entered the values in the remaining columns, they can use a command button to create another row in the 2nd detail iterator, thus creating another visible empty row in the af:table. But the values from the first row (other than the key column) are not assigned to the row in the collection and I can't figure out how to set values in the collection's row.
    I imagine I'm missing something using bindings and the Request Processing Lifecycle, and after reading this I can see how much manual work is going on.
    The users have specified the need to have all information available on one page, so I've designed it so they can insert and iterate through the first level detail collection.
    They have also asked to not use the mouse; they are looking for a "heads-down-data-entry" system.
    Again, I really appreciate any advice you could give.
    Jeffrey

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

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

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

  • ADF Faces - indenting text in table column.

    Is there a way to indent text in an ADF Faces coreColumn component? I'm trying to represent a recursive tree structure in a CoreTable. I've tried inserting object spacers depending on the depth of each node in the tree, but Faces then wraps the text after the spacers, even when I specify no wrap for the column.
    Better yet, is there a way I could do this with a tree component? I've tried separating the different levels into different collections with separate custom methods, but I don't know how to specify the master/detail relationships between them.
    Any suggestions gratefully received.
    Brian Spear.

    Thanks, Frank. I don't think a tree table is the answer; it has the same requirements as the tree (or so I understand) with regards to populating each level from a different collection, and foreign key relationships. Not suitable for recursive relationships. Furthermore it only shows a small part of the tree at a time. I've got as far as returning a list of nodes within a structure, and I can display the structure, with icons for expanding and collapsing the nodes. All I need now is a way to indent the levels so the structure is more visible. The best I've managed so far is by inserting ". . ." in the text itself on each lower level, to make the left-justified text look indented. Obviously, I'd like a better way, that can be implemented in the view layer.
    Is there maybe a way of nesting objects within an outputText component so that it doesn't wrap? Must look into that.
    Thanks again.
    Brian Spear.

  • ADF Faces: How to get the ADF BindingContainer in a managed bean?

    Hi,
    I not sure how to get the BindingContainer instance from inside of a managed bean method. I have tried the following config, but it does not work in all situations.
      <managed-bean>
        <managed-bean-name>backing_showBooks</managed-bean-name>
        <managed-bean-class>view.backing.ShowBooks</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
        <managed-property>
          <property-name>bindingContainer</property-name>
          <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
          <value>#{bindings}</value>
        </managed-property>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1showBooks.jsp-->
      </managed-bean>When an ActionListener- method of my ShowBooks bean is called the property bindingContainer is NULL!!
    Is there a save way to get the BindingContainer in my bean??
    Any hints are welcome.
    Thanks,
    Markus

    Maybe I just need another pair of eyes but when I set this up as explained and watch it in the debugger my method public void setBindingContainer(DCBindingContainer bc) gets called but bc is null. Can anyone help?
    Thanks
    Backing Bean-
    private DCBindingContainer bindingContainer;
    public void setBindingContainer(DCBindingContainer bc) {
    this.bindingContainer = bc;
    public DCBindingContainer getBindings() {
    return bindingContainer;
    //I just threw this method on there in case I was missing something & I also
    //tried using a getBindingContainer method above but that didn;t work.
    public void setBindings(DCBindingContainer bindings) {
    this.bindingContainer = bindings;
    adf-faces.conf entry
    <managed-bean>
    <managed-bean-name>backing_VunerabilityDetail</managed-bean-name>
    <managed-bean-class>viewcontroller.backing.VunerabilityDetail</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindingContainer</property-name>
    <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
    <value>#{bindings}</value>
    </managed-property>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1VunerabilityDetail.jsp-->
    </managed-bean>

  • ADF Faces: how to extend one of the faces components

    Hi all,
    I am thinking of extending the built-in ADF Faces CommandMenuItem component (to work around a bug that was filed). The only thing that I think I need to do is to add an additional property - I don't believe that I will need to add any additional behavior to the tag.
    Can anyone comment on (high level) the steps that I would need to go through? I'd like to
    a). Add the property
    b). Make sure the property shows up in the JDev property inspector
    c). Inherit everything else from CoreCommandMenuItem.
    I've looked at the source code (from the Apache guys), and this doesn't look too hard. I don't want to re-compile the whole Apache drop, just create a new component as described above, but I've no idea really where to start.
    Any insights appreciated,
    John

    Hello John,
    I don't know how possible it will be. It depend on what kind of property you want to add. Here are the general indications to acheive this.
    1) Make a custom component class extending CommandMenuItem class and add an additional property.
    2) Extends the commandMenuItem tag clas with your own
    3) override the method public void setProperties(javax.faces.component.UIComponent component)
    you just have to call the parent first which is the specification behavior anyway, so:
    public void setProperties(UIComponent component) {
    super.setProperties(component);
    // Cast the component to your component class and set your additional property on it
    4) The hard part... This is where I'm unsure of the procedure, but I would say that you'll have to extends ADF Faces's renderer for commandMenuItem and find a way to push the property in it if it has to be sent to the client. This seem really annoying to do. One way to do it would be to wrap the ResponseWriter so you can intercept what the parent renderer encodes and insert your property in the right spot. That strategy requires an additional (probably intern) class extending ResponseWriter. Then you would have to do something like this:
    FacesContext context = FacesContext.getCurrentInstance();
    ResponseWriter initial = context.getResponseWriter();
    context.setResponseWriter(new MyWrapperWriter(initial));
    super.encodeBegin(context, component);
    context.setResponseWriter(initial);
    The Wrapper would have to override all methods and delegate the call to the wrapped instance. When calling startElement(String) you would add a call to writeAttribute for your own property.
    5) For showing the property in the property editor panel you must fill a faces-config.xml file with the <component> tag. Since that one does not allow inheritance (which is really annoying imho) you'll have to copy most of the properties from adf faces' faces-config.xml file.
    6) Fill the tld for your new tag
    7) JAR the whole thing
    8) Edit your tag library from Tool in the menu I think (not on a computer with JDev installed atm so cannot be sure). Add your library that you just created. If faces.config.xml and the .tld are well made JDev will figure prety much everything on its own. You will now have a new choice in the dropdown menu of the component palette for your custom library.
    I hope I was decently clear.
    Regards,
    Simon Lessard

  • ADF Faces: How to position define table navigation in custom skin?

    Hi,
    I played a bit with custom skins. I'am just wondering how you can choose the location of the navigation button ( << Previous | 1-10 of 32 | Next >> )
    For example, if I use the oracle skin, it appears both at the top and at the bottom. In an other skin I used, the navigation was only at the top and not at the bottom. I just can't figure out how this is determined in the css stylesheet, or is it simply not possible because the custom skin is derived from the Simple skin?

    Add the following to the css for your skin:
    af|table::control-bar-bottom
    visibility:hidden;
    This will hide the bottom control bar, which contains the navigation at the bottom of the table, from view.
    Regards,
    Ric

  • ADF Faces - How to create an editable rich table at runtime

    Hi,
    JDeveloper version - 11.1.1.4.0
    I have been trying to create an editable table (wherein the user can enter text into the input text boxes contained in the columns added at runtime). The values thus entered are to be captured in the backing bean for further processing.
    Below are my attempts to achieve this in various ways but without success.
    Attempt 1 : Created a Read-Only Dynamic table by dropping the view object instance from the Data Control. Here, the default being output text components, I used input text components and programatically make it updatable in the backing bean, which however, shows as an output text component.
    1) UI - .jspx file
    <af:table rows="#{bindings.TestViewObject1.rangeSize}"
                        fetchSize="#{bindings.TestViewObject1.rangeSize}"
                        emptyText="#{bindings.TestViewObject1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        var="row" rowBandingInterval="0"
                        value="#{bindings.TestViewObject1.collectionModel}"
                        selectedRowKeys="#{bindings.TestViewObject1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.TestViewObject1.collectionModel.makeCurrent}"
                        rowSelection="single"
                        id="t1"
                        partialTriggers="::cb1 ::cb2"
                        binding="#{TestDynamicTable.t1}">
                <af:forEach items="#{TestDynamicTable.attributeDefns}"
                            var="def">
                  <af:column headerText="#{def.name}"
                             sortable="true" sortProperty="#{def.name}" id="c1">
                    <af:inputText value="#{row[def.name]}" id="it1"
                                  label="Label 1"
                                  autoSubmit="true" />               
                  </af:column>
                </af:forEach>
              </af:table>2) Backing bean -
        public void listenMeForAction(ActionEvent ae) {
           //adding attribute dynamically
          ViewAttributeDefImpl def = (ViewAttributeDefImpl)vo.addDynamicAttribute("testDynamicAttr"+columnCount);
          def.setUpdateableFlag(def.UPDATEABLE);
         byte b = def.UPDATEABLE;
         def.setEditable(true);
         //def.setProperty(def.ATTRIBUTE_CTL_TYPE,);
         //def.getUIHelper().HINT_NAME_UPDATEABLE
         def.setProperty(def.ATTRIBUTE_DISPLAY_HINT_DISPLAY, def.HINT_NAME_UPDATEABLE);
         columnCount ++ ;
         AdfFacesContext.getCurrentInstance().addPartialTarget(this.t1);
    Attempt 2 : Created a ADF table by dropping the view object instance from the Data Control. Here, the columns and its cells are added programatically in the backing bean. However
    1) UI - .jspx file
    <af:table value="#{bindings.Test5ViewObj1.collectionModel}" var="row"
                        rows="#{bindings.Test5ViewObj1.rangeSize}"
                        emptyText="#{bindings.Test5ViewObj1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.Test5ViewObj1.rangeSize}"
                        rowBandingInterval="0"
                        id="richDynamicTable"
                        binding="#{TestDynamicTable.richDynamicTable}">
    </af:table>2) Backing bean - When the buildRichTable method is invoked from the constructor, the table shows the input text boxes as required, but the entered values is not getting retrieved (). Tried adding a valuchangelistener to the added cell, but this does not fire as well.
    Below code however, creates a new instance of RichTable. Also, if an overloaded method is invoked on an ActionEvent, the columns added are not displayed.
      //called from costructor 
      public void buildRichTable() {
        dynamicVO.clearCache();
        //create this table
        richDynamicTable = new RichTable();
        int noOfCols = 2;
        for(int i=0; i<noOfCols; i++) {
          //create new column for the table
          richDynamicCol = new RichColumn();
          richDynamicCol.setHeaderText("ColTest"+i);
           // richDynamicCol.isVisible()
           // richDynamicCol.setVisible(arg0);
          richDynamicCol.setParent(richDynamicTable);
          richDynamicTable.getChildren().add(richDynamicCol);
          richDynamicTable.getChildCount();
          richDynamicTable.getRowCount();
          richDynamicCell = new RichInputText();
          richDynamicCell.setLabel("aCell"+i);
         // richDynamicCell.isVisible()
            MethodExpression methodExpression = FacesContext.getCurrentInstance().getApplication().
                                                                      getExpressionFactory().createMethodExpression(
                                                                        FacesContext.getCurrentInstance().getELContext(),
                                                                        "#{TestDynamicTable.inputBoxValueChangeListener}",
                                                                        null,
                                                                        new Class[] {ValueChangeEvent.class});
          //this does not work too - on adding some text and tabbing out
          richDynamicCell.addValueChangeListener(new MethodExpressionValueChangeListener(methodExpression));
          richDynamicCell.setParent(richDynamicCol);
          richDynamicCell.setValue("#{row.ColTest"+i+"}");
          richDynamicCol.getChildCount();
          richDynamicCol.getChildren().add(richDynamicCell);
         dynamicVO.addDynamicAttribute("ColTest"+i);
        //dynamicVO.insertRow(dynamicVO.createRow());
        dynamicVO.getRowCount();
       AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicTable());
       AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCol());
       AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCell());
       buildTable = false;
       this.setDynamicVO(dynamicVO);
    //captures the input data
      public void captureRichTableData(ActionEvent ae) {
    //gives null below
        this.getDynamicVO().getCurrentRow().getAttribute("ColTest0");
        this.getDynamicVO().getCurrentRow().getAttribute("ColTest1");
    //again null   
        List<UIComponent> listCols = richDynamicTable.getChildren();
        for(UIComponent aColComp : listCols) {
            RichColumn aCol = (RichColumn)aColComp;
            List<UIComponent> listCells = aCol.getChildren();
            for(UIComponent aCellComp : listCells) {
              RichInputText anInputText = (RichInputText)aCellComp;
                anInputText.getValue();
      }Not sure what I must be missing. May be I need to add bindings to the text boxes added but cant figure how to go about it. I found some posts on dynamically adding columns pointing to displaying contained data. Any help would be highly appreciated.
    Thanks for your time.
    Dinu

    Hi,
    Not too sure if I am heading the right way, but tried adding the bindings and value expression at runtime for the added columns. The values added at the screen is again found null at the VO and RichInputText child / cell. The updated method is as below -
          buildRichTable() {
          //adding binding for the added cell
          DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
          if(bc.findCtrlBinding("ColTest"+i) == null) {
              bc.addControlBinding("ColTest"+i, new JUCtrlAttrsBinding(null,
                                                     bc.findIteratorBinding("Test5ViewObj1Iterator"),
                                                         new String[]{"ColTest"+i}));
          //the expression to be set in value attribute for richInputText component 
          String theExpression = "#{row.bindings."+"ColTest"+i+".inputValue}";
          //setting the expression
          richDynamicCell.setValueExpression("ColTest"+i, getValueExpression(theExpression)); 
          richDynamicCell.setAutoSubmit(true);
          richDynamicCol.getChildCount();
          richDynamicCol.getChildren().add(richDynamicCell);
        dynamicVO.addDynamicAttribute("ColTest"+i);
        dynamicVO.insertRow(dynamicVO.createRow());
        dynamicVO.getRowCount();
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicTable());
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCol());
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCell());
       buildTable = false;
       this.setDynamicVO(dynamicVO);
      private ValueExpression getValueExpression(String theExpression) {
       FacesContext fc = FacesContext.getCurrentInstance();
       Application app = fc.getApplication();
       ExpressionFactory elFactory = app.getExpressionFactory();
       ELContext elContext = fc.getELContext();
       return elFactory.createValueExpression(elContext, theExpression, Object.class);
      }It would be great help to have any leads.
    Thanks,
    Dinu

  • ADF FACES: how to preserve the sort criteria for an af:table

    How can I preserve the sort criteria on an af:table across page invocations? I've searched all through the forum and I don't see anything on this topic.
    I simply want the sort criteria (from when the user clicks on a column header) to be remembered across multiple uses of the page. I know that the control handles this itself for multiple invocations of the same page (like when you page through the table). But I need to preserve the sort order so I can install it again when someone leaves the page and then returns to it.
    I've tried various attempts using a SortListener to record the sort criteria, but I can't figure out how to reinstall the criteria without generating exceptions from the table control.
    Any pointers on how to do this would be greatly appreciated.
    Thanks.
    Larry.

    Ok, I've solved the problems with the odd behavior by always creating a new model when the table data changes and copying the sort criteria into the new model, like this:
            // Construct our own CollectionModel from this result set
            if(_model == null) {
                // Construct the initial data model and set the starting sort criteria
                ListDataModel m = new ListDataModel(results);
                _model = new SortableModel(m);
                // Set the sort criteria to last name
                ArrayList criteria = new ArrayList();
                criteria.add(new SortCriterion("lastName", true));
                _model.setSortCriteria(criteria);
            } else {
                // Construct a new model so the table "sees" the change
                ListDataModel m = new ListDataModel(results);
                SortableModel sm = new SortableModel(m);
                sm.setSortCriteria(_model.getSortCriteria());
                _model = sm;
            }But, I end up with one final thing that doesn't work. In the "then" clause above, I try to set the initial sort criteria for the table - it has no effect. When the table is rendered, it is not sorted in any way.
    How can I specify an initial sort order for the table? Why is it ignoring the sort criteria on the model?
    Thanks.

  • ADF FACES: how to prevent navigation in the UPDATE_MODEL_VALUES phase

    I have some complex cross-field correlations to verify on data submitted. I can't do this in the PROCESS_VALIDATIONS phase, since all the model values are in consistent at this point depending on which component is being processed.
    So, I'm trying to perform the business logic tests in the UPDATE_MODEL_VALUES phase. This is all working well except for one thing. How do I prevent the view from changing in the case that cross-field issues are detected?
    The scenario is that the user has filled out the form and activates some control that would normally navigate the user away from the current view. I detect an inconsistency and need to place a message in the context and prevent the navigation. This is easy if I do this during the PROCESS_VALIDATIONS phase by just throwing a ValidatorException.
    I just can't figure out how to accomplish this in the UPDATE_MODEL_VALUES phase.
    Any suggestions?

    I spoke too soon. Maybe my case is more subtle. I have a page with a af:showOneTab. In one of the showDetailItems, I have this validation occuring. Thus, when the user clicks on one of the tabs, and the current page has a validation error on it, I want them to stay on the current page.
    Calling renderResponse doesn't seem to prevent the change (although a true ValidatorException thrown during the validation phase does).
    So, I'm still stuck with how to prevent the change in tabs when I detect the error in the UPDATE_MODEL_VALUES phase.
    Thanks.

  • ADF Faces: How to insert an HREF inside a table element

    Hi,
    I have a web service data control, and this web service returns the email of a department.
    I have to display this email inside a table, but, since this email is used to integrate the application with Microsoft OCS, the email must be inside an HREF tag, for example:
    <a href='sip:"+employeeBean.getEmail()+"'><img src='images/OCS.png'/></a>How can I insert this HREF inside the table, so the table displays the image and the href works ?

    Yes it works.
    Here is my code, so it will be usefull for others:
    <af:column headerText="OCS" id="c3333">
                              <af:goImageLink text="Contatta dipendente" id="gil1"
                                              icon="images/OCS.png"
                                              destination="#{row.ocsContact}"/>
                            </af:column>Many many thanks.
    Edited by: GheParDo on Jan 12, 2011 7:05 PM

  • ADF Faces: How to autoselect the first item in a af:table ?

    Hi
    I want <af:table> to autoselect the first item in the set (if there is at least one item). I'm looking for a programatic way to do it, but haven't found a solution.
    Any suggestions?
    TIA,
    Brian

    There is no declarative way of doing this.
    The java apis to do this are...
    call...
    table.getSelectionState().clear()
    table.setRowIndex(myIndex);
    table.getSelectionState().add();

  • ADF Faces: sorting in af:table does'n work after migration fr. EA11 to EA13

    I have a JSF JSP with an <af:table> component (EA11). Sorting of columns in this table works fine with this code:
    <af:column>
    <f:facet name="header">
    <af:sortableHeader text="Name" property="Name"/>
    </f:facet>
    <af:outputText value="#{item.Name}"/>
    </af:column>
    Then i migrate to EA13 and changed the code to:
    <af:column sortProperty="Name" sortable="true">
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <af:outputText value="#{item.Name}"/>
    </af:column>
    => the column headers are rendered as sortable, but sorting of columns does not work!
    The bean property, the value attribute of the table is bound to, extends oracle.adf.view.faces.model.CollectionModel.
    I will give you a hint: documentation to <af:column> and <af:table> always describes how to implement sorting with <af:sortableHeader>.

    I use my own Implementation of CollectionModel. It extends oracle.adf.view.faces.model.CollectionModel.
    The setSortCriteria method is called correctly. Even the sorting is done correctly. I just don't see it in my page. If I click on a column header to sort the column my cursor transforms to an hourglass, and that's it. Then I click on another button which makes the page render again, and suddenly the table is sorted according to the column I clicked before.

  • ADF Faces: Newbee problem with table

    Hello,
    I try to generate a table like in the demo app:
    <af:form>
    <af:table allDetailsEnabled="true" var="row"
    bandingInterval = "2"
    banding = "row"
    value="#{projectView.currentProjects}" rows="5">
    <af:column sortable="true" sortProperty="proj_name">
    <f:facet name="header">
    <af:outputText value="#{bundle.proj_name}"/>
    </f:facet>
    <af:outputText value="#{row.proj_name}"/>
    </af:column>
    <af:column sortable="true" sortProperty="proj_descr">
    <f:facet name="header">
    <af:outputText value="#{bundle.proj_descr}"/>
    </f:facet>
    <af:outputText value="#{row.proj_descr}"/>
    </af:column>
    <f:facet name="detailStamp">
    <af:panelGroup type="vertical">
    <af:outputText value="Name: #{row.proj_name}"/>
    <af:outputText value="Descr: #{row.proj_descr}"/>
    <af:outputText value="Volume: #{row.proj_volume}"/>
    <af:outputText value="Area: #{row.proj_area}"/>
    </af:panelGroup>
    </f:facet>
    </af:table>
    </af:form>
    The currentProjects method returns a database query as a list of beans. The content of the beans is displayed. My problem is, when I click on e.g. 'Next' or 'All Details' nothing happens and I get javascript errors like this:
    Error: _submitPartialChange is not defined
    Source File: http://localhost:8080/timerec/faces/ADFbrowseProjects.jsp
    Line: 25
    I´m using EA 13. What am I doing wrong?
    Thanks, Axel

    The problem you're encountering is that the table view is being re-initialized whenever the underlying table model changes. Thus, the navigation appears to do nothing. The demo code doesn't "appear" to do anything special because the af:table value property is bound to a managed bean, periodicTable, that has session scope. Thus the table is built only once and the value binding is simply returning the same java object every time.
    For you to accomplish the same thing, your code will need to return the SAME OBJECT (since I can't see the source code I don't really know if it's using object identity or equals()) each time unless your underlying data has actually changed.
    I'm struggling with the same thing. I'm working with a small table and it's just easier to manage concurrency issues by pulling the data out of the database every time instead of building the logic to detect a change, but I'm having to build that due to this behavior.

Maybe you are looking for

  • Steps for CO-PA data sources enhancement

    Hello Experts, I am planning to delete and re-create my CO-PA datasources to include a field from KEB0. What are the order of the steps to be followed. I know that I have to delete and recreate the data-source in KEB0. but when exactly do I have to f

  • PSD-layered - copy and paste properties to layers in Motion?

    Hi, I imported a layered photoshop file into Motion. I applied certain properties to one layer (with key frames, such as rotate, scale, shadow...) and I want to know if there is a way to copy those properties and paste them onto the other layers so I

  • Hyperion Financial Reporting Studio - usage log and exporting criteria

    Hello, is there a way to run a usage log for the reports that we have in Financial Reporting Studio? In addition, can I export the report criterias? I'm looking at potentially archiving some reports we have out on the server that is not currently bei

  • How do I delete duplicates in ical?

    I've imported my calendar fom my work PC - in ics format.  Of course I want to do this every week or so to keep up to date, but it doesn't overwrite dups, it creates a new entry!  How do I delete these dups?

  • How to embed J2EE web application output in iView (NW 7.3)

    Hello experts here my situation: I have a set of JSPs and Servlets accessing a EJB to expose data contained in a DB. All is packaged as explained in the following link: How to use JPA 1.0 with NW 7.30 - CRM - SCN Wiki Everything works perfectly. Now