Home Forums Presentation Screens How to create picker to capture instances of a new class


Viewing 3 reply threads
  • Author
    • #8644
      jason ngjason ng


      I am trying to make the picker element from the UI be able to display instances of a new class for user selection. What I have done so far are as follow:

      1. Created a new class named Client with 2 attributes firstName and lastName
      2. Created persistence mapping for both the attributes
      3. Created a form list named ClientList with class set to Client and added firstName to the form
      4. Created a ClientPicker screen where the form under Common(FormRef) is set to ClientList and name set to frmClientList. Under the UI Action tab created a Script with Event set to sysProperties and Source set to frmClientList. The script are (source’fireUIEvent (UIEvent’new “sysOK” parameter source))
      5. Seed 2 instances of the Client class with pickerM1 set to ClientPicker and checked the instance existence with read-instance

      Then I went to the UI and bounds the picker to this class. But then when I try press the arrow button It gave me errors. Is there anything that I missed?

    • #8666
      Peter MurrayPeter Murray

      Hi Jason,

      Can you provide the error/stack trace/screen shot to help give us some more context?  Also, from where are you launching the picker?




    • #8696
      jason ngjason ng

      Hi Peter,

      I have attached a screen shot for my picker screen picker screenThe following is the stack trace:

      ; 10:51:56,843 ERROR [FlatApplicationController] (http-7080-exec-2) —– Dispatch Err Info| Exception: nexj.core.util.UncheckedException: Missing source form ref in picker popup “DOLClientPicker”. (err.client.popupController.missingSourceFormRef) Ctrl Id: <no ids received> View – ApprovalDetailPortlet$portletRef10C9EEB4E8B1584AAB8866E6F38F06D231 Popup – <none>

      ; 10:51:56,843 ERROR [FlatApplicationController] (http-7080-exec-2) —– Application State| Active Screen: ScreenView{ApprovalDetailPortlet$portletRef10C9EEB4E8B1584AAB8866E6F38F06D231} Popup: <none>

      ; 10:51:56,843 ERROR [FlatApplicationController] (http-7080-exec-2) —– Application State| Popup Holder: ApprovalDetailPortlet Popup : <none> Ctxt Change State: 0

      ; 10:51:56,843 ERROR [FlatApplicationController] (http-7080-exec-2) Error processing the flat page request (reference id 4kiiju)

      nexj.core.util.UncheckedException: Missing source form ref in picker popup “DOLClientPicker”. (err.client.popupController.missingSourceFormRef)

      at nexj.core.controller.PopupController.?(PopupController.java:981)

      at nexj.core.controller.PopupController.pickerInitialQuery(PopupController.java:1786)

      at nexj.core.controller.PopupController.initialQuery(PopupController.java:1072)

      at nexj.core.controller.GenericScreenController.activate(GenericScreenController.java:592)

      at nexj.core.controller.PopupController.activate(PopupController.java:1031)

      at nexj.core.controller.flat.FlatPopupDelegator.open(FlatPopupDelegator.java:66)

      at nexj.core.controller.flat.FlatPopupController.open(FlatPopupController.java:145)

      at nexj.core.controller.ContinuationInvoker.invoke(ContinuationInvoker.java:91)

      at nexj.core.controller.flat.FlatPopupController.invoke(FlatPopupController.java:262)

      at flow:QuestionnaireStreamClient.lambda(library:flow:QuestionnaireStreamClient:48)

    • #8716
      Peter MurrayPeter Murray

      It looks like you are missing the sourceFormRef property on the screen element.  I’d recommend looking at other picker screens to help see what is needed to configure a picker.  You may also be able to run the validation in studio to get a more user friendly error message.

      If you click on the topmost “Screen” node in the outline view you should see a property in the Properties view called “sourceFormRef” that should be “frmClientList”.

      The overall screen xml should look something like the following:

Viewing 3 reply threads
  • You must be logged in to reply to this topic.