|
|
@ -136,6 +136,13 @@ public abstract class SeasonAndMatchdayNavigationView extends Div implements Has |
|
|
|
public void setParameter(BeforeEvent beforeEvent, @WildcardParameter String param) { |
|
|
|
outer.removeAll(); |
|
|
|
|
|
|
|
// TODO: replace this with something more sensible |
|
|
|
if (param.equals("")) { |
|
|
|
navigate(UI.getCurrent(), "2020", "1"); |
|
|
|
setParameter(beforeEvent, "2020/1/"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!param.matches("^[0-9]*/[0-9]*/?$")) { |
|
|
|
invalidUrlLabel.setText("Invalid URL! Please provide params in the form season/matchday/"); |
|
|
|
outer.add(invalidUrlLabel); |
|
|
|