The answer to both questions is yes.

The problem is when I do Edit View. Somehow, the values entered when view 
was created is not getting persisted.  I have a feeling I'm missing a call 
to save these values?  How do I do that?

Here are the relevant functions in .java file for my dashboard (extends 
hudson.plugins.view.dashboard.Dashboard 
<https://wiki.jenkins-ci.org/display/JENKINS/Dashboard+View>):

public class QualityDashboard extends Dashboard {

    /**
     * QualityDashboard constructor.
     * 
     * @param name Name for this dashboard
     */
    @DataBoundConstructor
    public QualityDashboard(String name) {
        super(name);
    }

    @Override
    protected synchronized void submit(StaplerRequest sr) 
            throws IOException, ServletException, Descriptor.FormException {
        super.submit(sr);
        JSONObject json = sr.getSubmittedForm();
        if (sr.getParameter("daysFilter") != null) {
            buildIncludeDays = 
Integer.parseInt(sr.getParameter("daysFilter"));
        }
        else {
            buildIncludeDays = DEFAULT_BUILD_INCLUDE_DAYS;
        }
        if (sr.getParameter("buildFlowFolder") != null) {
            buildFlowFolder = sr.getParameter("buildFlowFolder");
        }
        if (sr.getParameter("buildFlowNameFilter") != null) {
            buildFlowNameFilter = sr.getParameter("buildFlowNameFilter");
        }
        if (sr.getParameter("testFlowFolder") != null) {
            testFlowFolder = sr.getParameter("testFlowFolder");
        }
        if (sr.getParameter("testFlowNameFilter") != null) {
            testFlowNameFilter = sr.getParameter("testFlowNameFilter");
        }
        if (sr.getParameter("testIgnoreList") != null) {
            String ignoreStr = sr.getParameter("testIgnoreList");
            ignoreFailuresList = Arrays.asList(ignoreStr.split(","));
        }
        if (sr.getParameter("testReviewList") != null) {
            String reviewStr = sr.getParameter("testReviewList");
            reviewFailuresList = Arrays.asList(reviewStr.split(","));
        }
        // TODO: Exclude other DashboardPortlets 
        topPortlets = Descriptor.newInstancesFromHeteroList(sr, json, 
                                                            "topPortlet", 
                                                            
DashboardPortlet.all());
        // TODO: Exclude other DashboardPortlets 
        bottomPortlets = Descriptor.newInstancesFromHeteroList(sr, json, 
                                                              
 "bottomPortlet", 
                                                              
 DashboardPortlet.all());
    }

    /**
     * Required for View configuration
     */
    @Extension 
    public static final class DescriptorImpl extends ViewDescriptor {
        /**
         * Get the display name
         *
         * @return display name
         */
        @Override
        public String getDisplayName() {
            return "DSSD Build Quality Dashboard";
        }
    }


Thanks,
-jaqui

On Thursday, June 30, 2016 at 11:03:04 PM UTC-7, Ullrich Hafner wrote:
>
> If values are not restored then check:
> - do you have public getters for all your fields of the entry?
> - do the names of fields of the entry match with the names in the 
> constructor?
>
> Am 01.07.2016 um 00:50 schrieb Jacqueline Taing <[email protected] 
> <javascript:>>:
>
> I wrote a plugin that extends from Dashboard view 
> <https://wiki.jenkins-ci.org/display/JENKINS/Dashboard+View>. The 
> dashboard has default values for entries in the Create View form. Sample 
> content in configure-entries.jelly is below:
>
>     <f:section title="Dashboard Content">
>         <f:entry title="Build Age (Days)"
>                 
>  help="/plugin/quality-dashboard/help/help-configBuildAge.html">
>             <f:textbox name="daysFilter" field="daysFilter" default="7" />
>         </f:entry>
>
> The dashboard gets created properly (e.g. non-default values are used in 
> the dashboard created), but when I click Edit View link, the form does not 
> show the values that were used to create the view.  Instead, it shows the 
> default values for the fields.
>
> How do I properly implement this so that current values used are 
> propagated? Do I need to create a different .jelly file for Edit View?
>
> Thanks!
> -jacqui
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/e6363b40-e65d-4f82-847e-faf417ccbce2%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-dev/e6363b40-e65d-4f82-847e-faf417ccbce2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/0eabf6ca-8de4-4c16-babf-478d485a4ae3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to