Crux Framework - Doubt when creating my own component

1 answer

0

There are several components in the crux-widgets libraries and crux-smart-faces that can serve as examples to help you build your own. These components are available in github.

A good example, similar to the one shown in the tutorial, is the MenuTabsDisposal component. you can see the implementation of the component interfaces and Here you can see the files with the visual declaration of the components.

Note that they must be contained in the same package. In this case, I am sending two links because this is a maven project and the java classes are under the src / main / java structure and the screen files are under src / main / resources, but note that the files are all within the same package.

If these examples are not enough, please post the code you are trying to put together, which I can help you identify where the error is.

EDIT

On this error pointed out in the comment, it seems to me that Crux is not finding the component's view file (in this case, topMenuDisposalLarge.xdevice.xml).

Make sure that this is in the same component interface package (in this case, TopMenuDisposal).

If the project is using a structure where the sources are separate from the resources (such as a maven project, where we have src / main / java and src / main / resources), make sure the folder where the view file is .xdevice.xml) is in the launched launcher classpath.

EDIT 2

Yesterday (12/15/2015) a new version of crux was released (5.4.0). Along with this release, a crux plugin for maven (crux-maven-plugin) was created.

If you are working with maven, I suggest upgrading to the new version and trying to use the plugin. It greatly facilitates the configuration of your pom and I believe it can help you to solve problems like the one you reported (setting the classpath when running codeserver, devmode etc).

The documentation for this new version is here: link

EDIT 3

About the generation of XSDs ... Along with crux 5.4, a crux plugin for maven (crux-maven-plugin) was released. Schemas are now generated by the plugin. Take a look at the 5.4 manual that describes how to use:

link

Basically, just set up the new plugin in pom.xml and call mvn crux: generate-xsds

Abcs.

Thiago

    
07.12.2015 / 14:44