0

I'm following the LightAdmin site while configuring admin page for my site. There is the following code:

<context-param>
 <param-name>light:administration:base-package</param-name>
  <param-value>[package with Administration Configurations, ex.: org.lightadmin.demo.config]</param-value>
</context-param>

I really don't know what "package with Administration Configurations" is or where it is supposed to be. Where can I find it?

kryger
  • 12,906
  • 8
  • 44
  • 65
Lenusska1414
  • 171
  • 4
  • 15

1 Answers1

1

This is the package name you choose when you define your Adminstration Configuration. From the example on the Light Admin page:

At the top of the class below you would have something like:

package com.YOUR_APPLICATION.config;

public class UserAdministration extends AdministrationConfiguration<User> {

public EntityMetadataConfigurationUnit configuration( EntityMetadataConfigurationUnitBuilder configurationBuilder ) {
 return configurationBuilder.nameField( "firstname" ).build();
 }

public ScreenContextConfigurationUnit screenContext( ScreenContextConfigurationUnitBuilder screenContextBuilder ) {
 return screenContextBuilder
 .screenName( "Users Administration" ).build();
 }

public static FieldSetConfigurationUnit listView( final FieldSetConfigurationUnitBuilder fragmentBuilder ) {
 return fragmentBuilder
 .field( "firstname" ).caption( "First Name" )
 .field( "lastname" ).caption( "Last Name" )
 .build();
 }

And then you config looks like this:

<context-param>
 <param-name>light:administration:base-package</param-name>
  <param-value>com.YOUR_APPLICATION.config</param-value>
</context-param>
Michael Kowalski
  • 457
  • 1
  • 3
  • 9