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] Control Property

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Closed] Control Property
 Login/Join
 
Guru
posted
Not sure if I can do this, but I have a tree control that I want to change one of the properties via JS.


selectallchildren="yes"  



Based on an "OnChange" event, I want to either set this to yes or no. I know I can get other properties like TOP and LEFT, but I question if I can get this particular one and be able to set it.

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


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
Matt,

Are you using plain JS or jQuery? Either way how are you accessing the other attributes as it will give me an idea on how best to advise you using a method that you already may know.

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
Guru
posted Hide Post
Thanks Tony for the response. I started working on alternate solution, by adding in additional Tree control and toggling on/off based on selection, but I would prefer not to do it this way if I can control the property.

I am just using plain JS. For example, here is a panel that I am adjusting position for

 var FiltPanl  =    window.document.getElementById("Filter_Panel");

 


Based on an IF condition

       FiltPanl.style.top = "1870px" ;
  


I am not really sure how to access these other properties.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
Hi Matt,

Ok, you are accessing the top attribute using .style and plain JS. If you are happy to go with jQuery then you may be able to access the other attributes using something like the snippet below. As you are on 8.0.08 the jQuery libraries will be included in your composer file.

$("Filter_Panel").attr("selectallchildren","yes");

However, I've not played with the tree control in this way so couldn't state that this will work or not.

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
Guru
posted Hide Post
I have not really used jQuery before. My HTML was built in 7 so I don't see any references to the libraries. I tried to add them but my page just blows up.

By chance would you happen to have an example of how to reference the libraries?


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
If you have your HTML built from 7 then you need to be very careful (as Francis will no doubt attest!). I also assumed (perhaps wrongly) use of App Studio over Dev Studio Frowner

I did post a code sample a short while ago that allowed you to pull the jQuery libraries direct from your embedded JS (DS 8.n doesn't load jQuery by default) and this code may work for you without having to open your code in edit? Can't locate it at present though Frowner

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
Guru
posted Hide Post
Thanks Tony.

Sorry, I am using DS 8. I try and stay out of edit mode, if all possible. I can understand why Francis would attest.

I have done the calls in an HTML form as I see examples from Dave Briars, but putting in the calls in this HTML really messes things up.

I'll poke around and see if I can find your example, if not I will proceed with my alternate solution.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
Based on my experiences so far, I'd wait for WebFOCUS 9 Frowner


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
Guru
posted Hide Post
I gave up on this. I ended up modifying my design. I did find a way to call the jQuery libraries, but I couldn't get it to work with the Tree Control.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
quote:
I did post a code sample a short while ago that allowed you to pull the jQuery libraries direct from your embedded JS

Apologies, I was otherwise occupied yesterday, but I still haven't been able to locate the code that I thought (am fairly sure?) that I posted. So just in case, I'll post it here. You never know, it may help someone else looking at the thread in future.

Just drop this code into the "Embedded Javascript" within HTML Composer and it will add the jQuery library within the "Head" section of your HTML file on loading. You will then have access to the jQuery library straight away.

Don't forget that you would not require this within HTML Composer using App Studio.

This code adds a jQuery document ready function to prove that it works and is only for demonstration purposes.

//Begin function window_onload
function window_onload() {
 
loadjQuery();
 
UpdateData();
 
$(document).ready(function() {
  alert("Hello World");
});
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
 
function loadjQuery() {
  var element = document.createElement('script');
  element.async = false;
  element.src = '/ibi_apps/ibi_html/javaassist/jquery/jquery_min.js';
  element.type = 'text/javascript';
  (document.getElementsByTagName('head')[0]||document.body).appendChild(element);
}

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
Guru
posted Hide Post
Thanks Tony,

I found that function except for calling Google's libraries.

I just don't think it works for a Tree Control. Tree Controls are a beast.

I had a requirement to provide basically the same tree control, but based on selection they wanted to toggle off the selecting all children. I ended up adding an additional tree control and just toggling the show/hide.

This particular HTML I am working on is a beast itself. Makes me nervous when I have to go under the covers to add something. I am always fearful that any slight change will break something.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
element.src = '/ibi_apps/ibi_html/javaassist/jquery/jquery_min.js';
I wonder which version of jQuery is loaded with this command.


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
Guru
posted Hide Post
This may be a dumb question, but does version matter? I would kind of think it would in some respect, but maybe not.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
quote:
which version of jQuery is loaded

Francis,

I'm sure that your question was rhetorical and I'm not quite sure of the reason for you posing it - although I can guess Wink

Just for other members, because you know already, the version will be one that was installed (if any) with your version of WF8 (unless your site has overwritten it of course) but the URL could easily be the path reference to the version that you want.

You'll probably now ask why did I code for one installed with WF? The answer is that some installations are not exposed to the internet and would therefore be unable to reference one outside of their installation. But then you knew that!

For Matt,

Not a dumb question at all! I think that Francis is just trying to imply that the version shipped with WF is an older version and not the latest with extra functionality, but then he would realise that you have to ship with a version. Personally I would use one that provided the functionality needed for the task in hand. It is nice sometimes to use some of the latest functionality, but for simple control disabling, value changing, combo list manipulation etc. why do I need to put the latest version in when a basic version will suffice?

I wouldn't put a 4.2 litre Jaguar V12 engine in a Ford model T because I wouldn't be able to utilise everything that the V12 could give Smiler


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
quote:
I wouldn't put a 4.2 litre Jaguar V12 engine in a Ford model T

Although I would have to admit that it would be fun to do so Smiler

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
Guru
posted Hide Post
Thanks again. That's what I kind of thought, but wasn't for sure.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report 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] Control Property

Copyright © 1996-2020 Information Builders