Interactive Report Title defaults to 'Applicaiton' - sql

I have an Interactive Report that displays Images in one column. The images are displayed directly from Images I loaded into shared components.
The report query:
SELECT
Tbl_P.ImagePackage,
Tbl_P.PRICE as PACKAGE_PRICE,
Tbl_I.ID,
Tbl_I.Name,
Tbl_I.PRICE,
Tbl_I.Type || Tbl_I.Name as Minifigure,
Tbl_I.Quote as QUOTE,
'AddToCart.png' as ADD_TO_CART
from "Tbl_090_ImagePackages" "Tbl_P"
left outer join "Tbl_091_Images" "Tbl_I"
on Tbl_P.ID = Tbl_I.Image Package
where Tbl_P.ID = :P201_GROUP
The column in question is 'ADD_TO_CART'.
The Column attributes are as follows:
Display Type: Display as Text(escape special characters)
Link Text:
<img src=#APP_IMAGES##ADD_TO_CART# alt=Application Express height=30 width=30
Link Attributes:
ID=#ID# class="AddToCart"
Target: Page in this Application (Current Page)
The Title is defaulting to 'Application' and I can't get rid of it or change it. I have tried changing the Link Attributes to: title="Testing" ID=#ID# class="AddToCart" Unfortunately this has not worked. Any help would be much appreciated.
Thank you

Seems like your link text is malformed? Put your attributes between quotes, single or double. When you view your page source with eg Firefox, you'll notice strings highlighted in red: these are invalid html. The browser is forgiving up to a certain point, but if you confuse it enough things like this may start happening.
<img src="#APP_IMAGES##ADD_TO_CART#" alt="Application Express" height=30 width=30 />

Related

TestCafe does not write in text input field

I'm using TestCafe for test automation of a web application based on the Wicket framework. I try to type text into a text input field ... well, actually it is a dropdown list, where a text input field appears, so that the user can search for certain codes. The HTML fragment is as follows:
HTML fragment
And here is the corresponding screenshot (text field above "001"):
Text input field with dropdown
The user can type some characters and the list below is automatically filtered (I did this manually):
Text input field with some text
My TestCafe test tries this:
.click( productcodeList )
.expect( productcodeInputField.visible ).ok()
.click( productcodeInputField )
.typeText( productcodeInputField, 'ABW' )
i.e.
Click on the drop down list.
Assume that the text input field is now visible (works fine).
Click on the text input field (this should not be necessary, since typeText() is supposed to do this anyway).
Type the text "ABW" into the text input field ==> This does not work.
I'm sure that my Selector works, since the assertion (expect) is successful and when I debug the test run after the second click (on the text input field), I see the following:
TestCafe screenshot
I.e. the cursor is directly on the text field, but somehow TestCafe cannot write the text into the field.
Some additional information: The Selector for the input field is created as follows:
productcodeInputField = Selector('span').withAttribute('class', /select2-dropdown.*/ ).child('span').withAttribute('class', /select2-search.*/ ).child('input').withAttribute('class', 'select2-search__field' );
More information: I'm using the same logic on the same page:
kurzbezeichnungField = Selector('input').withAttribute('name', /.*aeAbbreviation.*/);
...
await t.click( kurzbezeichnungField )
.typeText( kurzbezeichnungField, 'xxxWWW' )
and this works fine.
Node.js version: v10.16.3
Testcafe version: 1.5.0
This issue looks like a bug. However, I cannot say it precisely without an example that demonstrates the problem.
My team would really appreciate it if you share your project or sample to demonstrate the issue.
Please create a separate issue in the TestCafe github repository using the following template and provide as much additional information as possible.

Datatables render adding random characters in header (== $0)

In the fifth column of my table which is populated from ajax, outside of the code is ==$0 which is not part of the html.
Screenshot from Chrome: http://i.imgur.com/vRioSrh.png
This breaks the whole table... I have no idea where this code is coming from.
Using datatables 1.10.12.
Oh, this appears to be a Chrome debugging value? I suppose it is not part of the actual document. There must be another issue in my table.

mvc4 jquery autocomplete items showing up as asterisks instead of readable data

I got my autocomplete stuff working well enough to see that it's returning some data when I type in a field--but the data shown in the dropdown below the textbox is just a vertical column of asterisks or list item bullets. (I can't really tell what they are.)
When I query the web service directly in the browser, it returns a Json array as expected which looks like this where, for example ?term=chi (I've added some line breaks for readability)
[
{"Name":"Chihuahua"},
{"Name":"Chinese Crested"},
{"Name":"Chinese Shar-Pei"},
{"Name":"Japanese Chin"},
{"Name":"Schipperke"}
]
My JavaScript looks like this:
$(function() {
$("#Breed").autocomplete({
source: "#Url.Action("BreedList", "Patient")"
});
});
like I say, my textbox in question (#Breed) does respond sort of like an autocomplete box, but the dropdown data is weird. Any ideas?
Although I did have a CSS bundling problem (somehow I had omitted the jquery ui css from my bundle), a bigger issue was that the Json returned by my service needed a lower case "value" property for each item. I was using the column name as cased on my Linq query. The tip that pointed me in the right direction on this came from the answer here: jQueryUI autoComplete returns back empty list

Tags getting appended to dojo editor content

I have a dojo editor on a jsp page. The dojo editor is one of the required fields and i have a validation in place for it. There is a scenario in which some tags are getting appended. I cannot find a particular pattern when it gets appended but most of the times it occurs after one selects and copies all the content and pastes on the editor. So the editor content in this case was
<div id="dijitEditorBody">content which user entered</div>
Issue: When the user deletes all content which was entered the tags are still there and get submitted. In this case atleast visually editor has no content but the field holds the following value:
<div id="dijitEditorBody"></div>
or
<div id="dijitEditorBody"><br /></div>
So it skips validation and displays an empty editor when data is retrieved from DB?
I am confused about why these tags are getting appended?
In RichText.js, this snippet :
if(dojo.isIE || dojo.isWebKit || (!this.height && !dojo.isMoz)){
// In auto-expand mode, need a wrapper div for AlwaysShowToolbar plugin to correctly
// expand/contract the editor as the content changes.
html = "<div id='dijitEditorBody'></div>";
setBodyId = false;
}else if(dojo.isMoz){
// workaround bug where can't select then delete text (until user types something
// into the editor)... and/or issue where typing doesn't erase selected text
this._cursorToStart = true;
html = " ";
}
Explains the reason why that tag is added...
Although you see it in your alertbox, I believe it's not present in the posted contents... right ?
The editor should take care of removing the extra-tags => not tested but pretty sure...

Hiding Subreports in SQL Report (RDL)

I have a bunch of reports that are printed out and mailed to clients. At the top of the report is the return address, left aligned. I was asked to add an optional logo to the report. This logo should be left of the return address. (The logo and all other info is stored in the database). So if the logo exists, you SHOULD see:
<someimage> <Return Address>
And if no logo exists, you SHOULD see:
<Return Address>
There are many different logos possible placed in many different reports, so to make life easier, the logo was implemented as a subreport. The subreport just grabs the correct logo image, and then it automatically displays in the report.
The problem I'm having is this. If the log DOES NOT exist, then we want the return address left aligned, as shown above. But what is happening is that while the subreport shows nothing, it still takes up space where the logo would be, and the return address is floating a few inches to the right of the left side of the page.
<Return Address>
SO... is there a setting I can use/set to get the subreport to either not show, or not take up any space, if there is no logo to be displayed?
Sorry, hope I made this clear enough. I'm totally new to RDL's.
You should be able to set an expression on the subreport's visibility so that it does not show if there isn't a logo.
Here is the XML from an RDL I had handy:
<Subreport Name="SubReport">
<ReportName>SubReport</ReportName>
<Visibility>
<Hidden>=Not Parameters!ShowLogo.Value</Hidden>
</Visibility>
</Subreport>
This tests against a boolean parameter called ShowLogo, but you could just as easily test the value of another parameter (perhaps the length of a URL?).
To be clear, when specifying the expression for the "Hidden" property, you want it to evaluate to False when you want the element to display. If your expression evaluates to True, that means that the element will be hidden.