View Peoplecode Styles
SQL
Run this SQL against your database and copy the output.
SELECT '<div class="' || STYLECLASSNAME || '">' || STYLECLASSNAME || '</div>' FROM PSSTYLECLASS WHERE STYLESHEETNAME = 'PTSTYLEDEF'
Page
Temporary add an HTML area to any page and paste your SQL output into the value constant of your HTML area. View your page and you'll see a demo of every style for that Style sheet name in the query you ran.Extra
If you want to create a more permanent page in your development environment that dynamically loads the HTML area with any style sheet you choose from the system you can do the following:Record
Create a new derived record (MY_RECORD) and add the fields
- STYLESHEETNAME (prompt table edit : EOPP_STSHEET_VW)
- HTMLAREA
Page
Create a new page and add your both your derived record fields to it.Component
Create a component add your new page to it and add the following Peoplecode to the STYLESHEETNAME FieldChange event.
Local string &qry, &qoutput, &html; Local SQL &sql; Local array &AAny = CreateArrayAny(); &qry = "SELECT '<div class=' || STYLECLASSNAME || '>' || STYLECLASSNAME || '</div>'"; &qry = &qry | " FROM PSSTYLECLASS WHERE STYLESHEETNAME = :1 order by STYLECLASSNAME "; &html = ""; &sql = CreateSQL(&qry, MY_RECORD.STYLESHEETNAME); While &sql.Fetch(&AAny) &html = &html | &AAny [1]; End-While; MY_RECORD.HTMLAREA.Value = &html;
Register your component to the menu and load your new page.
No comments:
Post a Comment