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     [CLOSED] Clearing a dropdown

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Clearing a dropdown
 Login/Join
 
Member
posted
I have a tree control that is chained to a dropdown both being populated by procedures.

The problem I'm having is once the dropdown box has data in it (because a tree item was selected), when I click an item in the tree that returns 0 records in the chained dropdown, the dropdown is not being cleared. It will update, but not clear.

This message has been edited. Last edited by: Kerry,


WF 7702
 
Posts: 9 | Registered: June 27, 2012Report This Post
Expert
posted Hide Post
I can tell you how to clear a dropdown with JavaScript, I unfortunately can't tell you how to incorporate that within an HTML Composer designed page.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
In your procedure, check for zero records and output a blank XML document. Something like this (change to suit your situation) -
ON TABLE PCHOLD FORMAT XML
END
-RUN
-IF &RECORDS NE 0 THEN :EndNow;
-HTMLFORM BEGIN
<?xml version="1.0" encoding="ISO-8859-1" ?>
<fxf version="1.0" data="hold">
<report records="0" lines="0" columns="2" rows="0">
<target format="" version="" type="" destination="HOLD" />
<column_desc>
<col colnum="c0" fieldname="data_value" alias="E01" datatype="integer" width="9" focus_format="I9" description=""  />
<col colnum="c1" fieldname="display_value" alias="E02" datatype="char" width="50" focus_format="A50" description=""  />
</column_desc>
</report>
</fxf>
-HTMLFORM END
-:EndNow

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Wow!
What are the fxf, report, target, col and column_desc tags? Proprietary HTML Composer stuff?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
No Francis, just the IB standard XML results that you would get with normal PCHOLD FORMAT XML that has records. This just provides a "fudge" to return an empty but still valid XML document back to the IBIRLS3.JS function instead of a normal HMTL page stating "EDA NO DATA".

Think of it as the equivalent of a custom HTML page stating no records returned.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Right!

You could also do this:

TABLE FILE CAR
PRINT
COUNTRY
COUNTRY
WHERE COUNTRY EQ 'CANADA'

ON TABLE SET EMPTYREPORT ANSI
ON TABLE PCHOLD FORMAT XML
END


SET EMPTYREPORT ANSI forces one row to be created, but the values will be blank, so Tony's suggestion is better.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Tony A,

When I run the procedure with your suggestion I get:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Only one top level element is allowed in an XML document. Error processing resource 'http://webfocus-dev02.ZZZZZZZ.com/...


-^

Looks like the new XML might be getting appended to something already there??


WF 7702
 
Posts: 9 | Registered: June 27, 2012Report This Post
Member
posted Hide Post
Francis,

I also tried the 'SET EMPTYREPORT ANSI' and it returned a single row like you said, but my dropdown still retained the previous value and did not clear. Seems like an empty row would clear it, but apparently not.


WF 7702
 
Posts: 9 | Registered: June 27, 2012Report This Post
Expert
posted Hide Post
jlentner,

If you get the error as you describe then it is likely that you already have EMPTYREPORT set to ON. Because this setting will give you an empty report AND my suggestion would also give you another then the result is the two header error.

The ANSI setting that Francis quotes is one that we always forget and it does have excellent uses.

Having said all of that, I have just run the following code in 7.7.03 and it produces an empty XML which is not what I expected. The previous suggestion was one that I have used with success in 7.6.10 but perhaps I need to revisit for 7.7.0x?

TABLE FILE CAR
SUM FST.COUNTRY
BY COUNTRY
WHERE COUNTRY EQ 'XXXX'
ON TABLE SET EMPTYREPORT OFF
ON TABLE PCHOLD FORMAT XML
END

Once your XML is sorted, I would suggest that you debug the JavaScript processing using the correct tool for your browser and stepping through the creation of the return and subsequent processing of the XML from the server. This should allow you to view what the xmlDoc variable is within the JavaScript and understand what is not happening in your situation.

Turning on the Servlet trace in the admin console and looking at the trace (at the bottom should be the XML being returned from the AJAX call) might give you another possibility of understanding the problem but my preferred method would be developers tool within the browser.

T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     [CLOSED] Clearing a dropdown

Copyright © 1996-2020 Information Builders