Spinner component in Wicket? - wicket

Where can I find a spinner component for Wicket?, including Maven repo and a source code example?

wicketstuff-minis has an implementation of a spinner. There is also a wicketstuff-minis-examples project
The maven repos are:
<dependency>
<groupId>org.wicketstuff</groupId>
<artifactId>minis</artifactId>
<version>1.4.17.2</version>
</dependency>
and
<dependency>
<groupId>org.wicketstuff-examples</groupId>
<artifactId>minis</artifactId>
<version>1.4.17.2</version>
</dependency>

Let your component implement IAjaxIndicatorAware and provide it with the markup ID for your spinner, or use IndicatingAjaxLink, IndicatingAjaxFallbackLink and IndicatingAjaxButton.

Related

is there any way using gwt canvas in domino-ui other than HTMLCanvasElement

I have a big project using other UI which has a big portion of it using the GWT canvas and if I am thinking to use the domino-ui I prefer to keep the GWT canvas code.
Yes you can.
Either you use elemental2 canvas, Or you use GWT canvas and wrap it as an element.
you need to include this dependency
<dependency>
<groupId>org.jboss.gwt.elemento</groupId>
<artifactId>elemento-widget</artifactId>
<version>${use elemento version here}</version>
</dependency>
Then you can wrap a canvas as element using this
Widgets.asElement(myGwtCanvas)
And don't forget about the inheritance of this GWT module

Why can't I access my application delegate from a ViewController?

In my app, I would like to access delegate methods from a View Controller, but when I try to access it this way :
let appDelegate = NSApplication.sharedApplication().delegate
I am getting nil, what could cause this ?
EDIT WITH ADDITIONAL INFO :
When I created the app, I did an error as I didn't choose to use storyboards, but when I needed them, I just added a storyboard file and defined it as the main interface, like this :
I believe my issue could come from here, could it be possible for the interface to be shown but not linked properly to the NSApplication (and so to the delegate) ?
If yes, how could I solve it ?
Thank you.
In your storyboard, make sure that App Delegate's custom class (in the Identity Inspector) is set to your delegate class.
Update
If you have just created a new storyboard, it will be empty. AFAIK there are no "standard" ways of creating the application scene. You have to copy it from another storyboard (they are just XMLs after all).
The simplest way would be creating a new project with Use Storyboard enabled, then right-click on your auto generated Main.storyboard, choose Open As ➔ Source Code. After that, copy the <!--Application--> part to your empty Storyboard.storyboard. Don't for get to grab the header and footer part of it, too. Below is just an example.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
</dependencies>
<scenes>
<!--Application-->
<!-- your copied content -->
</scenes>
</document>
Finally, right-click on your Storyboard.storyboard and choose Open As ➔ Interface Builder - Storyboard to resume the normal design view.

Twitter Bootstrap for GWT is not working

I am trying to use Twitter Bootstrap for GWT and get the same nice and pretty view like the showcase here and here is what I did:
1- downloaded the module from git
2- run package task in the pom.xml
3- included the created jar in my projects classpath.
4- inherited the module in my project.gwt.xml file with
<inherits name="com.github.nyao.bootstrap4gwt.Bootstrap"/>
5- included the module in my root xml
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:m='urn:import:com.clouway.exreport.client.accountcreation.view'
xmlns:t='urn:import:com.github.nyao.bootstrap4gwt.client.ui'
>
<ui:style src="newRegistrationStyle.css"/>
<g:HTMLPanel addStyleDependentNames="{style.mainPanel}">
<div class="{style.headdistance}"/>
<div class="{style.container}">
<g:DecoratorPanel addStyleDependentNames="{style.decoratorPanel}">
<g:VerticalPanel addStyleDependentNames="{style.verticalPanel}}">
<m:AccountEditor ui:field="accountEditor"/>
<!--<g:Button ui:field="create" text="create"/>-->
<t:Button type="Success" text="sing in"/>
<g:Label ui:field="errorsLabel"/>
...
</ui:UiBinder>
But nothing happened. I got normal text box and normal button.
I took a look at this tutorial which is very good and the guy got the things right, his application has very nice look. I took a look at his code but didn't find any reason why my look i still normal and he got the nice view. thanks for help in advance
Instead of using bootstrap4gwt try using gwtbootstrap which is far better and has much more components compared to the former. The forum is also very active in gwtbootstrap.

How to add question mark popup to Liferay control panel portlet?

I want to add question mark icon and help popup to my custom control panel portlet. How is it possible? Thanks
Are you using normal JSPs? In that case you can just use the <liferay-ui:icon-help/> tag:
<liferay-ui:icon-help message="Help me!"/>
Note: You also need add the following to your JSP before using <liferay-ui:icon-help/>
<%# taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%>
<liferay-theme:defineObjects />
Try adding the help mode for the portlet. In order to add the help mode. In your portlet.xml you should have the following
<init-param>
<name>view-jsp</name>
<value>/view.jsp</value>
</init-param>
<init-param>
<name>help-jsp</name>
<value>/help.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
I am assuming you are having MVCPortlet and you will place the help.jsp inside docroot folder

IResource.refreshLocal(IResource.DEPTH_INFINITE, null); is not refreshing

After doing manipulation in my tree viewer, when I'm calling this api IResource.refreshLocal(IResource.DEPTH_INFINITE, null); it is not refreshing the UI. Is there any alternative way by which I can refresh my tree?
If you are doing a custom tree viewer that depends on the resource changes, then refreshing the resources will not result in changes in the viewer: the content provider will not be re-executed on resource changes. If you want to refresh a custom viewer, you have to register a resourcechangelistener that will call the refresh or update methods of the viewer.
However, if you are using Common Navigator Framework (CNF) with the built-in resource support, it should refresh itself.
Update: The CNF should be configured as follows (that is extracted from my working solution):
<extension
point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding
viewerId="org.eclipse.viatra2.navigator">
<includes>
<contentExtension
pattern="org.eclipse.ui.navigator.resourceContent" />
<contentExtension
pattern="org.eclipse.ui.navigator.resources.filters.*"/>
</includes>
...
</extension>
For custom models added into Navigator use:
if (viewPart instanceof CommonNavigator) {
CommonViewer viewer = ((CommonNavigator) viewPart).getCommonViewer();
viewer.refresh();
}