Results 1 to 10 of 10

Thread: Selection popup

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Sep 2011
    Minneapolis, MN

    Default Re: Selection popup

    Thank you very much for this. With this, I got it working in no time.

    I have another anomaly with sizing the dialog. Maybe a bug but I am not sure if I am doing something wrong.

    When adding another column to the grid inside the dialog the WebApp Designer shows the change properly but when compiling and running it, the dialog appears as a small square box in the top left of the browser.
    You can't click either close or the confirm button. See pictures for visuals.
    Click image for larger version. 

Name:	2017-11-14 14_48_31-WebApp Designer [SelectionListDialog.wo].png 
Views:	28 
Size:	7.5 KB 
ID:	11468Click image for larger version. 

Name:	2017-11-14 14_48_46-Tempus Field.png 
Views:	23 
Size:	9.1 KB 
ID:	11467

    I have added my source code below to share and reference for aboves issue.

    Object oSelectionListDialog is a cWebModalDialog
        Set psCaption to "Select Item from list"
        Set pbResizable to True
        Set piMinHeight to 300
        Set piMinWidth to 300
        Property tListItem[] paListItems
        Property Integer piSelectionIdno
        // send reply on Esc or "x" as submit, which will send the callback on a cancel
        Set pbServerOnEscape to True
        Procedure OnEscape
            Forward Send OnEscape
        Set pbServerOnShow to True
        Procedure OnShow
            Send GridRefresh of oSelectionItems
            Forward Send OnShow
        Object oMainPanel is a cWebPanel
            Set peRegion to prCenter
            Set pbFillHeight to True
            Set piHeight to 200
            Object oSelectionItems is a cWebList
                Set pbDataAware to False
                Set pbShowHeader to False
                Set piHeight to 120
                Set pbFillHeight to True
                Procedure OnManualLoadData tWebRow[] ByRef aTheRows String  ByRef sCurrentRowID
                    Integer i iItemCount
                    tListItem[] aListItem
                    WebGet paListItems of oSelectionListDialog to aListItem
                    Forward Send OnManualLoadData (&aTheRows) (&sCurrentRowID)
                    Move (SizeOfArray(aListItem)-1) to iItemCount
                    For i from 0 to iItemCount
                        Move aListItem[i].iUniqueRecIdno to aTheRows[i].sRowID
                        Move aListItem[i].sDescription to aTheRows[i].aCells[0].sValue
                    Move 0 to sCurrentRowID
                Procedure OnLoad
                    Forward Send OnLoad
                    Send GridRefresh
                Procedure OnShow
                    Forward Send OnShow
                Object oDiscriptionWebColumn is a cWebColumn
                    Set psCaption to "Description"
                    Set piWidth to 50
                    Set pbFillHeight to True
                Object oDetailWebColumn is a cWebColumn
                    Set psCaption to "Detail"
                    Set pbNewLine to True
                    Set piWidth to 100
                    Set psCSSClass to "RowCaption"
        Object oButtonPanel is a cWebPanel
            Set peRegion to prBottom
            Set piColumnCount to 4
            Object oConfirmBtn is a cWebButton
                Set pbShowLabel to False
                Set psCaption to "Confirm"
                Set piColumnSpan to 4
                Procedure OnClick
                    Send Ok
        Set pbServerOnSubmit to True
        Procedure OnSubmit
            Send Ok
        Procedure Ok
            Integer iSelectionIdno
            WebGet psCurrentRowID of oSelectionItems to iSelectionIdno
            WebSet piSelectionIdno of oSelectionListDialog to iSelectionIdno
            Forward Send Ok
        Procedure InitializeSelectionListDialog String sTitle Integer iWidth Integer iHeight tListItem[] aListItems
            String sSelected
            Move 0 to sSelected        
            WebSet piWidth of oSelectionListDialog to iWidth
            WebSet piHeight of oSelectionListDialog to iHeight
            WebSet paListItems of oSelectionListDialog to aListItems
            WebSet psCaption of oSelectionListDialog to sTitle
        Procedure GetSelectedItem Integer ByRef iSelectionIdno Boolean ByRef bCancel
            WebGet piSelectionIdno of oSelectionListDialog to iSelectionIdno
            WebGet pbCanceled to bCancel
    Call from webview:
    //ToDo: Build and pop up selection list to client.
    Send InitializeSelectionListDialog of oSelectionListDialog "Select Attachment ..." 300 400 aAttachmentArray
    Send Popup of oSelectionListDialog Self
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2017-11-14 14_48_31-WebApp Designer [SelectionListDialog.wo].png 
Views:	17 
Size:	8.1 KB 
ID:	11466  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts