Question
Tata Consultancy Services
IN
Last activity: 12 Jan 2018 8:22 EST
Dropdown values with embedded spaces
Our application is upgraded from 6.2 to 7.2. In 6.2, we had a dropdown we used to populate using Dynamic Select that called an activity which populates the data with spaces. Ex:
Andy 26 MyCo
Arum 36 MyOrg
--- so on
But, in 7.2, the same control is displaying the dropdown values with embedded spaces getting trimmed off. Though in clipboard it shows trimmed off values both in 6.2 and 7.2, I guess the show-page method in 6.2, renders the correct values with spaces. But in 7.2, it doesn't.
I checked in 7.2 and the show-page indeed shows values with embedded spaces trimmed off. But, if I do a view page source, I could see the spaces between words.
Can we achieve this using OOTB pxDropdown control? Or is there any other way we can display dropdown values with embedded spaces using custom control?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Tata Consultancy Services
IN
The issue is resolved using custom control in java. Introducing spaces ( ) in java could render the dropdown values as wanted. So, went with that approach.
Pegasystems Inc.
IN
Dynamic select control in deprecated in Pega 7 versions. Not sure if there is an issue with show page method.
To be upgraded to Pega7 standard, Update the control to pxDropDown and source it from a data page. Populate the datapage with the source as activity (use the existing activity used for dynamic select, may be you need to make some changes. "Comment the show-page method")
Add the required spaces between text in the source activity. Content would be rendered as is.
Tata Consultancy Services
IN
Hi Vanaa,
Thanks for your reply.
I tried using data page as source of dropdown, but it still displays the data with trimmed values.
Pegasystems Inc.
IN
Are you able to see the spaces between text in Clipboard?
If not, Could you provide an example/sample, how you are giving spaces between text.
Tata Consultancy Services
IN
The spaces are being introduced through the source activity. In clipboard I could see only one space between the words even if the space introduced is much more. In the dropdown the same value as of clipboard is being displayed.
Ex: Value Name $Amt $Amt (in 6 clipboard) (1 space between words)
Value Name $Amt $Amt (in 7 clipboard) (1 space between words)
But while displaying, 6 displays the correct data with spaces as introduced thru activity, but in same whatever is on clipboard is getting displayed.
Pegasystems Inc.
IN
When there are more than one space, its trimming extra spaces.
Adding the spaces using " ", this is adding multiple spaces between text.
Ex: "Hello"+" "+"World"
Accepted Solution
Tata Consultancy Services
IN
The issue is resolved using custom control in java. Introducing spaces ( ) in java could render the dropdown values as wanted. So, went with that approach.
EPAM Systems, Inc.
ES
Hi Avisek,
Thanks for posting on PSC.
Do you mean to say, that suppose you have a dynamic select with values as, "ABCD EFGH","IJKL MNOP","QRST UVWX" etc.
So, in real time it's showing as "ABDCDEFGH","IJKLMNOP","QRSTUVWX"? Rectify me, If my understanding isn't correct.
Dynamic select as per my knowledge goes deprecated from latest Pega release. 7.x
I simulated similar scenario using UI Gallery, with pxDropdown control.
Navigate-> Designer Studio->User Interface->Gallery-> UI Elements->Dropdown.
You could see design implementation "pxUIGalleryDropdown" section.
For me, the drop down data is displayed as expected.
It has multiple options such as Data Pages(Similar to data table), Report Definition and property.
You can use it instead. Hope it answers your query, kindly notify.
Regards,
Asif