IDE-1824 Errors on Portlet Managed in Custom Portlet Modes of portlet.xml

We don't need to make sure the true is written.  The way the DTD reads if
the value is empty or not specified then the default is true.  So there is
no need for it to be added to the XML file.  Only if the user sets it to
"false" does it need to be written to XML

On Wed, Nov 19, 2014 at 2:02 PM, simon.jiang <notifications@github.com>
wrote:

> In
> tools/plugins/com.liferay.ide.portlet.core/src/com/liferay/ide/portlet/core/model/CustomPortletMode.java:
>
> > @@ -57,13 +55,15 @@
> >       */
> >
> >      @Type( base = Boolean.class )
> > -    @Label( standard = "Portlet managed" )
> > -    @CustomXmlValueBinding( impl = InvertingBooleanXmlValueBinding.class, params = "portal-managed" )
> > -    ValueProperty PROP_PORTLET_MANAGED = new ValueProperty( TYPE, "PortletManaged" ); //$NON-NLS-1$
> > +    @Label( standard = "Portal managed" )
> > +    @InitialValue( text = "true" )
>
> If we set defaultVlaue with true,the true value didn't write to file while
> user switch source page. So I tried to use InitialValue and it can make
> sure that true value will be wrote to portlet.xml
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/gamerson/liferay-ide/pull/805/files#r20559038>.
>



-- 
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com