Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Steven Gentens
@sgentens
the configure-datatables.js file simply contains the snippet found on datatables.net, being:
$(document).ready( function () {
    $('#myTable').DataTable();
} );
Steven Gentens
@sgentens
this will however have an impact on performance depending on how many items you are fetching
to apply the above for each entity, you could simply apply the configuration on all EntityConfigurations by using EntitiesConfigurationBuilder#all
D004
@bappajubcse05
@sgentens Thank you. It worked.
How can I customise EntityOverviewController?
I tried with this one-

@AdminWebController
@RequestMapping("/")
public class HomeController {

@RequestMapping("/entities")
public String renderPage( @ModelAttribute PageContentStructure page) {
    System.out.println("Hey! I am here....");
    return PageContentStructure.TEMPLATE;
}

}

but it is throwing exception -
ava.lang.IllegalStateException: Ambiguous mapping. Cannot map 'homeController' method
public java.lang.String com.bt.demo.application.controller.HomeController.renderPage(com.foreach.across.modules.adminweb.ui.PageContentStructure)
to {[/adminUI/entities],custom=[[]]}: There is already 'entityOverviewController' bean method
public java.lang.String com.foreach.across.modules.entity.controllers.admin.EntityOverviewController.listAllEntityTypes() mapped.
D004
@bappajubcse05
and include the list of entities here
Arne Vandamme
@arne-vandamme
actually if you want to replace the dashboard, you can simply write a new controller on a separate path, and then redirect to that controller by setting the adminWebModule.dashboard property (see https://across-docs.foreach.be/across-site/production/admin-web-module/3.0.1/configuration-properties.html)
for example if you controller uses GetMapping(“/mydashboard”) you put /mydashboard as the property value
D004
@bappajubcse05
Hello. Whenever I create an record for any entity, after saving it, the screen is redirected to Update view. How can I redirect to list view once it is saved?
D004
@bappajubcse05
Could you please let me know whether it can be done?
Steven Gentens
@sgentens
When saving an entity, a redirectUrl is set for the current entityView which will then forward you to the update view. This is done inSaveEntityViewProcessor#doPost.
to redirect to the list view, you could add an additional viewprocessor to the class, which sets a the redirectUrl to the listview.
To redirect to the listview of the current entity type, you can fetch the EntityViewLinkBuilder on the EntityViewContext which can be found via the EntityViewRequest
D004
@bappajubcse05
Thanks @sgentens
D004
@bappajubcse05

Hello,

Each across page is including some third party resources (js and css) like below and every time those resources are getting loaded from their server (urls)

Is there any way to stop that (by storing a local copy and load the local copies)?

Steven Gentens
@sgentens
Usually, in a non-development environment these are cached by the browser, the fact that they are constantly fetched is most likely due to devtools being active

Should you want to replace those resources, you can replace the WebResourcePackages that register those resources. The ones you've mentioned are registered by various modules:

  • toaster: see AdminWebResources in AdminWebModule
  • jquery/bootstrap: see BootstrapUiConfiguration in BootstrapUiModule

WebResources and WebResourcePackages are registered to and handled by the WebResourceRegistry, which uses a WebResourcePackageManager

Steven Gentens
@sgentens
You can use either of those to override the WebResourcePackages that register those files.
Steven Gentens
@sgentens

Usually, in a non-development environment these are cached by the browser, the fact that they are constantly fetched is most likely due to devtools being active

Apologies, the above statement was incorrect, opening your browsers development tools allow you to bypass the browser cache, which would result in those files being fetched from the server. (For example, the "Disable cache" setting in the Network tab of the chrome developer tools)

Emmanuel Nyachoke
@enyachoke
Hi guys I just found across framework at am finding my way around. One question though do I need recompile my project to install a module or is there a way to load the module at runtime
slyoldfox
@slyoldfox
Heya @enyachoke, adding a module at runtime is not really possible at the moment (like OSGi does). What is it you are trying to achieve?
Emmanuel Nyachoke
@enyachoke
Yeah thats' kinda what I was hoping for.
slyoldfox
@slyoldfox
The reason this isn't really part of Across at this moment, is that is hasn't been an issue for us. The idea is more to have functional, reusable modules. Reusable for different projects and customers, than to have modules which can plugin at runtime. The runtime loading/unloading is a tricky thing technically because you need to take into account the inter-module dependencies, reinject beans where needed and so on. You need to manage the classpath and classloaders, ... and so on :-)
slyoldfox
@slyoldfox
@enyachoke hope we can still assist you with other matters concerning Across!
Emmanuel Nyachoke
@enyachoke
Thanks @slyoldfox this is still impressive.
Valentín
@valentinlineiro
Hey guys, first I wanted to congratulate you for the hard work and excellent idea. I'm evaluating Across to implement a modular monolithic architecture, and I wonder if you plan to support Spring Boot 2 / Spring Framework 5 any soon
slyoldfox
@slyoldfox
@valentinlineiro Sorry for the late reply, we have been side-tracked on other projects for a while. It is on our roadmap, and will probably become Across Platform 4.0.0 (based on Spring Boot 2.1 and Spring Framework 5.1, maybe a Spring Boot 2.2 depending how fast things evolve).
Vusumuzi Khoza
@vusakhoza_gitlab
Hi howsit guys. Trying to use Across with Reactor Bus v2. However getting some issues. Noticed the Reactor dependency wasn't available from the Foreach nexus repo. Could this have something to do with it?
To be specific on the issues. The reactor Consumer classes aren't being picked up by component scan even though they are properly annotated as @Service. This is only happening with reactor consumer classes
slyoldfox
@slyoldfox
Which version of platform-bom are you using? Also which dependency of project reactor bus is that? You are talking about your own @Service class right?
@vusakhoza_gitlab Have you had a look at https://docs.across.dev/across-site/production/across/developing-applications/creating-an-application/project-structure.html for the basic project structure? Your @Service class should be located under the application package
Vusumuzi Khoza
@vusakhoza_gitlab
Using v2.1.5. and yes i seem to have the project structure correct. This is a custom @Service class that implements Consumer<Event<T>> which is an interface from the reactor bus dependency. Using Reactor bus v2.0.2
I know you guys have https://docs.across.dev/across-site/production/across-autoconfigure/adding-auto-configuration-support.html but wanted to find out here first if there's a known issue with reactor bus since it doesn't indicate any issues in the 'Across AutoConfiguration Report'
slyoldfox
@slyoldfox
Well we don't have support by default for Reactor bus (we haven't used it yet), so you will indeed have to setup auto-configuration yourself for it. You can find some examples of test-projects and the autoconfiguration itself on https://bitbucket.org/beforeach/across-autoconfigure/src/develop/
Vusumuzi Khoza
@vusakhoza_gitlab
Thats alright. Have you used any event bus with Across. I'm flexible enough to change cause i really need your Admin Module
Arne Vandamme
@arne-vandamme
What type of eventing are you looking for? Across only uses the Spring event system directly (https://docs.across.dev/across-site/production/across/developing-modules/events.html), in the past we have manually used MBassador as well
Vusumuzi Khoza
@vusakhoza_gitlab
Yeah Spring event system is ok but does things synchronously. Was looking for something that'd give me the ability to trigger asynchronous events utilizing threads. Ended up settling for Guava EventBus and its working so far with my default application module and no further tinkering
slyoldfox
@slyoldfox
For spring you would just need a SimpleAsyncTaskExecutor though? Have a look at point 3 on https://www.baeldung.com/spring-events
Vusumuzi Khoza
@vusakhoza_gitlab
Will check it out thanks
Matthew
@mattaed_twitter
It seems you cannot bootstrap Across with SpringBootServletInitializer when deploying to an external application server (Tomcat)
slyoldfox
@slyoldfox
@mattaed_twitter I'm not sure which version of Across Platform Bom you use and I'm not sure how I can help if you don't tell me what error or exception you are facing. However it used to be possible. There is an example at https://bitbucket.org/beforeach/across-platform/src/d670d1f153ebd95ce75cf83fe5f1d66107d88962/platform-bom-test/src/main/java/com/foreach/across/modules/platform/PlatformTestApplication.java?at=master#PlatformTestApplication.java-24,40. However due to containerization we are moving away from .war deployments (explicitly in the upcoming AXP 5.0.0) and will only support fat jar, fat war deployments out of the box.
Matthew
@mattaed_twitter
@slyoldfox I'm using Across Platform Bom 3.0.0.M1. Actually, there are no errors, but only a normal Spring Boot startup. No Across contexts was bootstrapped
Oyisco
@oyisco
How can i get across code sample that bootstrap a jar file or install a jar file that boot strap and make the application part of base module.
Steven Gentens
@sgentens
@oyisco I'm not really sure what you are trying to do. The sample application bootstraps an across application with the modules you have selected. Adding external dependencies can easily be done via maven or your IDE of choice. You can find more about the base setup of an application here: https://docs.across.dev/across-site/production/across/developing-applications/creating-an-application/index.html
We also have a guide on building a modular monolith: https://docs.across.dev/across-site/production/guides/modular-monoliths/index.html. It touches on working with application as well as creating modules within the same project. A shared module could also be defined and build in a separate maven project and then added to other projects as dependencies (if installed locally or deployed to a registry).