Jira-integration: A bind method which return a hyperlink to jira is added
This commit is contained in:
parent
a0af0241d2
commit
c4d226ee56
1 changed files with 11 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ import org.zkoss.zk.ui.event.Events;
|
|||
import org.zkoss.zk.ui.event.InputEvent;
|
||||
import org.zkoss.zkplus.databind.AnnotateDataBinder;
|
||||
import org.zkoss.zkplus.databind.DataBinder;
|
||||
import org.zkoss.zul.A;
|
||||
import org.zkoss.zul.Bandbox;
|
||||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Checkbox;
|
||||
|
|
@ -295,6 +296,16 @@ public class Util {
|
|||
return textBox;
|
||||
}
|
||||
|
||||
public static A bind(A hyperlink, Getter<String> url, Getter<String> code) {
|
||||
// code = JIRA-ORDERXXXXX-<CODE>
|
||||
hyperlink.setHref(url.get() + "/browse/"
|
||||
+ code.get().substring(16)); //JIRA-ORDERXXXXX-(16 chars)
|
||||
hyperlink.setTarget(code.get());
|
||||
hyperlink.setLabel(code.get());
|
||||
|
||||
return hyperlink;
|
||||
}
|
||||
|
||||
/**
|
||||
* Binds a {@link Textbox} with a {@link Getter}. The {@link Getter} will be
|
||||
* used to get the value that is going to be showed in the {@link Textbox}.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue