-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AMP-30300 allow to disable aggrement code
- Loading branch information
1 parent
7c2ad6b
commit 30efa8a
Showing
2 changed files
with
8 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,33 +5,31 @@ | |
import org.dgfoundation.amp.onepager.yui.AmpAutocompleteFieldPanel; | ||
|
||
/** | ||
* | ||
* @author [email protected] | ||
* @since Nov 14, 2012 | ||
* | ||
*/ | ||
|
||
public class AutocompleteAcronymTitleModel extends Model<String>{ | ||
public class AutocompleteAcronymTitleModel extends Model<String> { | ||
private static final long serialVersionUID = 1L; | ||
private IModel<String> acronymModel; | ||
private IModel<String> titleModel; | ||
private String nullText; | ||
|
||
public AutocompleteAcronymTitleModel(IModel<String> acronymModel, IModel<String> titleModel, String nullText) { | ||
this.acronymModel = acronymModel; | ||
this.titleModel = titleModel; | ||
this.nullText = nullText; | ||
} | ||
|
||
public String getObject() { | ||
String ret = ""; | ||
if ((acronymModel == null || acronymModel.getObject() == null) && titleModel.getObject() == null) { | ||
return nullText; | ||
} | ||
if (acronymModel != null){ | ||
|
||
if (acronymModel != null && acronymModel.getObject() != null) { | ||
ret = ret + AmpAutocompleteFieldPanel.ACRONYM_DELIMITER_START + | ||
acronymModel.getObject() + | ||
acronymModel.getObject() + | ||
AmpAutocompleteFieldPanel.ACRONYM_DELIMITER_STOP; | ||
} | ||
ret = ret + titleModel.getObject(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters