2 Replies Latest reply on Jan 17, 2008 1:32 AM by Chris Muir-Oracle

    TP3: Page template "required" attribute - what does required=true do?

    Chris Muir-Oracle
      Hi gang

      I'm currently fooling around with ADF Faces RC page templates in TP3, specifically passing attributes from the page to the template. The Attribute node within the page templates supports a <required> tag with values true/false. If I set this to true, create a page based on the page template, and don't supply a value for the now required attribute, I see nothing to indicate the missing attribute at compile or runtime.

      As such what does the required attribute do? I would have thought a warning on the console or a runtime error when the page is generated from the template would be appropriate? Have I misunderstood what the required flag is for?


        • 1. Re: TP3: Page template "required" attribute - what does required=true do?
          Frank Nimphius-Oracle

          the doc says

          " To add parameters, click View Parameters. An attribute element is used for each view parameter that you add.Parameters are UI component attributes that can be passed into a page template when building pages using the template. Each parameter must have a name and class type. Possible class types to use are: java.lang.String, int, boolean,

          You can assign default values to the parameters by entering the default values, and you can specify that the parameter values are mandatory by selecting the Required checkbox.

          For example, suppose your page template uses a panel component such as af:panelHeader, and you want page authors to be able to specify their own titles for the header, then you might add a title view parameter with type java.lang.String.

          So reading this it should flag a missing attribute, though I am not sure if this is intended at runtime (I would expect this at designtime to be flagged)

          • 2. Re: TP3: Page template "required" attribute - what does required=true do?
            Chris Muir-Oracle
            Thanks Frank. With apologies I should have mentioned I've read the doco too.

            Regards your last point, I guess that was my point, I can't see any design time or compile time warning of this. Is this an oversight, missing feature or bug?