FrankHossfeld on main
update docs (compare)
FrankHossfeld on gwt-2.8.2
fix docs (compare)
FrankHossfeld on main
fix docs (compare)
FrankHossfeld on main
udpate doc (compare)
FrankHossfeld on main
fixed typo (compare)
FrankHossfeld on main
improve documentation update README.md (compare)
FrankHossfeld on main
Update README.md (compare)
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt-maven-plugin.version}</version>
<inherited>false</inherited>
<extensions>true</extensions>
<configuration>
<failOnError>true</failOnError>
<sourceLevel>1.8</sourceLevel>
<launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
<moduleName>com.gan.ap.AP</moduleName>
<moduleShortName>ap</moduleShortName>
<jvmArgs>
<arg>
-javaagent:${settings.localRepository}/org/projectlombok/lombok/${lombok.version}/lombok-${lombok.version}.jar=ECJ
</arg>
<arg>-Xms1024m</arg>
<arg>-Xmx4096m</arg>
</jvmArgs>
<codeserverArgs>
<arg>-src</arg>
<arg>${project.parent.basedir}/shared/src/main/java</arg>
</codeserverArgs>
<properties>
<property>
<name>nalu.application.version</name>
<value>${project.version}</value>
</property>
</properties>
</configuration>
</plugin>
@/all This week we released Nalu 2.10.0. There is a new feature added, that improves the way how to add an event handler to the event bus. All you need to do is to add the '@EventHandler' to the method.
For more informations, see: https://github.com/NaluKit/nalu/wiki/08.-Eventbus#event-handling
And we just add a new complex Nalu example, that uses a lot of the features, Nalu provides. And it might give you an impression how to do things in Nalu. (see: https://github.com/NaluKit/nalu-examples/tree/main/nalu-complex-app-example)
Enjoy.
related, how long do you guys think you'll be using java 8 (as a rough estimate) - gwt can't support java 17 lang features until we drop java8 support...
I see, just wanted to answer. Should not be that problem to go forward. I would rather spent effort to update the old stuff than blocking GWT to move forward.
I see that
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface AcceptParameter {
String value();
}
has no @Inheritance annotation
public abstract class AbstractControllerWithWidgetReveal<V extends IsComponent<?, W>, W> extends AbstractComponentController<APContext, V, W> {
protected String view;
public void unfoldWidget() {
if (view != null && !view.isEmpty()) {
IsFoldable foldableWidget = (IsFoldable) super.getComposite(view).getComponent();
foldableWidget.unfold();
}
}
}
public class SettingsController extends AbstractControllerWithWidgetReveal<ISettingsComponent, HTMLElement>
implements ISettingsComponent.Controller {
@AcceptParameter(VIEW_PARAMETER)
void setView(String view) {
super.view = view;
}
@Override
public void start() {
super.unfoldWidget();
}
}
As You can see I have to repeat in each controller this:
@AcceptParameter(VIEW_PARAMETER)
void setView(String view) {
super.view = view;
}
I could put this in abstract class, but for that @AcceptParameter would have to be inheritable, which is not done by default by java
/*
* Copyright (c) 2018 - 2020 - Frank Hossfeld
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.github.nalukit.nalu.client.component.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This annotation should be used to annotate methods of classes that accept one
* String value. Nalu will use this method to inject url parameters into the class.
*
* <b>The name of the parameter must be a variable name from the route.</b>
*
* @author Frank Hossfeld
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface AcceptParameter {
String value();
}