Remaining questions while evaluating JavaFX for a new project

Dear forum members:
currently I am evaluating the possibilities of next-generation GUI technologies, such as JavaFX, Silverlight and Flash/Flex, for a new project. To get a basic understanding of JavaFX's concepts, I worked through the available online text and video tutorials, and all the treated topics seem quite obvious/comprehensible to me +as long as one is only confronted to relatively static GUI component hierarchies+. But, as a newbie, some questions concerning more dynamically defined GUIs (i.e. dynamic JFX scripting*) still remain.
Application scenario (exemplary):
Say I want to create a "Online Shopping Application" that supports "+ShopOwners+" in *dynamically* defining the "+Shop Model+" structure, e.g. accepted visitor (client) categories, product categories their products, pricing information, payment methods, etc.
Then, based on the dynamically defined model, the shop owner should be able to design and layout the necessary forms, such as order forms, survey/feedback forms, etc. This should be done in "design mode", and there should also exist a possibility for him/her to preview the specification results in a "preview mode".
Finally, the shop owner must be able to save the model and forms on the server side in a way that can requested and run be the shopping app end users (the shop clients) via (another (?)) JavaFX frontend.
_The still remaining questions for this scenario are:_
+1. Is JavaFX appropriate for creating such kind of applications, especially when it comes to dynamic JFX scripting (and compilation) on the client side??? (By now I'm not quite sure if this is really necessary for my plans!)+
+2. Concerning the ShopOwner's GUI with its design and preview mode (and knowing that the latter mode will be the GUI version presented to the shop clients in another JFX module):+
+Is it possible to *dynamically *build up a +Scene Graph+ in a way that lets me handle and *compile* the corresponding +JFX Script+ on the client side for previewing it? Or is a client-server roundtrip absolutely necessary?
How could one persist this JFX Script on the server side? I.e., which intermediary format would be the most appropriate? => XML, JSON, JFX Script?
3. Concerning the "Shop Model", would I optimally create JFX classes or even Java Beans to bind to?
4. And finally: What would be your recommended way (software architecture) to fulfill this task in JavaFX?
Do there already exist some JFX components (dynamic forms/survey authoring modules, etc.) that persue a similar task and that I didn't find yet?
As the clarification of the above-mentioned issues are very important for me, I hope that you more experienced users can help me, pointing me to a practicable approach.
Thank you very much for any help and constructive tips in advance.
Best regards
Martin Meyers

Q1: Do I optimally need 2 different custom components for each treated concept, or do I have just 1 component with 2 internal modes (design & preview/usage)??
E.g., (a) FormSpec widget composed of LabelSpec, TextBoxSpec, ChooseBoxSpec,... widgets each having their preview pendants
Form, Label, TextBox, ChooseBox, etc.
versus
+(b) only Form widget composed of Label, TextBox, ChooseBox widgets, but all having a "design/preview execution mode".+
Closer to (b), I think, though each widget doesn't need to be modified to have design and preview modes. Instead, each widget can be wrapped within a Group to provide the design/preview functions without modifying the widget itself.
The technique is as follows. Given a sequence of widgets (Nodes, really), for each widget, wrap it in a Group that contains that widget but with an overlay Rectangle in front of it. The Rectangle can be semi-transparent, or fully transparent if you prefer. (In the example below I've made it a semitransparent color to make its location obvious as well as to provide a highlight that signals design mode.) The overlay Rectangle is set up so that its dimensions will exactly track the dimensions (bounds) of the widget behind it. I've set blocksMouse to true so that when it's present, the overlay traps events and prevents interaction with the widget. There is a boolean variable previewMode, controlled by a CheckBox, that controls the visibility of these overlay rectangles. I've also added a bit of code to track mouse events on the overlay rectangles so that you can move the widgets around when you're in design mode.
Note that the visible variable differs from transparent, i.e. opacity == 0.0. If a node is visible but is transparent, it is still eligible to receive events; whereas if visible is false, it does not receive events.
Here's some code that illustrates this technique. I'll answer your other questions in a subsequent post.
import javafx.stage.Stage;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.input.*;
import javafx.scene.layout.*;
import javafx.scene.shape.Rectangle;
import javafx.scene.paint.Color;
var previewMode = true;
var lastX:Number;
var lastY:Number;
function wrap(n:Node):Node {
    Group {
        content: [
            n,
            Rectangle {
                opacity: 0.2
                fill: Color.web("#ffff00")
                x: bind n.boundsInParent.minX
                y: bind n.boundsInParent.minY
                width: bind n.boundsInParent.width
                height: bind n.boundsInParent.height
                visible: bind previewMode
                blocksMouse: true
                onMousePressed: function(me:MouseEvent) {
                    lastX = me.x;
                    lastY = me.y;
                onMouseDragged: function(me:MouseEvent) {
                    n.layoutX += me.x - lastX;
                    n.layoutY += me.y - lastY;
                    lastX = me.x;
                    lastY = me.y;
var controlList:Node[] = [
    Button {
        layoutX: 140
        layoutY: 20
        text: "Button1"
        action: function() { println("Button1 clicked!"); }
    Slider {
        layoutX: 30
        layoutY: 60
        min: 0
        max: 100
        override var value on replace {
            println("Slider value is now {value}");
    Label {
        layoutX: 50
        layoutY: 100
        text: "Non-interactive label"
    CheckBox {
        layoutX: 40
        layoutY: 140
        text: "CheckBox"
        override var selected on replace {
            println("CheckBox is now {if (selected) "checked" else "unchecked"}");
Stage {
    title: "Design vs Preview Mode"
    width: 400
    height: 250
    scene: Scene {
        content: [
            CheckBox {
                layoutX: 10
                layoutY: 10
                text: "Preview Mode"
                selected: bind previewMode with inverse
            Panel {
                content: for (n in controlList) {
                    wrap(n)
}

Similar Messages

  • "OS X Update Combined (10.8.2) can't be installed on this disk. An error occurred while evaluating Javascript for the package."

    Need help with "OS X Update Combined (10.8.2) can't be installed on this disk. An error occurred while evaluating Javascript for the package."
    Any ideas or suggestions?
    Thanks

    Well, I've tried your solution without luck.
    So, I tried reinstalling OS X Mountain Lion (without formatting the HDD) and it worked! I did it like this:
    - Turned on my MBP while holding down Command-R to start OS X Recovery
    - Chose the option to reinstall OS X Mountain Lion
    After a while, the system rebooted and OS X 10.8.2 was already installed. All my data remained on the HDD since I didn't format it before reinstalling OS X.
    Hope it helps some of you with the same problem.

  • 10.8.2 update: can't install "error occurred while evaluating Javascript for the package"

    Greetings All-
    I'm trying to update from 10.8.1 to 10.8.2 on my Macbook Air. When I downloaded the .dmg from Apple and ran it, I got the following error:
    "OS X Update Can't be installed on this disk. An error occurred while evaluating JavaScript for the package."
    So far, I've done the following, all to no avail:
    (1) Updated Java to v7 per Java's website, no change
    (2) Downloaded the 10.8.2 combo update, no change
    (3) Found Apple's OS X Java update (which is still at v6)- get an error at install that "the contents of the disk can't be changed"
    (4) Restarted at each step
    Does anyone have any suggestions or ideas?
    Thanks!

    Permission repair, too?
    Take a look here: https://discussions.apple.com/thread/3811748?start=0&tstart=0
    And possibly here:  https://discussions.apple.com/thread/3889562

  • "Adobe Photoshop Lightroom 5.4 can't be installed on this disk. An error occurred while evaluating JavaScript for the package."

    Hi there,
    I'm getting this error on trying to install / update LR 5.3 to 5.4:
    "Adobe Photoshop Lightroom 5.2 can't be installed on this disk. An error occurred while evaluating JavaScript for the package."
    I hope there's somebody that can help me out here.
    Cheers

    Hi kglad,
    Sorry for the late response:
    Here's the screenshot you wanted:
    It's in Dutch but it 's exactly the same as posted above by abphoto.biz
    I'm running OS X Maverick on an early iMac (2007). No problems until now.....
    Hope you can help,
    Cheers

  • Trying to install Lightroom on a MacAir and I get an error message that an error occurred while evaluating JavaScript for the package

    Error occurred while evaluating JavaScript for the package.  Trying to install a Lightroom 5.6 download on an AirMac 10.9.4 OS.  Already installed on my Mac laptop.  Tried restating laptop but got the same error message

    Hi,
    Just wanted to say I found out the answer. I should have looked first to see if anyone else was having the same problem but I didn't. 

  • An error occurred while evaluating javascript for the package

    I need help. Whenever I try to install anything I get the error "an error occurred while evaluating javascript for the package." This occurs with installing a safari update or updating OS X. I am running with version 10.6.4 but can not update because I get the"an error occurred while evaluating javascript for the package" error. Any suggestions on how to repair my system?
    Thank You
    Neil

    Nobody?

  • OS X update 10.9.3 can't be installed on this disk. An error occurred while evaluating JavaAcript for the package. Please help!

    My Apple Store, Mail and update was not working for sometimes, when I download OS 10.9.3 and try to install, error message appear: OS X update 10.9.3 can't be installed on this disk. An error occurred while evaluating JavaScript for the package. Please help!

    iMac (27-inch Mid 2011), OS X Mavericks (10.9.3), SL & ML, G4 450 MP w/Leopard, 9.2.2

  • If i go to the apple store and replace my black iphone 4 while paying 200$ for a new one can i get the white?

    My Screen is busted to Crap and back, im gonig to the apple store at Lenox Square. While I pay for a new one $200 Can they give me a white one instead of the regular black one i have? i mean im paying for it.. ? Help Please i go Friday

    You are paying for a refurbished unit which is supposed to be same as the one you have. It won't hurt to ask about the change in color, but that would be entirely at the description of the Apple rep, so ask nicely.
    Good luck!

  • HT3529 my iphone broke, is there anyway to see who is texting me or calling me while i wait for my new phone?

    my iphone broke, is there anyway to see who is texting me or calling me while i wait for my new phone?

    Through iCloud, a user is able to share (and sync) all content between iOS devices (and Macs), including messages.
    • Syncing between iOS devices
    If you have an iPad or iPod touch, activating iCloud in those devices with the same iCloud account of your iPhone will allow the text messages you initially recieve from your phone to be delivered to the additional devices.
    ➞ Limitations
    The caller must be an iOS device (iPhone, iPad, iPod Touch) user.
    The caller must be sending the text to your iCloud account (e-mail address), not your phone number.
    • Syncing to your Mac
    If you have a Mac (iMac, Macbook, Mac mini, etc), 'Messages Beta for OS X' will allow your computer to act as a text messaging machine, as well ― just like your iPhone.
    ➞ Limitations
    The caller must be an iOS device (iPhone, iPad, iPod Touch) user.
    The caller must be sending the text to your iCloud account (e-mail address), not your phone number.
    Unfortunately, phone calls, which all of the other iOS devices, except iPhones, don't have, cannot be received.

  • Should we really go for bean data controls for a new project?

    Hi,
    I am still new data controls and trying to figure out the advantages of using bean data controls for our new project. Our UI is going to have customized UI components and our back end is going to be a tcp/ip server.
    Is it a good idea to develop java beans and then create data controls to bind to UI layer? I think it makes sense to use data controls if we want to use existing java beans. Maybe we would be separating the model layer by using data controls, but only thing it would be doing for us would be the simple object calls to my java beans. Would it be better to use data controls or use I choose to make object calls?
    Thanks,
    Manoj

    Hi,
    the POJO data control will always give you a benefit and develope productivity, unless what you have to build fits on a single page - in which case you may not mind the burdon of manual UI component binding
    Frank

  • When I hit the import button for a new project I get an internal error message stating: Could not find namespace: AgCreativeCloudUtils

    When I hit the import button for a new project I get an internal error message stating: Could not find namespace: AgCreativeCloudUtils
    Can someone help me with this issue please? Tks

    https://forums.adobe.com/search.jspa?q=Could+not+find+namespace%3A+AgCreativeCloudUtils&pl ace=%2Fplaces%2F1383621&depth=…

  • Automating album creation for a new project?

    I have several projects (such as specific event shoots) with the same basic set of albums for that project (some regular albums, some smart albums). I'll have albums for specific subsets of the events (for my sports shots, there's Individuals, Action, Team, etc.).
    I'd like to automate the creation of these albums, as it gets a bit tedious having to create a bunch of albums manually for each new project I create. I looked at Aperture's automator actions, but couldn't find anything related to album creation. Is there such a thing?
    Thanks...
    David

    I'm pretty sure this is scriptable using AppleScript. I haven't really had the need to script Aperture so I can't tell you the exact syntax without looking it up myself, but it shouldn't be too hard if you've ever used AppleScript. Just open Script Editor, go to File > Open Dictionary... > Aperture and you'll get a list of the scriptable actions Aperture has available.

  • Java vs. C# for a new project

    Hi,
    I know this has probably been done to death, but the world changes and the old arguments lose their validity so I'd be interested in people's thoughts:
    I work for a largely C# shop, but due to a general dislike of .net and Microsoft from the developers there is the possibility of using something non-MS for a new project. Currently it is looking like the app will be a traditional client-server app. Java has been mentioned as a possible alternative, and being an old Java guy myself I'm excited about the possibility of using it again!
    I have a meeting with the directors to discuss reasons why we'd want to use Java in place of C#. The directors have made a lot of cash out of MS platforms, but are open to change if I can convince them - I've come up with the following reasons:
    1) Java is more widely adopted in 'serious' industry and the biggest websites e.g. ebay, Amazon etc. all use it as their platform of choice
    2) Portable - we are having a desktop client. Whilst running on non-Windows desktops may not be a priority now, Macs and Linux are making noteworthy ground (Apple are nearly tipping 10% for the first time in decades!). Java would let us sell to these clients too.
    3) Cheaper - Don't need to pay thousands for MS licences before they can even run our software (IIS, SQL Server etc.)
    4) Better community - can leverage various OSS projects to accelerate development - in the .net world similar components are likely to be chargeable (and probably expensive!)
    What do you think to my reasons and can anyone think of any other compelling arguments?
    Many thanks,
    Ash

    A_C_Towers wrote:
    I work for a largely C# shop, but due to a general dislike of .net and Microsoft from the developers there is the possibility of using something non-MS for a new project.
    makes no sense. Use the appropriate technology for the solution rather than something 'you like'.
    Their 'dislike of .NET' almost certainly means they're stuck in the past and don't want to put in the effort to learn anything newer than VB6.
    I have a meeting with the directors to discuss reasons why we'd want to use Java in place of C#. The directors have made a lot of cash out of MS platforms, but are open to change if I can convince them - I've come up with the following reasons:
    for client/server? Unless you need to support more platforms than just Windows using Java instead of .NET makes no sense.
    1) Java is more widely adopted in 'serious' industry and the biggest websites e.g. ebay, Amazon etc. all use it as their platform of choiceIt isn't.
    2) Portable - we are having a desktop client. Whilst running on non-Windows desktops may not be a priority now, Macs and Linux are making noteworthy ground (Apple are nearly tipping 10% for the first time in decades!). Java would let us sell to these clients too.No argument. Apple is a niche market for corporate use except with graphics designers, Linux is a niche market anywhere except for servers.
    3) Cheaper - Don't need to pay thousands for MS licences before they can even run our software (IIS, SQL Server etc.)Wrong.
    IIS comes free with Windows, and you still need a quality database server. As your current customers will be using MS SQL Server that's the most logical choice and its integration with .NET is way better than its integration with Java.
    The most viable alternative is Oracle which is even more expensive.
    The most viable alternative for IIS when using Oracle is WebLogic which is more expensive than is IIS (which after all is free).
    4) Better community - can leverage various OSS projects to accelerate development - in the .net world similar components are likely to be chargeable (and probably expensive!)
    Could be. But that could just be because you know the Java community better.
    What do you think to my reasons and can anyone think of any other compelling arguments?
    Unless you or (more important) your customers already have a Unix environment in place, there is no real reason to not use .NET.

  • Configuring Maven for a new Project

    Could anyone provide inputs on how to configure Maven for a new project?
    I am referring to links
    http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20setup%20Maven?
    http://maven.apache.org/guides/mini/guide-creating-archetypes.html
    Rgds,
    seetesh

    We are introducing a new feature in Flex 2.0.1 that's due out
    early next year. The feature is called "Modules" and it was
    discussed at this year's MAX 2006. You can read more about it on
    Roger Gonzalez's blog:
    http://blogs.adobe.com/rgonzalez/
    - check the "Modular Applications" articles. I think this will go a
    long way to making the reusable parts you are talking about.
    Flex does not build things from instructions unless they are
    written in ActionScript. We have customers that do create dynamic
    interfaces based on data loaded from a database, so it is possible.
    But if you have pre-built templates and all you need to do is
    change certain aspects at runtime, it should be pretty easy with
    Flex. Take a look at the Flex documentation, especially the part
    about the Flex framework and how Flex sources are compiled into
    SWFs.
    You style Flex components using style sheets (CSS files).
    This also includes specifying skins for components if you decide to
    give something a whole new look.
    I'm a bit biased here, but I think using ColdFusion (version
    7.0.2) with Flex 2 is very easy. But it depends on your needs,
    budget, deployment, etc. WIth CF 7.0.2 and Flex Builder 2 you get
    wizards to be build both CFC (ColdFusion components) and matching
    ActionScript objects so that you exchange objects, not just data,
    between Flex and CF.
    WebServices can also be used (with CF, too). This gives you
    more choices to the backend. If you have a large amount of data or
    it is complex, consider Flex Data Services as that has data
    management capabilities.
    Flex 2 has localization capabilties. You create a 'resource
    bundle' in various languages and build SWFs for each one. When the
    end user choses their preference, take them to the page that loads
    the appropriate SWF.
    HTH

  • HT5958 After i updated my terabyte, when i open fcpx 10.1 my hard drive never appears, so i can't open a new library for a new project. What should i do?

    After i updated my terabyte, when i open fcpx 10.1 my hard drive never appears, so i can't open a new library for a new project. What should i do?

    Hard drives do not appear in the application. Use File>New Library.

Maybe you are looking for