How To Solve “Problem running post install step…the Database Cluster Initialisation failed” on PostgreSQL Windows Installation

One day, when I install PostgreSQL on Windows, it always report the following error:

Problem running the post-install step. Installation may not complete correctly.

… when the installation progress bar reached the end.

Continue reading

Advertisements

How to Make Mailbox Style Multiple Checkboxes and Pre-select

Form bean:

public class MyForm {
  private String[] selectedIds;

  public String[] getSelectedIds() {
    return this.selectedIds;
  }
  public void setSelectedIds(String[] ids) {
    this.selectedIds = ids;
  }
}

Action:

public class MyAction extends ActionSupport {
  MyForm form;
  List<String> completeList;

  public String getForm() {
    return this.form;
  }

  public List<String> getCompleteList() {
    return this.completeList;
  }
}

JSP:

<s:iterator value="completeList" var="id">
<tr>
  <td><s:checkbox name="form.selectedIds" fieldValue="%{id}" id="id-%{id}" value="%{id in form.selectedIds}" /></td>
</tr>
</s:iterator>