diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/AddAddressSearchDialog.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/AddAddressSearchDialog.java index 539bf918..e94c9aff 100755 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/AddAddressSearchDialog.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/AddAddressSearchDialog.java @@ -740,7 +740,7 @@ public AddAddressSearchDialog(java.awt.Frame parent, boolean modal, String targe EditorsRegistry.getInstance().clearStatus(); } - if (this.partyTypes.size() > 0) { + if (!this.partyTypes.isEmpty()) { this.targetReferenceType = this.partyTypes.get(0); } diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/sidebar/NewCaseStep.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/sidebar/NewCaseStep.java index efccde33..5ece1150 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/sidebar/NewCaseStep.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/sidebar/NewCaseStep.java @@ -776,8 +776,8 @@ public NewCaseStep() { ThreadUtils.addComponent(tagPanel, tb); } - this.cmbLawyer.setSelectedItem(UserSettings.getInstance().getCurrentUser().getPrincipalId()); - this.cmbAssistant.setSelectedItem(UserSettings.getInstance().getCurrentUser().getPrincipalId()); +// this.cmbLawyer.setSelectedItem(UserSettings.getInstance().getCurrentUser().getPrincipalId()); +// this.cmbAssistant.setSelectedItem(UserSettings.getInstance().getCurrentUser().getPrincipalId()); } diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/sidebar/SelectAddressStep.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/sidebar/SelectAddressStep.java index d32fe2e2..5c70d12b 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/sidebar/SelectAddressStep.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/sidebar/SelectAddressStep.java @@ -665,6 +665,7 @@ import com.jdimension.jlawyer.client.editors.files.AddressBeanListCellRenderer; import com.jdimension.jlawyer.client.settings.ClientSettings; +import com.jdimension.jlawyer.client.settings.UserSettings; import com.jdimension.jlawyer.client.wizard.*; import com.jdimension.jlawyer.persistence.AddressBean; import com.jdimension.jlawyer.persistence.PartyTypeBean; @@ -673,8 +674,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import org.apache.log4j.Logger; /** @@ -713,6 +712,13 @@ public SelectAddressStep() { for (String s : refTypeNames) { this.cmbRefType.addItem(s); } + + UserSettings uset=UserSettings.getInstance(); + String lastPartyType = uset.getSetting(UserSettings.CONF_CASE_LASTPARTYTYPE_NEWCASEASSISTANT, ""); + if(lastPartyType!=null) { + this.cmbRefType.setSelectedItem(lastPartyType); + } + } catch (Throwable t) { log.error("Unable to get party types", t); @@ -733,6 +739,9 @@ public void nextEvent() { this.data.put("newaddress.partytype", selectedType); this.data.put("newaddress.selectedaddress", this.cmbRecipient.getSelectedItem()); + + UserSettings uset=UserSettings.getInstance(); + uset.setSetting(UserSettings.CONF_CASE_LASTPARTYTYPE_NEWCASEASSISTANT, refType); } diff --git a/j-lawyer-server-common/src/com/jdimension/jlawyer/server/services/settings/UserSettingsKeys.java b/j-lawyer-server-common/src/com/jdimension/jlawyer/server/services/settings/UserSettingsKeys.java index 9a6fa6db..24fd3a53 100644 --- a/j-lawyer-server-common/src/com/jdimension/jlawyer/server/services/settings/UserSettingsKeys.java +++ b/j-lawyer-server-common/src/com/jdimension/jlawyer/server/services/settings/UserSettingsKeys.java @@ -723,6 +723,7 @@ public class UserSettingsKeys { public static final String CONF_DOCUMENTS_LASTSORTMODE="client.documents.lastsortmode"; public static final String CONF_CASE_LASTPARTYTYPE = "user.case.lastpartytype"; + public static final String CONF_CASE_LASTPARTYTYPE_NEWCASEASSISTANT = "user.case.lastpartytype.newcase"; public static final String CONF_CASES_EXPORT_TOLOCAL="user.case.pdfexport.tolocal"; public static final String CONF_CASES_EXPORT_TOCASE="user.case.pdfexport.tocase";