Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Where do I get complete property listings for a given element?
newbie321
<p>Hi, guys:</p>
<p> </p>
<p>Very silly question:</p>
<p> </p>
<p>Where do I get complete property listings for a given element?</p>
<p> </p>
<p>For example, for the scripted data source we can use</p>
<pre class="_prettyXprint">
.getPropertyHandle(ScriptDataSetHandle.RESULT_SET_PROP); </pre>
<p>or on a table handle we can do </p>
<pre class="_prettyXprint">
.setProperty(IReportItemModel.DATA_SET_PROP, "theName");</pre>
<p>Where do I get a complete listing of what can go inside the parenthesis as an argument for the property-related methods? I am pretty sure there has to be some listing in Birt's API for all of this. I just can not seem to find it. </p>
<p> </p>
<p>Any pointers? </p>
<p> </p>
<p>Thanks,</p>
<p> </p>
Find more posts tagged with
Comments
Matthew L.
<p>While I'm not sure where a list of all the properties are located, typically when I want to figure out what some properties are for an element, I use the GUI to bring in the element, populate it with several settings in the GUI, then look at the report's XML to determine the property name.</p>
<p>For example, below is a label that I applied some settings to in the GUI, now using the XML Source view, I can see the property names for each property I want to set using the API:</p>
<pre class="_prettyXprint _lang-xml">
<label name="TheName" id="10">
<property name="comments">Comments</property>
<property name="borderBottomColor">#000000</property>
<property name="borderBottomStyle">solid</property>
<property name="borderLeftColor">#000000</property>
<property name="borderLeftStyle">solid</property>
<property name="borderRightColor">#000000</property>
<property name="borderRightStyle">solid</property>
<property name="borderTopColor">#000000</property>
<property name="borderTopStyle">solid</property>
<property name="marginTop">1pt</property>
<property name="marginLeft">1pt</property>
<property name="marginBottom">1pt</property>
<property name="marginRight">1pt</property>
<property name="paddingTop">2pt</property>
<property name="paddingLeft">2pt</property>
<property name="paddingBottom">2pt</property>
<property name="paddingRight">2pt</property>
<expression name="bookmark" type="javascript">"Bookmark"</expression>
<structure name="toc"/>
</label>
</pre>
newbie321
<p>Thanks, Matthew! </p>
<p>This is indeed a great pointer!! it will help me to get the names of the element properties. </p>
<p> </p>
<p>I guess my question is:</p>
<p> </p>
<p>Given TableHandle element and its method: </p>
<p><span style="color:rgb(102,102,0);font-family:Arial, sans-serif;">.</span><span style="font-family:Arial, sans-serif;">setProperty</span><span style="color:rgb(102,102,0);font-family:Arial, sans-serif;">(</span><span style="color:rgb(102,0,102);font-family:Arial, sans-serif;">IReportItemModel</span><span style="color:rgb(102,102,0);font-family:Arial, sans-serif;">.</span><span style="font-family:Arial, sans-serif;">DATA_SET_PROP</span><span style="color:rgb(102,102,0);font-family:Arial, sans-serif;">,</span><span style="font-family:Arial, sans-serif;"> </span><span style="color:rgb(0,136,0);font-family:Arial, sans-serif;">"theName"</span><span style="color:rgb(102,102,0);font-family:Arial, sans-serif;">);</span></p>
<p> </p>
<p>How do I know that <span style="color:rgb(102,0,102);font-family:Arial, sans-serif;">IReportItemModel</span><span style="color:rgb(102,102,0);font-family:Arial, sans-serif;">.</span><span style="font-family:Arial, sans-serif;">DATA_SET_PROP constant corresponds to a legit real property associated with the TableHandle element? </span></p>
<p> </p>
<p>This is from </p>
<p><strong>Class DesignElementHandle </strong></p>
<p><strong>void <a data-ipb='nomediaparse' href='
http://help.eclipse.org/mars/topic/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/DesignElementHandle.html#setProperty(java.lang.String, java.lang.Object)'>setProperty</a></strong>(java.lang.String propName
, java.lang.Object value)</p>
<div style="margin:3px 0px 0px;">Sets the value of a <strong>property </strong>from a generic object.</div>
<div style="margin:3px 0px 0px;"> </div>
<p><span style="font-family:Arial, sans-serif;">The signature of the .setProperty() method is .setProperty(String, Object). Does this mean I can set in theory the Property of an element to anything, for example TableHandle.setProperty("myBurgerMeat", "beef")? so anything goes? OR there is a certain set of properties that can only be used within a context of any given object? Where is that set listing? What is the mapping between the constants (</span><span style="color:rgb(102,0,102);font-family:Arial, sans-serif;">IReportItemModel</span><span style="color:rgb(102,102,0);font-family:Arial, sans-serif;">.</span><span style="font-family:Arial, sans-serif;">DATA_SET_PROP</span><span style="font-family:Arial, sans-serif;">) and the actual string representation of that constant? </span></p>
<div> </div>
<div>Thanks!! </div>