Page 1 of 1
Creating a grid
Posted: Mon Jan 11, 2016 3:59 pm
by mpilo0
Hey,
Does anyone know of a simple way to create a grid with the universal designer without changing the way the code behaves too much?
Thanks in advance!
Re: Creating a grid
Posted: Thu Jan 14, 2016 1:58 pm
by Scott Klement
I'm not following you...? Why would you use a UDF to create a grid?
You can use a UDF to populate a grid if the grid specifies a custom URL to load the grid from.
You could also build the whole screen by generating JSON for the display file on the fly... this is quite a bit more involved.
Or, your UDF could output HTML to build your own display without using the PUI framework.
Re: Creating a grid
Posted: Fri Jan 22, 2016 2:55 pm
by mpilo0
We are basically trying to build a screen with Angular JS. We were wondering if there was a way we could use the universal Designer to do this, however we aren't sure how the rows being written and whatnot could work in the universal Designer. As in how you were to read 1 record and whatnot. We are ok with bringing some modifications to our code but we were hoping to limit the said modifications. We thought using the universal designer could be an easy way out.
Thanks!
Re: Creating a grid
Posted: Fri Jan 22, 2016 10:28 pm
by Scott Klement
The Universal Designer is really a templating tool for generating stream/text documents like HTML, XML, JSON, etc. Most of the people using it are using it to build REST web services or to load PUI controls that can be loaded from a JSON-based web service (like dropdowns, grids, charts, etc.) You could certainly use it to generate HTML that works with Angular JS, or any other framework.
Coding web applications with the Universal designer means that you are, basically, writing a web application the traditional way. It's very similar to using something like CGIDEV2 And it's similar-ish to environments like PHP, ASP, JSP, etc. It's not at all like the Rich Display Visual Designer. You have to code all of the HTML, etc. There's no point & click or dragging widgets or any of that stuff.
What concerns me is that you've said things like "...without changing the way the code behaves too much..." and "We are ok with bringing some modifications to our code but we were hoping to limit the said modifications". I don't know how your code works now which makes it really hard for me to address that -- but if your current code is using rich displays or 5250 displays, then the changes to use the universal designer will likely be VERY big changes. Maybe even a complete rewrite from the ground up. It's a whole different paradigm.
If you want to continue to have stateful applications where displays work like display files, etc, then I would stick with the Rich Display environment.
Can you explain why you want to use Angular JS?