Question john.smith4237 · Jul 16, 2024

Add Zen component

Hi Guy,

I'm currently using a classmethod to load my page's display content in a form of html want look good, I'm wondering if I can add a Zen component in my classmethod eg. <dataCombo> or Label...etc

I've tried the bit of code (circled in red) but didn't work 

Thanks

Product version: Ensemble 2018.1

Comments

David Hockenbroch · Jul 17, 2024

You haven't added your hgroup to your page anywhere. You'll need to figure out what its parent element should be and use the %AddChild method of that Zen component to add the hgroup somewhere, just like you added your maxData to the hgroup.

0
john.smith4237  Jul 17, 2024 to David Hockenbroch

Yes David I see your point, will update and see how it goes, but it doesn't have to be programmatically all I'm looking for if I can add a component in my classmethod as I'm doing with html?

  
Thanks

0
Stephen Canzano · Jul 17, 2024

Is this a CSP class or a class that extends from %ZEN.Component.page, it looks like you might be have a CSP page that wants to use ZEN components and do not think that is possible.. but I could be incorrect.  Regardless, is the &html ON LINE 72 closed with the > symbol on line 92?

0
john.smith4237  Jul 17, 2024 to Stephen Canzano

Its a class that doesn't extend  %ZEN.Component.page, but it is a .cls and my understanding is that a CSP pages are pages saved as .csp and my class (.cls) as shown below is considered as a Zen page?

here is my class definition 

  and in content section 

and the problem that I've tried adding a component eg. a textbox or label in the XData Content section (where the time is) but its not showing up in the page, only my html called in my classmethod !? 

0