This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
JSF Form generated code template looks like: -- cut here -- <h2>Detail</h2> <h:form> <h:panelGrid columns="2"> <h:outputText value="Id:"/> <h:outputText value="#{anInstanceOfserver.Cities.id}" title="Id" /> <h:outputText value="CityName:"/> <h:outputText value="#{anInstanceOfserver.Cities.cityName}" title="CityName" /> <h:outputText value="CountryName:"/> <h:outputText value="#{anInstanceOfserver.Cities.countryName}" title="CountryName" /> </h:panelGrid> </h:form> -- cut here -- I think the generated template should also have an "id" attribute. This can be used for directing any error messages.
I will put it in the plan. Thanks!
I have looked into more details to see the JSF Form behavior and found that it does create an "id" attribute if the tag is <h:inputText>! E.g., from your example/blog, when drag-n-drop an JSF Form to the editor, check the default "Read-only", then you will get all <h:outputText> without the "id" attribute as you described. For most cases, "id" is not very useful for <h:outputText> tag. <h2>Detail</h2> <h:form> <h:panelGrid columns="2"> <h:outputText value="Id:"/> <h:outputText value="#{anInstanceOfserver.Cities.id}" title="Id" /> <h:outputText value="CityName:"/> <h:outputText value="#{anInstanceOfserver.Cities.cityName}" title="CityName" /> <h:outputText value="CountryName:"/> <h:outputText value="#{anInstanceOfserver.Cities.countryName}" title="CountryName" /> </h:panelGrid> </h:form> If you check "Editable" instead of the default "Read-only", then you will get both <h:outputText> and <h:inputText>. And the <h:inputText> tags do have "id" attribute generated. <h2>Create</h2> <h:form> <h:panelGrid columns="2"> <h:outputText value="CityName:"/> <h:inputText id="cityName" value="#{anInstanceOfserver.Cities.cityName}" title="CityName" /> <h:outputText value="CountryName:"/> <h:inputText id="countryName" value="#{anInstanceOfserver.Cities.countryName}" title="CountryName" /> </h:panelGrid> </h:form> In your blog, I suggest you use the "Editable", then you will not need the extra steps to change the outputText to inputText, remove the first ID output, and add the "id" attribute. If you agree, please close this issue as FIXED. Thanks!
The feature is complete; when checking "Editable", the <h:inputText> tags do have attribute "id" generated.