< prev index next >

modules/javafx.fxml/src/main/docs/javafx/fxml/doc-files/introduction_to_fxml.html

Print this page
rev 10445 : [mq]: doc-v1-8177566-trampoline

*** 1049,1071 **** <h2><a name="deploy_as_module">Deploying an Application as a Module</a></h2> <p>If <span class="code">FXMLLoader</span> is used to load types in a named module, the application must ensure that all types that are referenced in the FXML files, including the controller class and any custom <span class="code">Node</span> classes, are reflectively accessible to the <span class="code">javafx.fxml</span> ! module. This means that each type must <span class="code">open</span> the ! containing package to at least the <span class="code">javafx.fxml</span> module ! (or <span class="code">export</span> the containing package unconditionally). </p> ! <p>For example, if the controller class is in the <span class="code">com.foo</span> ! package in the <span class="code">foo.app</span> module, the <span class="code">module-info.java</span> might look like this: </p> <pre><span class="code">module foo.app { opens com.foo to javafx.fxml; }</span></pre> <hr> <p> <font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://download.java.net/java/jdk9/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="http://download.java.net/java/jdk9/docs/legal/cpyr.html" target="_blank">Copyright</a> &copy; 2008, 2017, Oracle and/or its affiliates. All rights reserved.<br><b>DRAFT 9-ea</b></font> </p> </body> --- 1049,1074 ---- <h2><a name="deploy_as_module">Deploying an Application as a Module</a></h2> <p>If <span class="code">FXMLLoader</span> is used to load types in a named module, the application must ensure that all types that are referenced in the FXML files, including the controller class and any custom <span class="code">Node</span> classes, are reflectively accessible to the <span class="code">javafx.fxml</span> ! module. A type is reflectively accessible if the module ! <span class="code">opens</span> the containing package to at least the ! <span class="code">javafx.fxml</span> module. </p> ! <p>For example, if <span class="code">com.foo.MyController</span> is in the ! <span class="code">foo.app</span> module, the <span class="code">module-info.java</span> might look like this: </p> <pre><span class="code">module foo.app { opens com.foo to javafx.fxml; }</span></pre> + <p>Alternatively, a type is reflectively accessible if the module + <span class="code">exports</span> the containing package unconditionally. + </p> <hr> <p> <font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://download.java.net/java/jdk9/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="http://download.java.net/java/jdk9/docs/legal/cpyr.html" target="_blank">Copyright</a> &copy; 2008, 2017, Oracle and/or its affiliates. All rights reserved.<br><b>DRAFT 9-ea</b></font> </p> </body>
< prev index next >