Vaadin 23 set ComboBox popup window min height - vaadin

I noticed that when ComboBox is really close to the page bottom part but still have some small space, the ComboBox element is trying to open its popup with minimal height and scrollbar, instead of open the popup window above to the top. How to properly setup ComboBox with popup min height and let him know to use the space above when there is no enough space at the bottom?
UPDATED
I added the following code to the styles.css:
#import { css, registerStyles } from '#vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
registerStyles(
'vaadin-combo-box-overlay',
css`
#overlay {
min-height: 100px;
}
`,
);
but UI compilation failed with the following error:
No issues found.
[webpack-dev-middleware] wait until bundle finished: /jobs/49455/candidates
WARNING in InjectManifest has been called multiple times, perhaps due to running webpack in --watch mode. The precache manifest generated after the first call may be inaccurate! Please see https://github.com/GoogleChrome/workbox/issues/1790 for more information.
ERROR in ./themes/mytheme/styles.css?inline
Module build failed (from ../node_modules/css-loader/dist/cjs.js):
CssSyntaxError
(5:11) \ui\frontend\themes\myproject\styles.css Unknown word
3 | #import url('lumo-css-framework/all-classes.css');
4 |
> 5 | #import { css, registerStyles } from '#vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
| ^
6 |
7 | registerStyles(
[build-status] 1 error and 1 warning were reported.
How to properly add such styles?

Related

Apache Zeppelin-Highcharts displaying blank output

I configured HighCharts on our Zeppelin Tool to implement a drill down functionality.
We placed the below jar files and stated the same in the Dependencies
Zeppelin-highcharts-0.6.4.jar
lift-json_2.11-2.6.3.jar
paranamer-2.4.1.jar
We tried executing the below code-
val bank = spark.read.option("header",true).csv("/u01/zepplin/bank/bank2.csv")
bank.show()
+---+-------+
|age|balance|
+---+-------+
| 20| 40000|
| 30| 60000|
| 50| 70000|
| 80| 90000|
+---+-------+
import com.knockdata.spark.highcharts._
import com.knockdata.spark.highcharts.model._
highcharts(bank.series("x" -> "age", "y" -> sum(col("balance"))).orderBy(col("age"))).plot()
But this code is not able to plot anything, giving a blank out put.It just shows the tile(Chart Title).
To rule out the browser compatibility issue I tried this on all the browsers too.
Am I missing something here.Do we have any alternative for High-charts for custom visualization like drill down etc.
Thanks in Advance

NativeScript Webview newbie questions

I am experimenting with using NativeScript to speed up the process of porting an existing Android app to iOS. The app in question uses a great deal of SVG manipulation in a Cordova webview. To keep things simple I want to port all of my existing Webview side code - in essence the entire existing Cordova www folder and its contents - over to the new NativeScript app. The WebView talks to a custom Cordova plugin which I use to talk with my servers to do such things as get new SVGs to show, keep track of user actions etc.
If I an get through these teething issues I am considering using this component to implement bi-direction communications between by current webview JS code and the, new, NativeScript backend that will replace my current Cordova plugin. Someone here is bound to tell me that I don't need to do that... . However, doing so would mean throwing out the baby with the bathwater and rewriting all of my current Webview ES6/JS/CSS code.
This is pretty much Day 1 for me with NativeScript and I have run into a few issues.
I find that I cannot get rid of the ActionBar even though I have followed the instructions here and set the action bar to hidden.
I can use the following markup in home.component.html
to show external web content. However, what I want to really do is to show the local HTML file that is in the www folder in the following folder hierarchy
app
|
____home
|
____www
|
______ index.html
|
______css
|
______ tpl
|
.....
However, when I use the markup
<Page actionBarHidden="true" >
<WebView src="~/www/index.html"></WebView>
</Page>
I am shown the error message
The webpage at file:///data/data/com.example.myapp/files/app/www/index.html is not available.
I'd be most grateful to anyone who might be able to tell me what I am doing wrong here - and also, how I can get rid of that action bar which is currently showing the app title.
About using local HTML file
Is your local HTML file recognized by Webpack (which is enabled by default in NativeScript)? Try to explicitly add the local HTML file to your webpack.config.js file. This way Webpack will "know" that it will have to bundle this file as well.
new CopyWebpackPlugin([
{ from: { glob: "<path-to-your-custom-file-here>/index.html" } }, // HERE
{ from: { glob: "fonts/**" } },
{ from: { glob: "**/*.jpg" } },
{ from: { glob: "**/*.png" } },
]
Example here
About hiding the ActionBar
NativeScript Core only: Try hiding the action bar directly for the frame that holds the page. See the related documentation here
NativeScript Angular: The page-router-outlet will have an action bar by default (you can hide it by using the Page DI as done here). Otherwise, you could create a router-outlet (instead of page-router-outlet). The router-outler won't have the mobile-specific ActionBar.

wxFileDialog filename textbox appears as clipped

I display an Open File dialog using the following code:
wxFileDialog fileDialog(
this,
wxEmptyString,
"E:\\Testfiles",
"SOME_TEST_FILE_WITH_LONG_NAME.txt",
"TXT files (*.txt)|*.txt",
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR);
if (fileDialog.ShowModal() == wxID_OK)
{
// do something with the file
}
Notice that I set the default filename to a long string (about 10 or more characters).
When the file dialog is displayed, the filename looks clipped.
But on inspection, it's not really clipped.
More like the starting point of the text is placed too much to the left.
When you place the cursor on the textbox, and scroll to the left, you get the complete filename.
Also, when you switch to a different window then return to the file dialog, it corrects itself and displays the complete filename.
This isn't really affecting the functionality of the file dialog.
This is more of an aesthetic issue.
But if there's a reason for this behavior or if there's a solution, I would like to know.
Thanks!
I'm using:
wxWidgets 3.1.0
Windows 10 Home 64-bit
UPDATE (2017/03/20):
I opened a ticket at wxTrac for this bug.
You can check it here:
http://trac.wxwidgets.org/ticket/17824.
This looks like a bug in wxWidgets, please try to reproduce it in the dialogs sample by making minimal changes to the wxFileDialog call which is already present there and open a ticket on wxTrac with the patch allowing to see the problem, so that someone could debug it.
As a temporary workaround (while an official resolution from wxWidgets is not yet available), calling CenterOnParent() after constructing the file dialog properly "scrolls" the filename so that it won't appear as "clipped".
wxFileDialog fileDialog(
this,
wxEmptyString,
"E:\\Testfiles",
"SOME_TEST_FILE_WITH_LONG_NAME.txt",
"TXT files (*.txt)|*.txt",
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR);
// fixes the clipped filename
fileDialog.CenterOnParent();
if (fileDialog.ShowModal() == wxID_OK)
{
// do something with the file
}

Set Hyperlink into iReport

I used Jaspersoft iReport Designer 5.1.0 in ubntu 12.04
I want create Hyperlink.
Two Report :- Report 1
Report 2
In Report 1 set Hyperlink To called Report 2
Step :-
Take on text element ex : ${ID}
Right Click Hyperlink
Target : self type : Report Execution
Link Parameter :- _report "/path Report2"
In Preview Click Id than nothing happen and Report 2 not called
And Following Error Occurred:-
 
Compiling to file... /home/mansi/Tweet_Report/report5.jasper
Compilation running time: 174!
 Filling report...
 Locale: English (India)  Time zone: Default Report fill running
time: 44! (pages generated: 1)  Exporting Text (iReport) to file...
/home/abc/R1_Report/Report1.txt!
Error exporting print... net.sf.jasperreports.engine.JRPrintText.getTextAlignment()B
java.lang.NoSuchMethodError: net.sf.jasperreports.engine.JRPrintText.getTextAlignment()B
    at com.jaspersoft.jrx.export.JRTxtExporter.layoutGrid(JRTxtExporter.java:419)
    at com.jaspersoft.jrx.export.JRTxtExporter.exportPage(JRTxtExporter.java:300)
    at com.jaspersoft.jrx.export.JRTxtExporter.exportReportToWriter(JRTxtExporter.java:289)
    at com.jaspersoft.jrx.export.JRTxtExporter.exportReport(JRTxtExporter.java:257)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:1174)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Export running time: 9! No external viewer specified for this type of
print. Set it in the options frame!
Please help me to solved this Error.
http://community.jaspersoft.com/questions/803963/outputing-txt-file
It looks like you have to set the character height and width. From the page I have linked to:
Go to Tools-->Options
Select Export Options tab --> Select Text from left pane
Set values for Character Width, Character Height, (The values I have set 7 and 13.9) Page width and Height.
Now try generating the report and it will work. Try setting different values to make it fit properly.

wkhtmltopdf automatic page breaks

I'm using wkhtmltopdf v0.11.0 rc1 in a Rails application through wicked_pdf (I know wicked_pdf does not support the new command line parameter notation, I'm using my own fork of the gem). I thought that content not fitting within a page should automatically overflow to the next one, but this is not the case - I'm seeing text just being cut off, sometimes in the middle of a line.
I know I can layout my pages using page-break-after:always, but this looks like dirty hard-coding, and besides the HTML comes from an ERB template so it's not always obvious where to put page breaks.
Can something be done so that page breaks are inserted automatically? Am I missing something about how this works?
Here's what the generated command line looks like
\"c:/program files (x86)/wkhtmltopdf/wkhtmltopdf.exe\"
--header-html \"file:///C:Users/bleak/AppData/Local/Temp/campaign_report.header.pdf_pdf_1580_0.html\"
--footer-html \"file:///C:/Users/bleak/AppData/Local/Temp/campaign_report.footer.pdf_pdf_1580_0.html\"
--margin-top 20 --margin-bottom 15 --margin-left 5 --margin-right 40
--page-size \"A4\"
page \"file:///C:/Users/bleak/AppData/Local/Temp/campaign_report_cover.pdf_pdf_1580_0.html\" --disable-javascript
toc --xsl-style-sheet \"c:/work/morizo/admoney/app/views/layouts/campaign_report.xsl\" - -
It turned out that this was happening due to fixed sizes on divs used to wrap document sections:
div.page {
width: 180mm;
height: 277mm;
overflow: hidden;
page-break-after: always;
}
Once I removed width and height, auto breaking started working as expected. Simple.

Resources