-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert selection step of resource wizard to panel
- Loading branch information
Showing
16 changed files
with
333 additions
and
146 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
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
15 changes: 15 additions & 0 deletions
15
...in-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/message/FeedbackLabels.html
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2014 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<body> | ||
<wicket:panel> | ||
<wicket:container wicket:id="list"> | ||
<span class="invalid-feedback d-block" wicket:id="message"/> | ||
</wicket:container> | ||
</wicket:panel> | ||
</body> | ||
</html> |
59 changes: 59 additions & 0 deletions
59
...in-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/message/FeedbackLabels.java
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (c) 2010-2014 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
package com.evolveum.midpoint.gui.impl.component.message; | ||
|
||
import com.evolveum.midpoint.web.component.message.FeedbackAlerts; | ||
import com.evolveum.midpoint.web.component.message.FeedbackListView; | ||
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; | ||
import org.apache.wicket.feedback.FeedbackMessage; | ||
import org.apache.wicket.feedback.FeedbackMessagesModel; | ||
import org.apache.wicket.feedback.IFeedback; | ||
import org.apache.wicket.feedback.IFeedbackMessageFilter; | ||
import org.apache.wicket.markup.html.basic.Label; | ||
import org.apache.wicket.markup.html.list.ListItem; | ||
import org.apache.wicket.markup.html.list.ListView; | ||
import org.apache.wicket.markup.html.panel.Panel; | ||
import org.apache.wicket.model.PropertyModel; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author lazyman | ||
*/ | ||
public class FeedbackLabels extends FeedbackAlerts { | ||
|
||
private static final String ID_LIST = "list"; | ||
private static final String ID_MESSAGE = "message"; | ||
|
||
public FeedbackLabels(String id) { | ||
super(id); | ||
} | ||
|
||
protected void initLayout() { | ||
ListView<FeedbackMessage> list = new ListView<>(ID_LIST, new FeedbackMessagesModel(this)) { | ||
@Override | ||
protected void populateItem(ListItem<FeedbackMessage> item) { | ||
item.add( | ||
new Label(ID_MESSAGE, new PropertyModel<>(item.getModel(), "message"))); | ||
} | ||
}; | ||
list.add(new VisibleEnableBehaviour() { | ||
|
||
@Override | ||
public boolean isVisible() { | ||
return hasMessages(); | ||
} | ||
}); | ||
add(list); | ||
} | ||
|
||
protected ListView<FeedbackMessage> getFeedbackListView() { | ||
return (ListView<FeedbackMessage>) get(ID_LIST); | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.