ADF FACES: how to make af:selectOneRadio horizontal

Is there any way to make the af:selectOneRadio component render the choices horizontally?
This is really important for optimizing form layout space.
Thanks,
Larry.

Not yet, but there is an enhancement request logged to support this.

Similar Messages

  • ADF FACES: how to make a page re-render after returning from a dialog

    Using EA15.
    I am using a process to display a confirmation dialog to the user. However, when the dialog exits, the previous page is not re-rendered. The result of the operation that was confirmed by the dialog makes numerous changes to the underlying model that affect the layout of the original page. All these changes are made in the return listener.
    How can I force the original page (the one that launched the process) to fully re-render upon return?
    Thanks.

    Thanks Adam, but no luck.
    My situation is slightly different then the original poster's. I have a table with a 'add row' button in the header, and a 'modify row' button in each row. They both point at the same dialog to enter multiple data attributes about that row of data from a collection in the model. The 'modify row' pops a dialog and modifies item fine, but doesn't re-render the table automatically on return. If user performs any action on the page, the resulting table will then show the correct data. The 'add row' button on the header, but otherwise identical, modifes and re-renders correctly.
    I would think this is a fairly common use case. Anyone have example code of this that can be shared? The ADF dialog demo only modifies a single uicomponent, not the entire row or table. And we have other code which demonstrates that works fine.
    Is there a problem with a row button return listener adding a partial target of the table in which is resides? Whereas the header button (being outside of the table?) is capable of adding the table as a partial target?
    Table.jsp:
    <af:table value="#{formBean.dataBean.collection}" var="row" binding="#{formBean.table}">
    <af:column>
    <af:outputText value="#{row.attr1}"/>
    </af:column>
    <af:column>
    <af:outputText value="#{row.attr2}"/>
    </af:column>
    <af:column>
    <af:commandButton text="Modify..." action="#{formBean.modifyAction}" partialSubmit="true" useDialog="true" returnListener="#{formBean.dialogReturned"/>
    </af:column>
    <f:facet name="actions">
    <af:commandButton text="Add Row..." action="#{formBean.addAction}" partialSubmit="true" useDialog="true" returnListener="#{formBean.dialogReturned"/>
    </f:facet>
    </af:table>
    FormBean.java
    public void dialogReturned(ReturnEvent event) {
    Item item = (Item) event.getReturnValue();
    if (! dataBean.collection.contains(item) {
    dataBean.collection.add(item);
    table.setValue(dataBean.collection);
    AdfFacesContext.getCurrentInstance().addPartialTarget(table);
    DialogForm.java
    public String submitAction() {
    // perform some work against the row item AdfFacesContext.getCurrentInstance().returnFromProcess(item);
    ...

  • 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 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>

  • How to make pages page horizontally in acrobat

    Hi there.
    Is there a way in Acrobat to make pages page horizontally? Similar to an ‘island spread’ in indesign! I need to view a series of pages horizontally, as this will best simulate the way that I will be presenting these pages when pinned up...
    Thanks,
    Craig

    Depends on how you set up your ID file. If you have set up your document as 11 x 8.5 (horizontal/landscape) the resulting pdf exported sould be the same. If you have an 8.5 x 11 Document, Portrait, the exported pdf should be likewise portait.
    If you printed to PDF Printer (and you should have exported instead) these results could be overridden by the page orientation.
    If you have an Acrobat file, whose pages need to be rotated permanately, not just for a particular view instance, rotate them from the Acrobat Navigation Pages Panel.
    Page>Rotate Pages (or Shft+Ctrl+R)

  • 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 - 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

  • How to make a long  horizontal bar absolutely level horizontal? (Or vertica

    How can I ascertain that a long horizontal bar that I am placing on a page is absolutely horizontal and not at all tilting right or left? At this point I want the checking to be done with the Metric Inspector and the click toggles.
    Lorna in Southern California

    How about if you select the line/object on your
    page
    and then look in the Inspector Metrics tab.
    YES! Look in the Metrics tab, not the Graphics tab.
    To Varkgirl and James:
    Nonono! I was in Mr. Metric; I wasn't in Graphics. I saw the bottommost toggle and wrongly believed it to be a co-dependent of the Angle positioner. When I just now went back and got it to self-identify by placing the cursor on it, a definition of function showed up so I then did use the toggles to read "0."
    So... logically and theoretically that horizontal bar of about an inch or so ought to be absolutely LEVEL at the top of the page, with 0 tilt, but for some reason that title bar appears to be tilted lower on the right. I checked the whole thing to see how and if it could be one of those visual illusions created by differing header sizes, perspective points, etc, but NO. No apparent reason for that title bar to appeat just slightly lopsided.
    OK, since it is for a rock band, and since all the other graphics are tilted, I am going to stop spending time on it and pretend that it was meant to be not quite level. There. I've talked myself into it. Wow, that is NOT me at all.
    Lorna in Southern California

  • 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 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 sort a column by sub-property ?

    hi,
    in a "af:table", this works fine :
    <af:column sortProperty="title" sortable="true">
    <f:facet name="header">
    <af:outputText value="Titre" />
    </f:facet>
    <af:outputText value="#{thisRowDoc.title}" />
    </af:column>
    but this doesn't :
    <af:column sortProperty="facility.libelle" sortable="true">
    <f:facet name="header">
    <af:outputText value="Service" />
    </f:facet>
    <af:outputText value="#{thisRowDoc.facility.libelle}" />
    </af:column>
    how can i sort on a property of a property ?
    thx !

    Hi,
    you have to consider that when loading a tile for the first time always rowloaded2 is fired (several times) and afterwards onload. Maybe rowloaded2 again afterwards. So it should work to sort in onload.
    But when clicking the <back> button in the menue the order of the fired events might be different!
    Do you want to sort by an unbound column which is readonly or is it also editable (see other thread)? In this case things might be much more complicate... Normally another sorting should be done in onsave event but unfortunately you don't save anything as it is unbound...
    Regards,
    Wolfhard

  • How to make JTable use horizontal scrollbar

    My application uses a table to which data is added dynamically(both columns and rows). My problem is that when number of columns increase i want JTable to use horizontal scrollbar instead of resizing columns(which i achieve by setting resize mode to OFF state), But due to this if number of columns are less then there's alot of empty space left after showing columns(coz JTable cannot resize cols to fit Viewport area). To achieve both criteria i used following solution
    1. Set Auto resizing to OFF.
    2. Check if width of table is less than viewport width and if so then set auto
    auto resizing ON :) which will fit columns in viewport thereby occupying empty space.
    But this solution doesn't seem to be straight and simple to me. Is anyone aware of a simple solution to this problem.
    Dimension dm_Dm = new Dimension();
        RSBrowser.setModal(false);
        browseTable_Jt.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        // reqd o.w. JTable resizes column widths instead  of using horizontal
        // scrollbar
        RSBrowser.setVisible(true);
        browseTable_Jt.getSize(dm_Dm);
        // if table width is less than total viewport size then fill the extra
        // space by setting suto resize property to ON.
        if ( browseTable_Jt.getPreferredScrollableViewportSize().getWidth() >
             dm_Dm.getWidth() )
            browseTable_Jt.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
            browseTable_Jt.doLayout();
        RSBrowser.setModal(true);

    hi,
    with your problem statement it seems you should use javax.swing.JScrollPane like the one below
    JScrollPane tableScroller = new JScrollPane(yourTable);
    tableScroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    tableScroller.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);hope this helps you,
    regards,
    Afroze.

  • 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 set target for commandLink in af:menuTabs

    I try to use tabbedpane component from Oracle ADF...As I found, they stated that only <af:commandLink> can be child of <af:menuTabs>
    I want to press the tab then the result can be show at the bottom of that tab...as same as the jsf demo from SUN.
    <af:menuTabs binding="#{editor.component}">
    <af:commandLink text="Quick-Info" action="#{action.qinfo_page}"
    selected="true" />
    <af:commandLink text="Vertrieb" action="#{action.vertrieb_page}"/>
    <af:commandLink text="Wichtig" action="#{action.wichtig_page}"/>
    <af:commandLink text="Kontakt" action="#{action.kontakt_page}"/>
    <af:commandLink text="Notizen" action="#{action.notizen_page}"/>
    </af:menuTabs>
    Now when i press to each tab, it will redirect to new page as i define (such as the code in welcome.jsf...then it redirect to qinfo.jsf when i press at Quick-Info tab).
    Pleas help me to solve this problem...I need to show the result at that page (area below the tab). Thank you in advance.

    We're sorry, but this isn't supported. One rationale is that it's not generally sufficient to simply reload the target page; you also have to reload the tab control itself to show the new selection. We generally recommend not using frames in this circumstance, instead putting the menuTabs and the content on one page.
    (BTW, "target" isn't really supported on <h:commandLink> either)

  • [ADF FACES] How to remove the "select" header in selection column

    Hi,
    Is there a way I can prevent the "select" header to be rendered (or customize this header) for the selection column in a af:table when using either af:tableSelectOne or af:tableSelectMany?
    Emmanuel.

    Hi, I've read you filed an ER (in 2004, it's 2007 now) to be able to remove/adjust the header in a selection column. Until now I can only find threads/posts about people facing the same issue, the header can't be adjusted. The answer of one of the Oracle-employees is that it isn't supported and we can extend the adf-source code but this isn't supported by Oracle.
    What's the official answer of Oracle on this?
    This is a very popular issue that needs to be adressed to pleaze the customer that was convinced to use Oracle ADF ... and now we can't answer his requests?
    This issue has been around for quite a long time now, from 2004, there has to be a solution for this, wright?

Maybe you are looking for