Hi Steve,

The issue is that the arrivingTransportType property below is marked as
being hidden="EVERYWHERE".

How this works internally is that the <action>s at the top of a fieldset
end up being associated with the first <property> in that fieldset; in
other words its as if there was an @MemberOrder(named=... ) annotation on
the action.  It also adds a facet equivalent to @ActionLayout(position):


    @MemberOrder(named="arrivingTransportType")
    @Action()
    @ActionLayout(position = ActionLayout.Position.PANEL)
    public Attend changeTransportTypes( ... )


Because the arrivingTransportTypes is hidden, this ends up hiding the
action.


The solution in your case would be to reorder the properties:


                            <ns2:fieldSet name="Transport" id="transport">
                                <ns2:action id="changeTransportTypes">
                                <ns2:property id="arrivingTransportTypeName"
                                    hidden="ALL_TABLES">
                                    <ns2:named>Arriving</ns2:named>
                                </ns2:property>
                                <ns2:property
id="departingTransportTypeName"
                                    hidden="ALL_TABLES">
                                    <ns2:named>Departing</ns2:named>
                                </ns2:property>
                                <ns2:property id="arrivingTransportType"
hidden="EVERYWHERE" />
                                <ns2:property id="departingTransportType"
hidden="EVERYWHERE" />
                            </ns2:fieldSet>



Hope that helps,
Dan



On 25 August 2016 at 06:47, Stephen Cameron <[email protected]>
wrote:

> Hi,
>
> I have a problem with an xml layout, there is an action that I cannot get
> to appear in the panel of a fieldset. Its probably something that I have
> done, but I cannot see what after a lot of searching. Hopefully someone
> else's eyes may be better.
>
> The relevant section is as follows:
>
>                         <col span="6">
>                             <ns2:fieldSet name="Attended" id="attend">
>                                 <ns2:action id="wasAttended" />
>                                 <ns2:action id="wasNotAttended" />
>                                 <ns2:property id="wasAttended" />
>                             </ns2:fieldSet>
>                             <ns2:fieldSet name="Times" id="times">
>                                 <ns2:action id="updateDatesAndTimes" />
>                                 <ns2:property id="startDateTime" />
>                                 <ns2:property id="endDateTime" />
>                                 <ns2:property id="attendanceInterval" />
>                             </ns2:fieldSet>
>                             <ns2:fieldSet name="Transport" id="transport">
>                                 <!-- ns2:action id="changeTransportTypes"
> /-->
>                                 <ns2:property id="arrivingTransportType"
> hidden="EVERYWHERE" />
>                                 <ns2:property id="departingTransportType"
> hidden="EVERYWHERE" />
>                                 <ns2:property
> id="arrivingTransportTypeName"
>                                     hidden="ALL_TABLES">
>                                     <ns2:named>Arriving</ns2:named>
>                                 </ns2:property>
>                                 <ns2:property
> id="departingTransportTypeName"
>                                     hidden="ALL_TABLES">
>                                     <ns2:named>Departing</ns2:named>
>                                 </ns2:property>
>                             </ns2:fieldSet>
>                         </col>
>
> The commented out action is the problematic one, when not commented out it
> just fails to appear, when commented out I do see the action button at the
> top row (due to the unreferencedActions attribute).
>
> If I download and check the normalised layout file I see the following in
> the top row, which proves I've got the action @id correct.
>
> <bs3:row>
> <bs3:col unreferencedActions="true" span="12">
> <cpt:domainObject/>
> <cpt:action id="changeTransportTypes"/>
> </bs3:col>
> </bs3:row>
>
> In contrast the 'updateDatesAndTimes' action in the previous fieldset does
> appear.
>
> The actual method in the class is as follows.
>
>     @Action()
>     public Attend changeTransportTypes(
>             @Parameter(optionality = Optionality.MANDATORY)
> @ParameterLayout(named = "Arriving Transport Type") String arriving,
>             @Parameter(optionality = Optionality.MANDATORY)
> @ParameterLayout(named = "Departing Transport Type") String departing) {
>         setArrivingTransportTypeName(arriving);
>         setDepartingTransportTypeName(departing);
>         return this;
>     }
>
> Thanks
>

Reply via email to