Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Setting focus on double list control in AS8009

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Setting focus on double list control in AS8009
 Login/Join
 
Gold member
posted
Hi all,
Does anyone know how to set focus on a double list control in App Studio 8009? This is for a guided report where the user selects columns, sort, report title and report format. I am limiting the number of columns selected for PDF format to 9 to prevent paneling error. After displaying a message, I like to have the focus on the double list for selecting columns.

Thank you,

Seyed

This message has been edited. Last edited by: SeyedG,
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report This Post
Master
posted Hide Post
Plain old JavaScript:

alert("Display message to user");
document.getElementById("customselect1_selectfrom").focus();

jQuery:

alert("Display message to user");
$("#customselect1_selectfrom").focus();

To have the focus go to the right side of the double list control, use "customselect1_selectto" instead.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
quote:
Squatch

Hi Squatch,
Thank you for your help. Here is the result of my changes:

Method #1: The following doesn't work, it proceeds to run the report in PDF format and crashes with paneling error.
if (rpt_fmt == 'PDF' && total_columns > 9) {
    alert('For PDF Reports, The Maximum Number Of Columns Is 9!');
   document.getElementById("customselect5").focus();
   return false;
}


Method #2: The following doesn't crash, and stays on the guided report page. But, there is no focus anywhere on the page.
if (rpt_fmt == 'PDF' && total_columns > 9) {
    alert('For PDF Reports, The Maximum Number Of Columns Is 9!');
    form1.customselect5.focus();
    return false;
}


Method #3: And finally using the JQuery method you suggested, code is ignored and guided report proceeds with running the report in PDF format and crashes with paneling error.
if (rpt_fmt == 'PDF' && total_columns > 9) {
    alert('For PDF Reports, The Maximum Number Of Columns Is 9!');
    alert("Display message to user");
    $("#customselect5").focus();
    return false;
}



Thanks again,


Seyed


WebFOCUS 8.0.09
App Studio 8009
Linux Kernel-2.6
DBMS: Oracle 11g
all output (Excel, HTML, AHTML, PDF)
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report This Post
Master
posted Hide Post
The "customselect5" id is the id of the entire double list control.

There are separate id's for the selection boxes. The id of the one you want the focus on is "customselect5_selectfrom".


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Master
posted Hide Post
And if you want to stop the report from running, you can do so in the "onclick" event for the submit button. Just call on the "stopImmediatePropagation" function inside the "event" object:

// Assume "rpt_fmt" and "total_columns" are
// global variables that are set elsewhere...

function form1Submit_onclick(event) {

    if (rpt_fmt == 'PDF' && total_columns > 9) {
        alert('For PDF Reports, The Maximum Number Of Columns Is 9!');
        document.getElementById("customselect5_selectfrom").focus();
        event.stopImmediatePropagation();
        return;
    }

}


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
Hi Squatch,
Your last solution worked perfectly!. Without the event.stopImmediatePropagation line, it still would crash, but using it, stops the guided report from running the PDF report and puts the focus on the 'customselect5_selectfrom' box.

Thank you very much,

Seyed


WebFOCUS 8.0.09
App Studio 8009
Linux Kernel-2.6
DBMS: Oracle 11g
all output (Excel, HTML, AHTML, PDF)
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Setting focus on double list control in AS8009

Copyright © 1996-2020 Information Builders