[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Macro definition not shown in editor  XML
Forum Index -> Development
Author Message
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hi everyone,

I tried your attribute macro feature and it really helps enforcing conventions in coding.

Everything works fine. But to help the developer see what attributes the macro brings, those attributes should be displayed in editor. So I copied the macro to the editor webapp:

...\EnterpriseClient\server\tomcat\webapps\editor\eclntjsfserver\config\macros

On startup, the server log tells me that the macro is read, but it is not displayed in the editor for the field (or combofield).

Can anyone tell me what goes wrong here?

Tobias
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Could you add the content of the macro to your post?

BTW: the macro is excpected within the application's web application, not the editor's one. Background: the macro is executed in the web application of the application at runtime.

Björn

Björn Müller, CaptainCasa GmbH
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hello,

here is the content of my macro definition:

<macro>
<applysto>
<tag name="t:field"/>
<tag name="t:combofield"/>
<tag name="t:password"/>
</applysto>
<parameters>
<parameter name="bean"/>
<parameter name="property"/>
</parameters>
<attributes>
<attribute name="text" value="#{${bean}${property}}"/>
<attribute name="value" value="#{${bean}${property}}"/>
<attribute name="bgpaint" value="#{${bean}props.${property}.bgpaint}"/>
<attribute name="enabled" value="#{${bean}props.${property}.enabled}"/>
<!-- attribute name="actionListener" value="#{${bean}.props.${property}.onAction}"/-->
<!-- attribute name="flush" value="true"/-->
</attributes>
</macro>

I more or less took your template and changed it according to our needs (that's why I skip the . between bean and property).

I know that the macro has to be in our web application, that works perfectly fine. The thing is that the developer does not see in the editor what the macro brings (which attributes).

I guess the editor has to know the macro as well to display this information. Or does the information come from our own web application?

Tobias
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Tobias,

please use the macro combo field in the footer line of the grid. There the valid values are available. Do not use the one in the normal attribute list.

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team