Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

chosen with JavaFX WebView #704

Closed
larryboymi opened this Issue Jun 26, 2012 · 2 comments

Comments

Projects
None yet
2 participants

Can you confirm this works with webview? Specifically with entries over a number like 500? We are seeing weird null pointer exceptions in the rendering such as:

java.lang.NullPointerException
at com.sun.webpane.sg.prism.RTImage.getGraphics(RTImage.java:39)
at com.sun.webpane.sg.prism.WCBufferedContext.getGraphics(WCBufferedContext.java:29)
at com.sun.webpane.sg.prism.WCGraphicsPrismContext.fillRect(WCGraphicsPrismContext.java:350)
at com.sun.webpane.platform.graphics.GraphicsDecoder.decode(GraphicsDecoder.java:81)
at com.sun.webpane.platform.graphics.WCRenderQueue.decode(WCRenderQueue.java:72)
at com.sun.webpane.platform.graphics.WCRenderQueue.decode(WCRenderQueue.java:86)
at com.sun.webpane.platform.graphics.GraphicsDecoder.decode(GraphicsDecoder.java:327)
at com.sun.webpane.platform.graphics.WCRenderQueue.decode(WCRenderQueue.java:72)
at com.sun.webpane.platform.WebPage.paint2GC(WebPage.java:678)
at com.sun.webpane.platform.WebPage.paint(WebPage.java:658)
at com.sun.javafx.sg.prism.NGWebView.renderContent(NGWebView.java:71)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
at com.sun.javafx.tk.quantum.EmbeddedScene$PaintRunnable.doPaint(EmbeddedScene.java:196)
at com.sun.javafx.tk.quantum.EmbeddedScene$PaintRunnable.paintImpl(EmbeddedScene.java:161)
at com.sun.javafx.tk.quantum.EmbeddedScene$PaintRunnable.run(EmbeddedScene.java:239)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at com.sun.prism.render.RenderJob.run(RenderJob.java:29)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:101)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:358)
at com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:292)
at com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(BaseShaderGraphics.java:720)
at com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(BaseShaderGraphics.java:421)
at com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:739)
at com.sun.webpane.sg.prism.WCGraphicsPrismContext.drawPattern(WCGraphicsPrismContext.java:582)
at com.sun.webpane.platform.graphics.GraphicsDecoder.drawPattern(GraphicsDecoder.java:402)
at com.sun.webpane.platform.graphics.GraphicsDecoder.decode(GraphicsDecoder.java:190)
at com.sun.webpane.platform.graphics.WCRenderQueue.decode(WCRenderQueue.java:72)
at com.sun.webpane.platform.WebPage.paint2GC(WebPage.java:678)
at com.sun.webpane.platform.WebPage.paint(WebPage.java:658)
at com.sun.javafx.sg.prism.NGWebView.renderContent(NGWebView.java:71)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1139)
at com.sun.javafx.tk.quantum.EmbeddedScene$PaintRunnable.doPaint(EmbeddedScene.java:196)
at com.sun.javafx.tk.quantum.EmbeddedScene$PaintRunnable.paintImpl(EmbeddedScene.java:161)
at com.sun.javafx.tk.quantum.EmbeddedScene$PaintRunnable.run(EmbeddedScene.java:239)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at com.sun.prism.render.RenderJob.run(RenderJob.java:29)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:101)
at java.lang.Thread.run(Thread.java:662)

Wonder if it might have something to do with the CSS...

Narrowed the problem down to the css...sorry for my laziness here, but one of the background-image settings of the .chzn-container-multi .chzn-choices is causing the issue...when I commented the class like so:

/* @group Multi Chosen _/
.chzn-container-multi .chzn-choices {
background-color: #fff;
/background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));/
/background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);/
/background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);/
/background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);/
/background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);/
/_background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);*/
border: 1px solid #aaa;
margin: 0;
padding: 0;
cursor: text;
overflow: hidden;
height: auto !important;
height: 1%;
position: relative;
}

I can now render any number of chosen options.

Contributor

pfiller commented Apr 24, 2013

Thanks for sharing the solution. Hopefully anyone else using JavaFX WebView will find this useful.

@pfiller pfiller closed this Apr 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment