[
https://issues.apache.org/jira/browse/OFBIZ-11968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17181768#comment-17181768 ]
Dennis Balkir commented on OFBIZ-11968:
---------------------------------------
Hi Jacques and James,
I just pulled the trunk to be sure to have the current HEAD and started OFBiz adding some test-field into my local PartyForms.xml to test this issue. For me, this problem was not happening.
There is a good reason to it, which normally should not let this happen: in the method, which gets the ID for such form-fields is an automated build-in, that generates a unique ID for the field, if none is given, which seems to work fine for me:
{noformat}
<input type="submit" id="LookupParty_test" name="test" value="Test">
{noformat}
The ID will be created from the forms name and the fields name, in this case being "LookupParty" and "test":
{noformat}
public String getIdName() {
if (UtilValidate.isNotEmpty(idName)) {
return idName;
}
String parentFormName = this.getParentFormName();
if (UtilValidate.isNotEmpty(parentFormName)) {
return parentFormName + "_" + this.getFieldName();
}
return this.modelForm.getName() + "_" + this.getFieldName();
}
{noformat}
The problem with adding a default like here to the ID, would be, that by adding a default value, which would apply for all fields, would mean, that there would be fields with equal IDs.
This defies the use of an ID, since by definition an HTML-ID has to be unique on the page and can cause "trouble" if used incorrectly, which will result in random behaviours of the page and elements reacting, when they should not.
I cannot guarantee to not have missed something, since you have some issues with this, but I am not able to recreate the problem.
Can you provide some additional information on how this problem occurred for you and what you did exactly to have these issues?
TIA
> Error when rendering renderSubmitField macro
> --------------------------------------------
>
> Key: OFBIZ-11968
> URL:
https://issues.apache.org/jira/browse/OFBIZ-11968> Project: OFBiz
> Issue Type: Bug
> Components: framework/widget
> Affects Versions: Upcoming Branch
> Reporter: James Yong
> Assignee: James Yong
> Priority: Minor
> Fix For: Upcoming Branch
>
> Attachments: FindSkillsPageError.png, Image 001.png
>
>
> Error shown on page when accessing /humanres/control/FindPartySkills page
> {code:java}
> When calling macro "renderSubmitField", required parameter "id" (parameter #8) was not specified{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)