XPage Widget with extension.xml - widget

I am just developing an XPage Widget with a manifest extension.xml.
<?xml version="1.0" encoding="UTF-8"?>
<webcontextConfiguration version="1.1">
<palleteItem title="XWidget" viewImageUrl="" url="notes://venus/xxx/Dev/Source/CC/CC_40_DEDE_SRC.NSF/streamCC.xsp?
OpenXPage&1536921419?OpenXPage=null" singletonSidebar="false"
providerId="com.ibm.notes.toolbox.provider.XPagesPalleteProvider" imageUrl="" id="1385849393" hideThumbnail="false"
contributeToSideshelfOnStartup="true" contributeTabOnStartup="false">
<preferences/>
<data/>
</palleteItem>
</webcontextConfiguration>
I have already researched the meaning of the different parts. Only the parameters of the URL "notes://venus/xxx/Dev/Source/CC/CC_40_DEDE_SRC.NSF/streamCC.xsp?OpenXPage&1536921419?OpenXPage=null" are not clear to me.

It seems to be a bug during URL generation, but the bug has no consequences.
The URL parameters are splitted into two elements:
OpenXPage
1536921419?OpenXPage=null
While the meaning of the first parameter should be clear, the second one is to prevent caching (but is useless when "hardcoded" like in bookmarks)
1536921419 is a unix timestamp to prevent caching.
GMT: Friday, 14. September 2018 10:36:59
?OpenXPage=null
Looks like a simple coding error. "Add ?OpenXPage=[value] if URL parameter OpenXPage is null or empty".

Related

Overlay not working in showcaseTemplate

I am simply modifying the showcaseTemplate that comes with the TVMLCatalog example by modifying the images src and adding an overlay to the lookup:
<carousel>
<section>
<lockup>
<img src="${this.BASEURL}resources/images/templates/gft.jpg" width="500" height="600" />
<overlay>
<title>Hello, this is title</title>
</overlay>
</lockup>
</section>
</carousel>
But the overlay is not showing
this is what the XCODE log shows:
2015-12-07 11:25:47.851 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template element: <IKViewElement: 0x7fcee0781f20>
2015-12-07 11:25:47.858 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template controller: <_TVLoadingViewController: 0x7fcee04ba960>
2015-12-07 11:25:47.864 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template element: <IKViewElement: 0x7fcee2176a50>
2015-12-07 11:25:47.865 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template controller: <_TVShowcaseTemplateController: 0x7fcee0799c90>
Dec 7 11:25:47 TVMLCatalog[3953] <Error>: ImageIO: CreateMetadataFromXMPBufferInternal Threw error #203 (Duplicate property or field node)
Dec 7 11:25:47 TVMLCatalog[3953] <Error>: ImageIO: CreateMetadataFromXMPBufferInternal Threw error #203 (Duplicate property or field node)
2015-12-07 11:25:48.996 TVMLCatalog[3953:3684153] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x7fcee0564910 h=--& v=--& V:[_TVStackingPosterView:0x7fcee051a1e0(46)]>",
"<NSLayoutConstraint:0x7fcee0554000 V:[TVLabel:0x7fcee0561020'Image1'(62)]>",
"<NSLayoutConstraint:0x7fcee0564250 V:|-(0)-[TVLabel:0x7fcee0561020'Image1'] (Names: '|':_TVStackingPosterView:0x7fcee051a1e0 )>",
"<NSLayoutConstraint:0x7fcee0564720 TVLabel:0x7fcee0561020'Image1'.bottom == _TVStackingPosterView:0x7fcee051a1e0.bottom>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fcee0564720 TVLabel:0x7fcee0561020'Image1'.bottom == _TVStackingPosterView:0x7fcee051a1e0.bottom>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Note that I have never worked with Swift or Objective-C before. So I am totally lost here.
Any help will be very much appreciated
After some research, I found out it is a known issue:
More Information in Apple developer forums:
Overlay not working in showcaseTemplate
Device Log Spam
Getting autolayout errors with showcaseTemplate in TVML
Current document DOM manipulation issue in beta 2
Several bug reports have been filed to Apple.

Mediawiki: Same section with multiple names (section aliases/synonyms)

Is it possible to give the same section multiple names in mediawiki out-of-the-box (vastly preferred), or do I need to write my own hook/extension/plugin (and if so, tips on how to do so much appreciated)?
In my case, I have example code on single compilation page that I want to link to for multiple individual articles by the name of each article. For instance, I would like something like the following the work.
Page: Interrupts Code Examples
===(EIMSK|EICRA)===
void interrupt01_init(void)
{
EICRA = 0X0F; // in binary, 1111. That is, the rising edge of INT1 and INT0 generate an interrupt request.
EIMSK = 0X03; // in binary, 0011. Enables INT0 and INT1 interrupts.
}
and both of the following would link to the same section, but with the appropriate name for each page:
Page: EICRA:
[[Interrupts Code Examples#{{PAGENAME}}]]
Page: EIMSK:
[[Interrupts Code Examples#{{PAGENAME}}]]
For full context, see example page http://narwhaledu.com/AVRwiki/index.php?title=PCMSK0.
It's possible I could use something like mediawiki: is there a way to automatically create redirect pages that redirect to the current page?, but is it possible to write it for sections instead of pages? Also, although acceptable, I would prefer not to have the allowed aliases be ALL the sections on a page; for instance, on http://narwhaledu.com/AVRwiki/index.php?title=Interrupts_Code_Examples, I have an "about" section.
Edit:
If it wasn't clear, ideally the when the user visits
Page: Interrupts Code Examples#PAGENAME
they see a properly populated section title, instead of "EIMSK or EICRA Example Code" (since there can be a LOT of aliases to a code example)
==={{{PAGENAME}}}===
void interrupt01_init(void)
{
EICRA = 0X0F; // in binary, 1111. That is, the rising edge of INT1 and INT0 generate an interrupt request.
EIMSK = 0X03; // in binary, 0011. Enables INT0 and INT1 interrupts.
}
I can get transclusion to work but not links.
Page: Template:Interrupts Code Examples
=={{#ifexist: {{{pagename}}} | [[{{{pagename}}}]] | External Interrupts Example Code One}}==
{{Template:ExampleCode~PCMSK0, PCMSK1, PCMSK2, PCICR, PCINT0_vect, PCINT1_vect}}
My ideal syntax would be
[[ Template:Interrupts Code Examples|pagename={{PAGENAME}} ]]
but obviously this produces instead a link to the nonexistant page pagename=Name_of_Register instead of linking to Interrupts Code Examples and passing the parameter {{PAGENAME}} such that I can reference it in Interrupts Code Examples with {{{pagename}}} and thereby generate my section header..
This would keep the compilation page clean (only have two code examples instead of copying each one 5x for each alias, my current solution), but I can only pass parameters to the template if I transclude, not if I link to the template, I believe. Is this true?
I may just use the "Example Code One" catchall for wiki markup readability in the end since this is starting to break my brain...
Any HTML anchor will work as a section link. So, if you have <span id="foo">, you can use [[Bla#foo]] to jump to the span. You'll need one HTML element per ID, but that's still workable I think.

How do I use the new `console.log()` output of Chrome?

Chrome 24 has a new way of outputting objects in console.log().
For example, console.log($("p")); on this jsFiddle example outputs this insanity:
▼[<p>, <p>, <p>, prevObject: jQuery.fn.jQuery.init[1], context: #document, selector: "p"]
► 0: <p>
► 1: <p>
► 2: <p>
► context: #document
length: 3
► prevObject: jQuery.fn.jQuery.init[1]
selector: "p"
► __proto__: Object[0]
I can see that it puts the collection of DOM elements at the beginning. But if you try to expand even a simple <p> tag that is mostly empty, it throws up all over you:
▼ 0: <p>
accessKey: ""
align: ""
► attributes: NamedNodeMap
...
[stopping here for sanity's sake]
So how do I use all this information? My first instinct is to tame it down to how it used to look, but on second thought, there really is a lot of info in there that I might want to have access to. But I'm having a hard time understanding what I'm looking at. Much of it looks like jQuery values. Is this a list of every jQuery value that the object has (or doesn't have)?
Then there's the whole issue of the ► context: thing and the ► __proto__: thing. Once you start drilling down in __proto__ you will never stop. I think it goes infinitely down!
How can I begin to learn how to use this new output?
EDIT:
I actually just realized that I'm still using Chrome 23, this isn't something that was introduced in 24. Someone in this thread said it was a Chrome 24 issue, but maybe it's new in 23? At any rate, I only just recently started noticing this on jQuery objects.
EDIT 2: If you're just looking for how to log the old way, try this: (hat tip)
console.log.apply(console, $("div"));
In your demo fiddle, you are logging NodeLists or HTMLCollections. Each of the elements within a NodeList is represented as a numeric index 0, 1, 2, etc. 0 being the first in the NodeList if any elements exist in it.
When you expand the Elements you see all available properties of an HTML Element as defined in DOM Core 3 specification. Refer here for more information about this http://domenlightenment.com/#3.2 and for a list of all properties and their purposes go here: https://developer.mozilla.org/en-US/docs/DOM/element. None of this is new in Chrome.
What is new in the latest Chrome version is the top level logged object, so if you just opened the console and typed:
console.log(window)
Which for me when I just did it logged a preview of what the expanded window object it provides when logging it. So for example, you should see something like:
Window {is_minor: 5, bmi_ie6: false, careers_adselector: "div.hireme, div#hireme"...}
Other NodeLists properties listed below the Elements of the list:
context - the context of the selection - http://domenlightenment.com/#4.4
length - the number of Elements in the HTMLCollection
selector - the selector used to select the Element or NodeList
__proto__ - An Object's __proto__ property references the same object as its internal [[Prototype]] (often referred to as "the prototype"), which may be an object or null (in the case of Object.prototype.__proto__). For more info on this refer to: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/proto
I modified the fiddle slightly and should show the preview of the objects when you view the console http://jsfiddle.net/jaredwilli/H3YWq/2/
You can't really get rid of any of these things either, they're a part of the DOM and will exist always otherwise the NodeType of what you're looking at will be something other than an ElementNode.
I'm just as annoyed as you are with this change. I know this isn't ideal, but it will hopefully help you a little bit.
console.log($('p')[0]);
You may have seen that solution before, and then found it didn't work if you were in a loop for instance:
$('p').each(function(){
console.log($(this)[0]);
});
That doesn't end up giving you the result you were used to either, so I had to use ['context'] instead of [0] like this:
$('p').each(function(){
console.log($(this)['context']);
});
Again, I'm looking for a better solution myself, but I thought I'd share with you what I've found.
You want first element so use [0]
As another option, check out Firebug in Firefox. I know, I love chrome too and use it every day, but Firebug is a great plugin and I've never had an issue with it.

Why selenium locating element by Xpath failed in IE, but it works wll in firefox?

I have my selenium automation test scripts run in firefox, and it works well.
Now I want to run the scripts in IE, it seems it failed on the step of locating an element in GUI. It seems selenium can't find the element in GUI while firefox can easily find it.
String servicenameidtext = "//table[#id='release_hostsProcesses_list']/tbody/tr[2]/td[1]/td";
Selenium.getText(servicenameidtext );
In fact, the scripts is recorded by selenium-IDE, and I have check about the Xpath, I think there is no problem of the element. But why selenium failed on this step in IE?
Could anyone tell me the reason? And how to solve the problem when running test in IE?
Thanks a lot!
I want to locate the element "alarmlm" from the GUI by
String servicenameidtext = "//table[#id='release_hostsProcesses_list']/tbody/tr[2]/td[1]/td";
P.S: The html of the part:
<tbody><tr class="form-title"><td colspan="3"><img src="img/minus.png" title="-" alt="-"> <b>Software Information</b>
</td></tr><tr><td><div id="release_hostsSoftwareInformation_internal">
<table id="release_hostsProcesses_list" border="0" width="100%" class="Processes_list"><tbody>
<tr class="title-column"><td><b>Service Name</b></td><td><b>Summary</b></td><td><b>Description</b></td><td><b> Version </b></td><td><b>Release</b></td><td colspan="2"><b>Installation Date</b></td></tr><tr><td>alarmlm</td><td>mpm</td><td>MultiPlatformManagement tools</td><td>4.0.12</td><td>5</td><td>Wed 10 Nov 2010 04:23:52 AM CST</td></tr><tr><td>annlabclient</td><td>Annlab Client</td><td>Annlab Client</td><td>5.0.13</td><td>23</td><td>Wed 10 Nov 2010 04:23:57 AM CST</td></tr><tr><td>annlabserver</td><td>Annlab Server</td><td>Annlab Server</td><td>5.0.13</td><td>23</td><td>Wed 10 Nov 2010 04:23:57 AM CST</td></tr><tr><td>recoveryalarmlm</td><td>mpm</td><td>MultiPlatformManagement tools</td><td>4.0.12</td><td>5</td><td>Wed 10 Nov 2010 04:23:52 AM CST</td></tr><tr><td>recoverystatlm</td><td>mpm</td><td>MultiPlatformManagement tools</td><td>4.0.12</td><td>5</td><td>Wed 10 Nov 2010 04:23:52 AM CST</td></tr><tr><td>mrfctrl</td><td>MRF Controller</td><td>mrfctrl - including sipproxySubsystem</td><td>1.4.0.5</td><td>1</td><td>Wed 10 Nov 2010 04:24:00 AM CST</td></tr></tbody></table></div></td></tr></tbody>
Thanks to all, the problem is solved. The cause is: the html in firefox and IE are not the same. Strange.
Maybe, due to a default namespace?
The error explanation is in the data you haven't shown us -- what about providing the (x)Html text?
UPDATE:
Now the OP has provided the source (x)Html document. The provided XPath expression:
//table[#id='release_hostsProcesses_list']/tbody/tr[2]/td[1]/td
doesn't select the required element simply because a td is never a child of another td, but this is exactly what this XPath expression is looking for -- it ends with:
td[1]/td
you could try to check out what the text value is directly in IE by appending /text() to the xpath expression. Maybe it finds the empty string?
String servicenameidtext = "//table[#id='release_hostsProcesses_list']/tbody/tr[2]/td[1]/td/text()";
alert("found:" + servicenameidtext);
My two cents,
Try to use all lowercase characters in id field:
String servicenameidtext = "//table[#id='release_hostsprocesses_list']/tbody/tr[2]/td[1]/td";
Selenium.getText(servicenameidtext );
Should work in both FF and IE
In this Case we can do 1 thing
To Inspect Elements for Internet Explorer IE Developer Tools is available and for FireFox Firebug
We can compare both Inspections Derive the XPath/CSS from IE Developer Tools for the Object.
Use and Check is it working in both IE and FF
If it works Fine Otherwise Conditionally we can use the corresponding XPath According to Browsers.

How is gmail source transformed?

I open gmail, click on an inbox item, and look at source of the page. It doesn't look like there isn't any proper html to relate to what is shown on the actual page.
How is the source getting processed into the actual page? Is there some javascript processing this information?
As Jay mentioned, my method of using FireFox's Web Developer Plugin doesn't actually work, it just shows the preview (first few lines).
However, using Firefox's FireBug plugin, you can click Inspect, then move the mouse and highlight what your interested in. When it has the outline around it click. Once the selection is shown in the HTML of FireBug, right-click on the HTML element (in my case a div class="YrSjGe"), and choose Copy HTML. Then go to your favorite text editor, and paste.
Finally, the HTML :)
GMail uses a large amount of java script to make its pages work. This javascript is manipulating the HTML DOM.
If you look at the page source you aren't seeing the current contents of the DOM. You need to use a tool that will show you the HTML DOM. I use Opera Dragonfly, but there are plenty of others for other browsers. Dragonfly will show the the scripts for the page, as well as the event handlers for each element of the DOM.
Edited 3 Nov 08:
In response to the request for access to the scripts, when I view the page the scripts all come up as inline. As others have said, they're obfuscated, so less than easy to read. Here is just a sample:
try{function aa(a,b){return a.appendChild=b}function ba(a,b){return a.textContent=b}function da(a,b){return a.stop=b}function ea(a,b){return a.toString=b}function fa(a,b){return a.length=b}function ga(a,b){return a.title=b}function ha(a,b){return a.position=b}function ia(a,b){return a.create=b}function ja(a,b){return a.className=b}function ka(a,b){return a.width=b}function la(a,b){return a.expand=b}function ma(a,b){return a.abort=b}function na(a,b){return a.data=b}function oa(a,b){return a.next=b}
function pa(a,b){return a.load=b}function d(a,b){return a.innerHTML=b}function qa(a,b){return a.onerror=b}function sa(a,b){return a.getDate=b}function ta(a,b){return a.value=b}function ua(a,b){return a.disabled=b}function va(a,b){return a.dispatchEvent=b}function wa(a,b){return a.currentTarget=b}function xa(a,b){return a.left=b}function ya(a,b){return a.hideFocus=b}function za(a,b){return a.removeChild=b}function Aa(a,b){return a.target=b}function Ba(a,b){return a.screenX=b}
function Ca(a,b){return a.screenY=b}function Da(a,b){return a.send=b}function Ea(a,b){return a.remove=b}function Fa(a,b){return a.start=b}function Ga(a,b){return a.cssText=b}function Ha(a,b){return a.keyCode=b}function Ia(a,b){return a.enabled=b}function Ja(a,b){return a.href=b}function Ka(a,b){return a.handleEvent=b}function La(a,b){return a.removeNode=b}function Ma(a,b){return a.detach=b}function Na(a,b){return a.type=b}function Oa(a,b){return a.contains=b}function Pa(a,b){return a.tabIndex=b}
function Qa(a,b){return a.cellSpacing=b}function Ra(a,b){return a.clear=b}function Sa(a,b){return a.setPosition=b}function Ta(a,b){return a.cellPadding=b}function Ua(a,b){return a.display=b}function Va(a,b){return a.execute=b}function Wa(a,b){return a.height=b}function Xa(a,b){return a.nodeValue=b}function Ya(a,b){return a.clientX=b}function Za(a,b){return a.clientY=b}function ab(a,b){return a.right=b}function bb(a,b){return a.visibility=b}
function aaa(a){var b=cb[i](db);(new Image).src=baa+eb(b)+"&jsmsg="+eb(a)+caa+fb+daa+(new Date)[gb]()}function _B_record(){cb[k]((new Date)[gb]())}function _B_prog(a){top.pr=a;if(hb===undefined){var b=top[ib][jb](eaa);hb=b?b[m]:null}if(hb){ka(hb,n[kb](a*0.99)+lb);if(a==100)hb=null}}function _B_err(a){aaa(a);throw a;}function mb(a,b){var c=a[nb](ob),e=b||pb;for(var f;f=c[rb]();)if(e[f])e=e[f];else return null;return e}function sb(){}function tb(a){a.lg=function $(){return a.bmc||(a.bmc=new a)}}
function ub(a){var b=typeof a;if(b==vb)if(a){if(typeof a[o]==wb&&typeof a[xb]!="undefined"&&!faa(a,gaa))return yb;if(typeof a[q]!="undefined")return zb}else return Ab;else if(b==zb&&typeof a[q]=="undefined")return vb;return b}function haa(a,b){if(b in a)for(var c in a)if(c==b&&Bb[r][Cb][q](a,b))return true;return false}function Db(a){return typeof a!="undefined"}function Eb(a){return ub(a)==yb}function Fb(a){var b=ub(a);return b==yb||b==vb&&typeof a[o]==wb}function Gb(a){return typeof a==Hb}
function Ib(a){return typeof a==wb}function Jb(a){return ub(a)==zb}function Kb(a){var b=ub(a);return b==vb||b==yb||b==zb}function Lb(a){if(a[Cb]&&a[Cb](iaa)){var b=a.closure_hashCode_;if(b)return b}a.closure_hashCode_||(a.closure_hashCode_=++jaa);return a.closure_hashCode_}
function s(a,b){var c=a.SSb;if(arguments[o]>2){var e=Array[r][Mb][q](arguments,2);c&&e[Nb][Ob](e,c);c=e}b=a.WSb||b;a=a.TSb||a;var f,g=b||pb;f=c?function(){var h=Array[r][Mb][q](arguments);h[Nb][Ob](h,c);return a[Ob](g,h)}:function(){return a[Ob](g,arguments)};f.SSb=c;f.WSb=b;f.TSb=a;return f}function Pb(a){var b=Array[r][Mb][q](arguments,1);b[Nb](a,null);return s[Ob](null,b)}function Qb(a,b){for(var c in b)a[c]=b[c]}
function t(a,b){function c(){}c.prototype=b[r];a.F=b[r];a.prototype=new c;a[r].constructor=a}function Rb(a,b,c){if(a[Sb])return a[Sb](b,c);if(Array[Sb])return Array[Sb](a,b,c);var e=c==null?0:c<0?n.max(0,a[o]+c):c;for(var f=e;f<a[o];f++)if(f in a&&a[f]===b)return f;return-1}function Tb(a,b,c){if(a[Ub])a[Ub](b,c);else if(Array[Ub])Array[Ub](a,b,c);else{var e=a[o],f=Gb(a)?a[nb](v):a;for(var g=0;g<e;g++)g in f&&b[q](c,f[g],g,a)}}
function Vb(a,b,c){if(a.map)return a.map(b,c);if(Array.map)return Array.map(a,b,c);var e=a[o],f=[],g=0,h=Gb(a)?a[nb](v):a;for(var j=0;j<e;j++)if(j in h)f[g++]=b[q](c,h[j],j,a);return f}function Wb(a,b,c){if(a[Xb])return a[Xb](b,c);if(Array[Xb])return Array[Xb](a,b,c);var e=a[o],f=Gb(a)?a[nb](v):a;for(var g=0;g<e;g++)if(g in f&&b[q](c,f[g],g,a))return true;return false}
When you do plain "View Source," you're looking at the source of the loading page. All the HTML there is dynamically replaced with the GMail app when it's all loaded.
EDIT: GMail also makes extensive use of iframes for God-only-knows what. If I remember correctly, there're about 5 or 6 (i)frame objects in GMail. Additionally, much of the Javascript is loaded dynamically, without even using tags. The URL for these scripts goes something like:
https://mail.google.com/mail/?ui=2&view=jsm&name=gm&ver=A7pcfYmUnLY&am=X_E5t8T3EkGpRf3deGMWZA
That exact URL won't work, though; the two variables at the end depend on your individual login information/session/phase of the moon.
Yes, they are using javascript to transform that data into the complete page that you see.
As others have already mentioned, Gmail uses large portions of obfuscated Javascript to manipulate the DOM. Although it is a lot of work to discover how all of this works (since it's a lot of obfuscated code to go through), the best way to finding out how it works is to use Firebug to look at the various AJAX-requests, included scripts and the rendered DOM.
Also, you could read the following article, which explains a short portion of the architecture used by Gmail.
To view the Javascript used to generate the email, use Firebug for firefox, click "script", then in the bar above that button there will be the name of one of the scripts, click on it to list all the scripts, choose whichever one you like.
gmail probably compresses it though, making it pretty much unreadable.
You can also select 'Show original' on the drop down where it says 'reply' or 'reply to all' to see the exact email text including headers.
In IE you get a blank page if you right-click and "View Source". If you use the Page menu > View Source, you see the actual page source. As Steve mentioned, in Firefox you see the actual source both from right-click "View Page Source" and from View menu > Page Source.
I suspect they're taking advantage of some IE-specific obfuscation to hide their secret sauce from 85% of the users.