Re: Integrate Wicket with Keycloak

2019-04-15 Thread David Beer
Hi Jeroen

This sounds good, I once tried to setup a link between Wicket and Keycloak,
would be good if you had a blog post, or posted this on the wicket site,
along with code examples on github. Just a thought.

Thanks

David

On Thu, 11 Apr 2019 at 09:23, Jeroen Steenbeeke 
wrote:

> I've recently created an application that has a Wicket frontend (and Spring
> backend) authenticated by Keycloak. It's a relatively simple integration
> really, all pages require a valid Keycloak session, so it uses the default
> Keycloak servlet filter adapter:
>
>
> https://search.maven.org/artifact/org.keycloak/keycloak-servlet-filter-adapter/5.0.0/jar
>
> In my setup I've mapped the Keycloak filter to all URLs (before the Wicket
> filter). Using this filter is simply a matter of adding it to your web.xml
> and making sure you have a keycloak.json file in your WEB-INF folder.
>
> In Wicket, you can then get the Keycloak context from the RequestCycle:
>
> ServletWebRequest request = (ServletWebRequest)
> RequestCycle.get().getRequest();
> HttpServletRequest containerRequest = request.getContainerRequest();
> KeycloakSecurityContext securityContext = (KeycloakSecurityContext)
> containerRequest.getAttribute(KeycloakSecurityContext.class.getName());
>
> Hope this helps.
>
> Sincerely,
>
> Jeroen
>
>
> Op wo 10 apr. 2019 om 16:43 schreef Calin Pavel :
>
> > Hi everybody,
> >
> > Did anybody integrated Wicket with Keycloak?
> > Do you have any sample how this could be done - to restrict access to
> > pages, to authenticate user 
> >
> >
> > Thank you,
> > Calin Pavel
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> --
> Jeroen Steenbeeke
>


Re: Wanted: example for Spring Security with wicket-auth-roles

2018-04-27 Thread David Beer
Hi Tom

Please have a look at this project I did
https://github.com/dmbeer/wicket-7-spring-security

>From what I remember the process is pretty much as Martin says. If you look
through the archives I am sure you will find my explanation.

Thanks

David

On 19 April 2018 at 06:39, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi Tom,
>
> I do not remember everything by heart but basically it is:
> 1. Provide impl of Spring Security's UserDetailsService and make it a @Bean
> 2. In your AuthenticatedWebSession#authenticate() impl use Spring
> Security's Authentication to do the work. It was something like
> SecurityContextHolder.getContext().getAuthentication().autheticate(new
> UsernamePasswordAuthentication(username, password))
>
> In Spring Security's config (HttpSecurity) you need to tell SS what is the
> url to your login and logout pages, and that you want to enable
> "rememberMe" functionality.
> You can use both SS and/or Wicket to authenticate access to pages and
> resources by their mount paths.
>
> On Wed, Apr 18, 2018 at 5:58 PM, Tom Götz <t...@decoded.de> wrote:
>
> > Hi!
> >
> > Does anyone have a working example for an integration of Spring Security
> > and wicket-auth-roles? We currently use Wicket 7.9.0 and Spring Boot 2.x
> …
> >
> > We’d like to authenticate users via a login form (SignInPanel) and also
> > use a „remember me“ cookie based authentication.
> >
> > Anyone?
> >
> >
> > Cheers,
> >Tom
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Setting Wicket Configuration Mode to Deployment

2017-11-17 Thread David Beer
Hi All

I am applying the final touches to my application before going to
staging/production. I use the Webservlet 3 process via java code and
annotations for setting the Wicket Filter all works well. I am trying to
add the init param for the configuration mode.

I was hoping I could use maven filtering to filter the value in the java
file but this seems awkward and not really possible.

So I tried setting it by reading a properties file in the WicketApplication
class and setting the value in the init() method, however I got an
exception saying the value can only be set once.

It seems the WicketFilter class sets this by default to development and
unless overridden in the annotations doesn't seem like it can be set.

Is this correct behaviour, what is the best way to set the value at build
time? I am using wicket 7.9.0.

Thanks

David


Re: FomGroup and BootstrapSelect not setting has-error CSS

2017-09-03 Thread David Beer
HI All

Turns out this was because it wasn't being added to the ajax target on the
submit for the form. All worked once updated the target.

Thanks

On 31 August 2017 at 15:06, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi David,
>
> On Thu, Aug 31, 2017 at 3:40 PM, David Beer <david.m.b...@gmail.com>
> wrote:
>
> > Hi All
> >
> > Before reporting this as a bug I wanted to check all is correct. I have a
> > WicketBootstrap project using BootstrapForm with a form group which
> > contains a dropdown select (BootstrapSelect) component.
> >
> > When the submit button for the form fires I have a validate method which
> > checks all is valid. each form group should have the CssNameAppender add
> > has-erro like so add(new CssClassNameAppender("has-error"))this works
> fine
> > for the other formgroup which contains a text field but not the one
> > containing the BootstrapSelect component.
> >
> > Code snipet below:
> >
> > final BootstrapSelect groupBootstrapSelect = new
> > BootstrapSelect<>("iam-groups", new PropertyModel<>(createIamUserModel,
> > "groupName"), iamClient.getGroupNames());
> >
> > userGroupsFormGroup.setOutputMarkupId(true);
> >
> >
> > userGroupsFormGroup.add(new CssClassNameAppender("has-error"));
> >
> > If I manually add the CSS in chrome it applies correctly.
> >
> > Any thoughts and suggestions.
> >
>
> Please send a Pull Request!
>
>
> >
> > Thanks
> >
> > David
> >
>


FomGroup and BootstrapSelect not setting has-error CSS

2017-08-31 Thread David Beer
Hi All

Before reporting this as a bug I wanted to check all is correct. I have a
WicketBootstrap project using BootstrapForm with a form group which
contains a dropdown select (BootstrapSelect) component.

When the submit button for the form fires I have a validate method which
checks all is valid. each form group should have the CssNameAppender add
has-erro like so add(new CssClassNameAppender("has-error"))this works fine
for the other formgroup which contains a text field but not the one
containing the BootstrapSelect component.

Code snipet below:

final BootstrapSelect groupBootstrapSelect = new
BootstrapSelect<>("iam-groups", new PropertyModel<>(createIamUserModel,
"groupName"), iamClient.getGroupNames());

userGroupsFormGroup.setOutputMarkupId(true);


userGroupsFormGroup.add(new CssClassNameAppender("has-error"));

If I manually add the CSS in chrome it applies correctly.

Any thoughts and suggestions.

Thanks

David


StringResouceModel Can't find key with BootstrapCheckbox

2017-05-25 Thread David Beer
Hi

I am using the BootstrapCheckbox and when I try to add the Label using
StringReosrceModel if fails to find the key in the properties file for the
page it is on.

However when I use Model.of() it works.

BootstrapCheckbox addMoreUsersCheckbox = new
BootstrapCheckbox("checkbox-add-more-users", addUsers, Model.of("Addd
another user"));

BootstrapCheckbox addMoreUsersCheckbox = new
BootstrapCheckbox("checkbox-add-more-users", addUsers, new
StringResourceModel("checkbox"));

How do I reference the value checkbox in the page properties file properly?

Thanks

David


Re: Test Page renders with Nested Panel

2017-02-14 Thread David Beer
Hi

Thanks for the link I will look into this further separately. See if I can
do something Similar for Java EE and @EJB etc.

On 14 February 2017 at 09:12, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi,
>
> I thought you want to use Spring (because the branch name mentions it).
> You can do the same with Java EE.
> If you use CDI then take a look at
> https://github.com/apache/wicket/tree/master/wicket-cdi-
> 1.1/src/test/java/org/apache/wicket/cdi
> I have no idea how to test @EJB and @Stateless. I haven't used those since
> very long time.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Feb 13, 2017 at 11:39 PM, David Beer <david.m.b...@gmail.com>
> wrote:
>
> > Hi Martin
> >
> > Thanks for the PR. So the solution is to remove JavaEE EJB references
> > rather than to use them and test them. Understand Spring doesn't care
> about
> > EJB but and vice versa. I am only using spring for the security layer and
> > JavaEE for everything else.
> >
> > So does @SpringBean just convert the EJB to a spring bean.
> >
> > So the only other way to test the EJB approach is to pass a mock value to
> > the constructor and have it check if the value is null as the container
> > will Inject the value.
> >
> > David
> >
> >
> > On 13 February 2017 at 21:20, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > https://github.com/dmbeer/wicket-7-spring-security/pull/1
> > > There you go!
> > >
> > > I've removed/commented out the Java EE stuff.
> > > Spring doesn't care about @EJB/@Stateless. As JavaEE doesn't care about
> > > @Component & Co.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Mon, Feb 13, 2017 at 10:05 PM, David Beer <david.m.b...@gmail.com>
> > > wrote:
> > >
> > > > Hi Martin
> > > >
> > > > It appears there was an error when I tried to push the code. I am
> > trying
> > > to
> > > > test AdminPage, and failing to inject the mock from the application
> > > > context.
> > > >
> > > > AdminPage
> > > > https://github.com/dmbeer/wicket-7-spring-security/blob/
> > > > wicket-7-test-spring-security/src/main/java/com/copperarrow/
> > > > pages/AdminPage.java
> > > > AdmingPageTest
> > > > https://github.com/dmbeer/wicket-7-spring-security/blob/
> > > > wicket-7-test-spring-security/src/test/java/com/copperarrow/
> > > > pages/AdminPageTest.java
> > > > UserAccountDataProvider
> > > > https://github.com/dmbeer/wicket-7-spring-security/blob/
> > > > wicket-7-test-spring-security/src/main/java/com/copperarrow/
> > > > model/dataproviders/UserAccountDataProvider.java
> > > >
> > > > This fails unable to attach container because UserDAO is always null
> > even
> > > > though I have added it to the applicationmock context.
> > > >
> > > >
> > > >
> > > > On 13 February 2017 at 19:57, Martin Grigorov <mgrigo...@apache.org>
> > > > wrote:
> > > >
> > > > > Hi David,
> > > > >
> > > > > Please give more information what is not working.
> > > > > There are 3 tests and all pass.
> > > > > I have no idea where to look for a problem.
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > > https://twitter.com/mtgrigorov
> > > > >
> > > > > On Sat, Feb 11, 2017 at 11:12 PM, David Beer <
> david.m.b...@gmail.com
> > >
> > > > > wrote:
> > > > >
> > > > > > Hi Martin
> > > > > >
> > > > > > Thanks for the pointers some left over code from refactoring. I
> > have
> > > > > > created an example project located here
> > > > > > <https://github.com/dmbeer/wicket-7-spring-security/tree/
> > > > > > wicket-7-test-spring-security>
> > > > > > under branch wicket-7-test-spring-security. I am still struggling
> > to
> > > > get
> > > > > > the mocked DAO injected. Any pointers welcome or even a PR if not
> > too
> > > > > much
> > > > > > trouble or example somewhere.
> > > > > >
>

Re: Test Page renders with Nested Panel

2017-02-13 Thread David Beer
Hi Martin

Thanks for the PR. So the solution is to remove JavaEE EJB references
rather than to use them and test them. Understand Spring doesn't care about
EJB but and vice versa. I am only using spring for the security layer and
JavaEE for everything else.

So does @SpringBean just convert the EJB to a spring bean.

So the only other way to test the EJB approach is to pass a mock value to
the constructor and have it check if the value is null as the container
will Inject the value.

David


On 13 February 2017 at 21:20, Martin Grigorov <mgrigo...@apache.org> wrote:

> https://github.com/dmbeer/wicket-7-spring-security/pull/1
> There you go!
>
> I've removed/commented out the Java EE stuff.
> Spring doesn't care about @EJB/@Stateless. As JavaEE doesn't care about
> @Component & Co.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Feb 13, 2017 at 10:05 PM, David Beer <david.m.b...@gmail.com>
> wrote:
>
> > Hi Martin
> >
> > It appears there was an error when I tried to push the code. I am trying
> to
> > test AdminPage, and failing to inject the mock from the application
> > context.
> >
> > AdminPage
> > https://github.com/dmbeer/wicket-7-spring-security/blob/
> > wicket-7-test-spring-security/src/main/java/com/copperarrow/
> > pages/AdminPage.java
> > AdmingPageTest
> > https://github.com/dmbeer/wicket-7-spring-security/blob/
> > wicket-7-test-spring-security/src/test/java/com/copperarrow/
> > pages/AdminPageTest.java
> > UserAccountDataProvider
> > https://github.com/dmbeer/wicket-7-spring-security/blob/
> > wicket-7-test-spring-security/src/main/java/com/copperarrow/
> > model/dataproviders/UserAccountDataProvider.java
> >
> > This fails unable to attach container because UserDAO is always null even
> > though I have added it to the applicationmock context.
> >
> >
> >
> > On 13 February 2017 at 19:57, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > Hi David,
> > >
> > > Please give more information what is not working.
> > > There are 3 tests and all pass.
> > > I have no idea where to look for a problem.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Sat, Feb 11, 2017 at 11:12 PM, David Beer <david.m.b...@gmail.com>
> > > wrote:
> > >
> > > > Hi Martin
> > > >
> > > > Thanks for the pointers some left over code from refactoring. I have
> > > > created an example project located here
> > > > <https://github.com/dmbeer/wicket-7-spring-security/tree/
> > > > wicket-7-test-spring-security>
> > > > under branch wicket-7-test-spring-security. I am still struggling to
> > get
> > > > the mocked DAO injected. Any pointers welcome or even a PR if not too
> > > much
> > > > trouble or example somewhere.
> > > >
> > > > Thanks
> > > >
> > > > David
> > > >
> > > > On 10 February 2017 at 07:46, Martin Grigorov <mgrigo...@apache.org>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > >
> > > > > On Fri, Feb 10, 2017 at 12:08 AM, David Beer <
> david.m.b...@gmail.com
> > >
> > > > > wrote:
> > > > >
> > > > > > Hi Guys
> > > > > >
> > > > > > I am new to WicketTester and testing pages here. I am also
> getting
> > > back
> > > > > > into wicket slowly.
> > > > > >
> > > > > > I have a page which currently simply adds a panel (more to come),
> > the
> > > > > panel
> > > > > > contains a DataTable. I am not interested in the content of the
> > table
> > > > > just
> > > > > > that the page renders with an empty table.
> > > > > >
> > > > > > MyPage -> MyPanel -> Adds a DataTable, using dataproviders.
> > > > > >
> > > > > > The problem is that when I do tester.startPage(MyPage.class) it
> > tries
> > > > to
> > > > > > add the data table and fails unless data provider size is set to
> 0.
> > > > > >
> > > > > > MyPage Code
> > > > > >
> > > > > > public class MyPage extends BasePage {
> > > > > >
> &g

Re: Test Page renders with Nested Panel

2017-02-13 Thread David Beer
Hi Martin

It appears there was an error when I tried to push the code. I am trying to
test AdminPage, and failing to inject the mock from the application context.

AdminPage
https://github.com/dmbeer/wicket-7-spring-security/blob/wicket-7-test-spring-security/src/main/java/com/copperarrow/pages/AdminPage.java
AdmingPageTest
https://github.com/dmbeer/wicket-7-spring-security/blob/wicket-7-test-spring-security/src/test/java/com/copperarrow/pages/AdminPageTest.java
UserAccountDataProvider
https://github.com/dmbeer/wicket-7-spring-security/blob/wicket-7-test-spring-security/src/main/java/com/copperarrow/model/dataproviders/UserAccountDataProvider.java

This fails unable to attach container because UserDAO is always null even
though I have added it to the applicationmock context.



On 13 February 2017 at 19:57, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi David,
>
> Please give more information what is not working.
> There are 3 tests and all pass.
> I have no idea where to look for a problem.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Sat, Feb 11, 2017 at 11:12 PM, David Beer <david.m.b...@gmail.com>
> wrote:
>
> > Hi Martin
> >
> > Thanks for the pointers some left over code from refactoring. I have
> > created an example project located here
> > <https://github.com/dmbeer/wicket-7-spring-security/tree/
> > wicket-7-test-spring-security>
> > under branch wicket-7-test-spring-security. I am still struggling to get
> > the mocked DAO injected. Any pointers welcome or even a PR if not too
> much
> > trouble or example somewhere.
> >
> > Thanks
> >
> > David
> >
> > On 10 February 2017 at 07:46, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > >
> > > On Fri, Feb 10, 2017 at 12:08 AM, David Beer <david.m.b...@gmail.com>
> > > wrote:
> > >
> > > > Hi Guys
> > > >
> > > > I am new to WicketTester and testing pages here. I am also getting
> back
> > > > into wicket slowly.
> > > >
> > > > I have a page which currently simply adds a panel (more to come), the
> > > panel
> > > > contains a DataTable. I am not interested in the content of the table
> > > just
> > > > that the page renders with an empty table.
> > > >
> > > > MyPage -> MyPanel -> Adds a DataTable, using dataproviders.
> > > >
> > > > The problem is that when I do tester.startPage(MyPage.class) it tries
> > to
> > > > add the data table and fails unless data provider size is set to 0.
> > > >
> > > > MyPage Code
> > > >
> > > > public class MyPage extends BasePage {
> > > >
> > > > private NotificationPanel notificationPanel;
> > > > private BootstrapDefaultDataTable<UserAccount, String> userTable;
> > > >
> > >
> > > This is not used/needed.
> > >
> > >
> > > >
> > > > public MyPage() {
> > > > notificationPanel = new NotificationPanel("notification");
> > > > notificationPanel.setOutputMarkupId(true);
> > > > notificationPanel.hideAfter(Duration.seconds(2));
> > > > add(notificationPanel);
> > > > add(new MyPanel("users-table-panel"));
> > > > }
> > > > }
> > > >
> > > > MyPanel code
> > > >
> > > > public class MyPanel extends Panel {
> > > >
> > > > private NotificationPanel notificationPanel;
> > > > private BootstrapDefaultDataTable<UserAccount, String>
> userTable;
> > > >
> > > >
> > > > public UsersTablePanel(String id) {
> > > > super(id);
> > > > notificationPanel = new NotificationPanel("notification");
> > >
> > >
> > > This looks the same as in the page. Maybe one should be removed ?!
> > >
> > >
> > > > notificationPanel.setOutputMarkupId(true);
> > > > notificationPanel.hideAfter(Duration.seconds(2));
> > > > add(notificationPanel);
> > > > usersTable();
> > > > }
> > > >
> > > > private void usersTable() {
> > > > List<IColumn<UserAccount, String>> columns = new
> ArrayList<>();
> > > > columns.add(new PropertyColumn<>(Model.of("First Name"),
> &

Re: Test Page renders with Nested Panel

2017-02-11 Thread David Beer
Hi Martin

Thanks for the pointers some left over code from refactoring. I have
created an example project located here
<https://github.com/dmbeer/wicket-7-spring-security/tree/wicket-7-test-spring-security>
under branch wicket-7-test-spring-security. I am still struggling to get
the mocked DAO injected. Any pointers welcome or even a PR if not too much
trouble or example somewhere.

Thanks

David

On 10 February 2017 at 07:46, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi,
>
>
> On Fri, Feb 10, 2017 at 12:08 AM, David Beer <david.m.b...@gmail.com>
> wrote:
>
> > Hi Guys
> >
> > I am new to WicketTester and testing pages here. I am also getting back
> > into wicket slowly.
> >
> > I have a page which currently simply adds a panel (more to come), the
> panel
> > contains a DataTable. I am not interested in the content of the table
> just
> > that the page renders with an empty table.
> >
> > MyPage -> MyPanel -> Adds a DataTable, using dataproviders.
> >
> > The problem is that when I do tester.startPage(MyPage.class) it tries to
> > add the data table and fails unless data provider size is set to 0.
> >
> > MyPage Code
> >
> > public class MyPage extends BasePage {
> >
> > private NotificationPanel notificationPanel;
> > private BootstrapDefaultDataTable<UserAccount, String> userTable;
> >
>
> This is not used/needed.
>
>
> >
> > public MyPage() {
> > notificationPanel = new NotificationPanel("notification");
> > notificationPanel.setOutputMarkupId(true);
> > notificationPanel.hideAfter(Duration.seconds(2));
> > add(notificationPanel);
> > add(new MyPanel("users-table-panel"));
> > }
> > }
> >
> > MyPanel code
> >
> > public class MyPanel extends Panel {
> >
> > private NotificationPanel notificationPanel;
> > private BootstrapDefaultDataTable<UserAccount, String> userTable;
> >
> >
> > public UsersTablePanel(String id) {
> > super(id);
> > notificationPanel = new NotificationPanel("notification");
>
>
> This looks the same as in the page. Maybe one should be removed ?!
>
>
> > notificationPanel.setOutputMarkupId(true);
> > notificationPanel.hideAfter(Duration.seconds(2));
> > add(notificationPanel);
> > usersTable();
> > }
> >
> > private void usersTable() {
> > List<IColumn<UserAccount, String>> columns = new ArrayList<>();
> > columns.add(new PropertyColumn<>(Model.of("First Name"),
> > "firstName", "firstName"));
> > columns.add(new PropertyColumn<>(Model.of("Last Name"),
> > "lastName"));
> > columns.add(new PropertyColumn<>(Model.of("Email Address"),
> > "email"));
> > columns.add(new PropertyColumn<>(Model.of("Username"),
> > "userName"));
> >
> > userTable = new BootstrapDefaultDataTable<>("users-table",
> > columns,
> > new DataProvider(), 20);
> >
>
> Here you create a new DataProvider.
> Does it use some service (Spring, EJB, Guice,...) to load the items ?!
>
>
> > userTable.add(new TableBehavior().hover().bordered());
> > add(userTable);
> > }
> > }
> >
> > MyPageTest Code
> >
> > public class AdminViewPageTest extends WicketApplicationTest {
> >
> > private WicketTester tester;
> >
> > private UsersDataProvider usersDataProvider;
> >
> > private AdminViewPage adminViewPage;
> >
> > @Before
> > public void setUp() throws Exception {
> > super.setUp();
> > usersDataProvider = mock(UsersDataProvider.class);
> > adminViewPage = new AdminViewPage();
> > doNothing().when(usersDataProvider).checkDAO();
> > when(usersDataProvider.size()).thenReturn(0L);
> >
>
> This usersDataProvider is not really used by UsersTablePanel.java because
> it creates its own one (new DataProvider()). So the mocking doesn't really
> help.
>
>
> > tester = getTester();
> > tester.startPage(adminViewPage);
> > }
> >
> > @Test
> > public void renderSuccessfully() throws Exception {
> > tester.assertRenderedPage(AdminViewPage.class);
> > }
> >
> > }
> >
> > Any pointers would be great.
> >
>
> Usually the DataProviders use some service to load the items and this
> service is injected (Spring, CDI, ...).
> Then in your tests you need to provide Dependency Injection context that
> provides mocked service. This way Wicket will used the mock for the tests
> and the real service when running the application.
>
>
> >
> > Thanks
> >
> > David
> >
>


Test Page renders with Nested Panel

2017-02-09 Thread David Beer
Hi Guys

I am new to WicketTester and testing pages here. I am also getting back
into wicket slowly.

I have a page which currently simply adds a panel (more to come), the panel
contains a DataTable. I am not interested in the content of the table just
that the page renders with an empty table.

MyPage -> MyPanel -> Adds a DataTable, using dataproviders.

The problem is that when I do tester.startPage(MyPage.class) it tries to
add the data table and fails unless data provider size is set to 0.

MyPage Code

public class MyPage extends BasePage {

private NotificationPanel notificationPanel;
private BootstrapDefaultDataTable<UserAccount, String> userTable;

public MyPage() {
notificationPanel = new NotificationPanel("notification");
notificationPanel.setOutputMarkupId(true);
notificationPanel.hideAfter(Duration.seconds(2));
add(notificationPanel);
add(new MyPanel("users-table-panel"));
}
}

MyPanel code

public class MyPanel extends Panel {

private NotificationPanel notificationPanel;
private BootstrapDefaultDataTable<UserAccount, String> userTable;


public UsersTablePanel(String id) {
super(id);
notificationPanel = new NotificationPanel("notification");
notificationPanel.setOutputMarkupId(true);
notificationPanel.hideAfter(Duration.seconds(2));
add(notificationPanel);
usersTable();
}

private void usersTable() {
List<IColumn<UserAccount, String>> columns = new ArrayList<>();
columns.add(new PropertyColumn<>(Model.of("First Name"),
"firstName", "firstName"));
columns.add(new PropertyColumn<>(Model.of("Last Name"),
"lastName"));
columns.add(new PropertyColumn<>(Model.of("Email Address"),
"email"));
columns.add(new PropertyColumn<>(Model.of("Username"), "userName"));

userTable = new BootstrapDefaultDataTable<>("users-table", columns,
new DataProvider(), 20);
userTable.add(new TableBehavior().hover().bordered());
add(userTable);
}
}

MyPageTest Code

public class AdminViewPageTest extends WicketApplicationTest {

private WicketTester tester;

private UsersDataProvider usersDataProvider;

private AdminViewPage adminViewPage;

@Before
public void setUp() throws Exception {
super.setUp();
usersDataProvider = mock(UsersDataProvider.class);
adminViewPage = new AdminViewPage();
doNothing().when(usersDataProvider).checkDAO();
when(usersDataProvider.size()).thenReturn(0L);
tester = getTester();
tester.startPage(adminViewPage);
}

@Test
public void renderSuccessfully() throws Exception {
tester.assertRenderedPage(AdminViewPage.class);
}

}

Any pointers would be great.

Thanks

David


Re: Ajax Error When using File Upload

2017-01-25 Thread David Beer
Hi Martin

Thanks for confirming have managed to enable the correct security settings
all is working again.

Thanks

David

On 25 January 2017 at 21:17, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi David,
>
> I think it is Spring Security.
> Check that the value of X-Frame-Options response header is SAMEORIGIN
>
> For more info see
> https://peteris.rocks/blog/exotic-http-headers/#x-frame-options
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Jan 25, 2017 at 9:58 PM, David Beer <david.m.b...@gmail.com>
> wrote:
>
> > Hi All
> >
> > I have panel which contains a form for uploading a file
> > using BootstrapFileInput. When I upload the file all is correctly
> uploaded
> > but I receive this error in Ajax Debug console.
> >
> > *ERROR: *
> > Cannot read Ajax response for multipart form submit: SecurityError:
> > Blocked a frame with origin "
> > http://localhost:8080; from accessing a cross-origin frame.
> > *ERROR: *
> > Wicket.Ajax.Call.failure: Error while parsing response: No XML
> > response in the IFrame document
> >
> > I am bit stuck on this one, not sure if this a wicket issue or a spring
> > security issue.
> >
> > Any pointers would be helpful.
> >
> > Thanks
> >
>


Ajax Error When using File Upload

2017-01-25 Thread David Beer
Hi All

I have panel which contains a form for uploading a file
using BootstrapFileInput. When I upload the file all is correctly uploaded
but I receive this error in Ajax Debug console.

*ERROR: *
Cannot read Ajax response for multipart form submit: SecurityError:
Blocked a frame with origin "
http://localhost:8080; from accessing a cross-origin frame.
*ERROR: *
Wicket.Ajax.Call.failure: Error while parsing response: No XML
response in the IFrame document

I am bit stuck on this one, not sure if this a wicket issue or a spring
security issue.

Any pointers would be helpful.

Thanks


Re: Wicket 7 + Spring Security 7

2017-01-09 Thread David Beer
Hi Martin/All

I actually solved the problem late yesterday. The issue is around the way
in which spring security can be configured. There had been a lot of changes
between 3.1 and 4.2. Mainly around configuration, as I said earlier. It is
now advised also to use the configuration in the Java Code. However there
were a few defaults that don't get overridden in the java config but do
automatically in the XML definition, the main part being the way in which
error and login processing is handled. Spring Security will default to
process the login for you if you don't configure it correctly, which is why
the signin code was not get used.

Which meant that error's were being handle by the spring security form
which is why I couldn't access them. I have now configured everything
properly and the example project shows how it needs to be configured.

Thanks

David

On 9 January 2017 at 19:22, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi David,
>
> What exactly is hard ?
> What kind of errors you mean?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Jan 6, 2017 at 7:38 PM, David Beer <david.m.b...@gmail.com> wrote:
>
> > Hi Martin
> >
> > Happy New Year.
> >
> > Thanks for this. I have managed to get Started and have a configuration
> > which indeed allows authenticated user to a specifc page. I can login and
> > logout and it cleans the session, however I am having a hard time getting
> > and displaying errors.
> >
> > My demo project is located on github here
> > https://github.com/dmbeer/wicket-7-spring-security/tree/master. I
> wondered
> > if could have a quick look and see if everything is correct and point me
> in
> > the right direction for obtaining the error messages.
> >
> > Thanks
> >
> > David
> >
> > On 31 December 2016 at 06:12, Martin Grigorov <martin.grigo...@gmail.com
> >
> > wrote:
> >
> > > Hi David,
> > >
> > > Latest Spring Security release is 4.1.4, there is no 7.x ;-)
> > >
> > > I cannot share my project but the integration is quite simple.
> > >
> > > 1) define the Spring config (with an impl of UserDetailsService!)
> > > 2) in your login logic (MyAuthenticatedWebSession#signin() or
> > > MyLoginForm#onSubmit()) use Spring AuthenticationService#
> > authenticate(new
> > > UsernamePasswordAuthenticationToken(username, password))
> > > 3) if 2) is successful then you can use
> > > SecurityContextHolder.getContext().getUser() to get the User returned
> by
> > > your UserDetailsService with its authorities, i.e. roles. You can use
> > them
> > > in Wicket's RolesAuthorizationStrategy
> > > 4) if 2) is not successful then Spring Security will throw very
> specific
> > > exception with the reason
> > >
> > > P.S. I am on my phone now, without access to the application code, so
> > some
> > > class/method names might be slightly wrong but I hope they are good
> > enough
> > > to get you going!
> > >
> > > Happy New Year!
> > >
> > > On Dec 30, 2016 8:23 PM, "David Beer" <david.m.b...@gmail.com> wrote:
> > >
> > > > Hi All
> > > >
> > > > I am trying to add spring security to wicket 7. I have looked at
> > example
> > > > thomberges did but that doesn't really seem to work. If I comment out
> > the
> > > > code in the SecureWebsession all still seems to authenticate somehow.
> > > >
> > > > Is there an up to date project anyone has of integrating spring
> > security
> > > > with apache wicket? It would be really useful if a basic project
> could
> > be
> > > > shared.
> > > >
> > > > Thanks
> > > > David
> > > >
> > > > Happy New Year All
> > > >
> > >
> >
>


Re: Wicket 7 + Spring Security 7

2017-01-06 Thread David Beer
Hi

After more investigation, it seems that if you use Wicket 6 and Spring
Security 3 all works as expected. However Wicket 7 and Spring Security 4
and you get the behaviour I am facing. Spring Security seems to take care
of the whole login process.

David

On 6 January 2017 at 18:38, David Beer <david.m.b...@gmail.com> wrote:

> Hi Martin
>
> Happy New Year.
>
> Thanks for this. I have managed to get Started and have a configuration
> which indeed allows authenticated user to a specifc page. I can login and
> logout and it cleans the session, however I am having a hard time getting
> and displaying errors.
>
> My demo project is located on github here https://github.com/
> dmbeer/wicket-7-spring-security/tree/master. I wondered if could have a
> quick look and see if everything is correct and point me in the right
> direction for obtaining the error messages.
>
> Thanks
>
> David
>
> On 31 December 2016 at 06:12, Martin Grigorov <martin.grigo...@gmail.com>
> wrote:
>
>> Hi David,
>>
>> Latest Spring Security release is 4.1.4, there is no 7.x ;-)
>>
>> I cannot share my project but the integration is quite simple.
>>
>> 1) define the Spring config (with an impl of UserDetailsService!)
>> 2) in your login logic (MyAuthenticatedWebSession#signin() or
>> MyLoginForm#onSubmit()) use Spring AuthenticationService#authenticate(new
>> UsernamePasswordAuthenticationToken(username, password))
>> 3) if 2) is successful then you can use
>> SecurityContextHolder.getContext().getUser() to get the User returned by
>> your UserDetailsService with its authorities, i.e. roles. You can use them
>> in Wicket's RolesAuthorizationStrategy
>> 4) if 2) is not successful then Spring Security will throw very specific
>> exception with the reason
>>
>> P.S. I am on my phone now, without access to the application code, so some
>> class/method names might be slightly wrong but I hope they are good enough
>> to get you going!
>>
>> Happy New Year!
>>
>> On Dec 30, 2016 8:23 PM, "David Beer" <david.m.b...@gmail.com> wrote:
>>
>> > Hi All
>> >
>> > I am trying to add spring security to wicket 7. I have looked at example
>> > thomberges did but that doesn't really seem to work. If I comment out
>> the
>> > code in the SecureWebsession all still seems to authenticate somehow.
>> >
>> > Is there an up to date project anyone has of integrating spring security
>> > with apache wicket? It would be really useful if a basic project could
>> be
>> > shared.
>> >
>> > Thanks
>> > David
>> >
>> > Happy New Year All
>> >
>>
>
>


Re: Wicket 7 + Spring Security 7

2017-01-06 Thread David Beer
Hi Martin

Happy New Year.

Thanks for this. I have managed to get Started and have a configuration
which indeed allows authenticated user to a specifc page. I can login and
logout and it cleans the session, however I am having a hard time getting
and displaying errors.

My demo project is located on github here
https://github.com/dmbeer/wicket-7-spring-security/tree/master. I wondered
if could have a quick look and see if everything is correct and point me in
the right direction for obtaining the error messages.

Thanks

David

On 31 December 2016 at 06:12, Martin Grigorov <martin.grigo...@gmail.com>
wrote:

> Hi David,
>
> Latest Spring Security release is 4.1.4, there is no 7.x ;-)
>
> I cannot share my project but the integration is quite simple.
>
> 1) define the Spring config (with an impl of UserDetailsService!)
> 2) in your login logic (MyAuthenticatedWebSession#signin() or
> MyLoginForm#onSubmit()) use Spring AuthenticationService#authenticate(new
> UsernamePasswordAuthenticationToken(username, password))
> 3) if 2) is successful then you can use
> SecurityContextHolder.getContext().getUser() to get the User returned by
> your UserDetailsService with its authorities, i.e. roles. You can use them
> in Wicket's RolesAuthorizationStrategy
> 4) if 2) is not successful then Spring Security will throw very specific
> exception with the reason
>
> P.S. I am on my phone now, without access to the application code, so some
> class/method names might be slightly wrong but I hope they are good enough
> to get you going!
>
> Happy New Year!
>
> On Dec 30, 2016 8:23 PM, "David Beer" <david.m.b...@gmail.com> wrote:
>
> > Hi All
> >
> > I am trying to add spring security to wicket 7. I have looked at example
> > thomberges did but that doesn't really seem to work. If I comment out the
> > code in the SecureWebsession all still seems to authenticate somehow.
> >
> > Is there an up to date project anyone has of integrating spring security
> > with apache wicket? It would be really useful if a basic project could be
> > shared.
> >
> > Thanks
> > David
> >
> > Happy New Year All
> >
>


Wicket 7 + Spring Security 7

2016-12-30 Thread David Beer
Hi All

I am trying to add spring security to wicket 7. I have looked at example
thomberges did but that doesn't really seem to work. If I comment out the
code in the SecureWebsession all still seems to authenticate somehow.

Is there an up to date project anyone has of integrating spring security
with apache wicket? It would be really useful if a basic project could be
shared.

Thanks
David

Happy New Year All


Re: Pluggable architecture for wicket application

2016-11-17 Thread David Beer
Hi Guys

Does anybody know of a small scale example this sounds really interesting.

Thanks

David

On 17 November 2016 at 18:00, Matt Pavlovich <mattr...@gmail.com> wrote:

> I extensively use Wicket+OSGi. Works great! Modular web applications are
> totally doable. Follow Martin's advice and wire in modules using the
> application hooks described.
>
>
>
> On 11/14/16 3:47 PM, Martijn Dashorst wrote:
>
>> I know a Dutch company (or two) that use OSGi, I'm certain that one
>> uses Wicket + OSGi: educator.eu. The other, luminis.eu, does a lot of
>> work with OSGi, but might not use it in combination with Wicket. I
>> only have second hand knowledge about the combination, and it's
>> probably outdated.
>>
>> Maybe someone from those companies is listening here and cares to comment.
>>
>> Martijn
>>
>> On Mon, Nov 14, 2016 at 8:13 PM, Martin Grigorov <mgrigo...@apache.org>
>> wrote:
>>
>>> Hi,
>>>
>>> On Mon, Nov 14, 2016 at 3:58 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>>>
>>> Hello,
>>>>
>>>> We really need advise from Apache Wicket experts. Please let me know if
>>>> you
>>>> have any ideas how to realize the following:
>>>>
>>>> We are working on Orienteer (http://orienteer.org) - open source
>>>> Business
>>>> Application Platform for rapid development.
>>>> Orienteer already has pluggable architecture which allow to
>>>> start/stop/restart modules and etc. Every module can bring different
>>>> things: new webpages, REST, wicket components and etc. For example:
>>>> https://github.com/OrienteerBAP/Orienteer/tree/master/
>>>> orienteer-pivottable
>>>>
>>>> But there is plans to allow dynamically upload required new module
>>>> (without
>>>> recompiling whole WAR with new module).  To upload person can literally
>>>> upload JAR or enter URL with the module or specify Maven's
>>>> groupId:artifactId:version.
>>>>
>>>> There is no problem with downloading of module: there is a problem with
>>>> runtime running it.  Questions:
>>>>
>>>> 1) Is there good way for substitution of your own ClassLoader for more
>>>> dynamic management?
>>>>
>>>> Wicket doesn't manage class loaders. The web container (like Tomcat)
>>> deals
>>> with this.
>>> The only hook provided by Wicket is org.apache.wicket.protocol.
>>> http.WicketFilter#getClassLoader(). See org.apache.wicket.protocol.http.
>>> ReloadingWicketFilter#reloadingClassLoader.
>>>
>>>
>>> 2) Is there a way for restarting of wicket app without restarting a
>>>> web-container?
>>>>
>>>> You may use WebApplication#initApplication() and #internalDestroy().
>>> Also
>>> see what ReloadingWicketFilter does.
>>>
>>>
>>> 3) Related to p.1: any good experience with using this:
>>>> https://github.com/kamranzafar/JCL ?
>>>>
>>>> IMO this should work to load extra jars dynamically. I didn't see
>>> anything
>>> about unloading though.
>>>
>>>
>>> 4) Any other suggetions how to make dynamically pluggable modules in
>>>> wicket?
>>>>
>>>> Some people use OSGi (with PAX). I don't have much experience to be
>>> able to
>>> comment.
>>>
>>>
>>> Thanks,
>>>>
>>>> Ilya
>>>>
>>>> -
>>>> Orienteer(http://orienteer.org) - open source Business Application
>>>> Platform
>>>>
>>>>
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Testing Page Rendered when using AnnotationsShiroAuthorizationStrategy

2016-10-15 Thread David Beer
Hi All

I am using shiro to handle my authentication and Authorization for pages
and some components. My current problem is that the page is Annotated like
so @ShiroSecurityConstraint(constraint = ShiroConstraint.LoggedIn). The
problem is I keep getting an java.lang.IllegalStateException: missing
behavior definition for the preceding method call:

Has anyone been able to test a page using the Shiro Annotation Provider or
even Spring Security.

Thanks

David


Re: WicketTester Access Component Specific resource bundles

2016-09-09 Thread David Beer
Hi

In the end I used the following to get the Resource value.

tester().getApplication().getResourceSettings().getStringResourceLoaders().get(5).loadStringResource(HeaderPanel.class,
"resource-keyl",Locale.getDefault(), tester().getSession().getStyle(), "")

Is there an easier way to get the resource?

Thanks

On 9 September 2016 at 22:44, David Beer <david.m.b...@gmail.com> wrote:

> Hi Martin
>
> I use a custom Wicket Application added to WicketTester via new
> WicketTester(new WicketApplication()). I use a similar process to the way
> wicket-bootstrap-core creates the Tester class and Wicket Application.
>
> Thanks
>
> David
>
>
> On 5 September 2016 at 21:02, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> Hi David,
>>
>> The answer is YES.
>> But I'll need more information about your current setup to be able to
>> suggest how to fix it.
>>
>> I guess your resources are in YourApplication.properties but your tests
>> use
>> MockApplication.
>> If this is the case then you have two options:
>> 1) new WicketTester(new YourApplication())
>> 2)
>> tester.getApplication().getResourceSettings().getStringResou
>> rceLoaders().add(new
>> ClassStringResourceLoader(YourApplication.class))  (I don't have my IDE
>> in
>> front of me right now, so the names could be slightly wrong).
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Sat, Sep 3, 2016 at 3:53 PM, David Beer <david.m.b...@gmail.com>
>> wrote:
>>
>> > Hi All
>> >
>> > I am new to WicketTester and am trying to test the content on my panel
>> via
>> > the page. My question is more around the fact that the panel requests
>> its
>> > content from a resource file via ResourceModel, is there a way I can use
>> > the same resource file in my tests?
>> >
>> > Thanks
>> >
>> > David
>> >
>>
>
>


Re: WicketTester Access Component Specific resource bundles

2016-09-09 Thread David Beer
Hi Martin

I use a custom Wicket Application added to WicketTester via new
WicketTester(new WicketApplication()). I use a similar process to the way
wicket-bootstrap-core creates the Tester class and Wicket Application.

Thanks

David

On 5 September 2016 at 21:02, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi David,
>
> The answer is YES.
> But I'll need more information about your current setup to be able to
> suggest how to fix it.
>
> I guess your resources are in YourApplication.properties but your tests use
> MockApplication.
> If this is the case then you have two options:
> 1) new WicketTester(new YourApplication())
> 2)
> tester.getApplication().getResourceSettings().getStringResourceLoaders().
> add(new
> ClassStringResourceLoader(YourApplication.class))  (I don't have my IDE in
> front of me right now, so the names could be slightly wrong).
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Sat, Sep 3, 2016 at 3:53 PM, David Beer <david.m.b...@gmail.com> wrote:
>
> > Hi All
> >
> > I am new to WicketTester and am trying to test the content on my panel
> via
> > the page. My question is more around the fact that the panel requests its
> > content from a resource file via ResourceModel, is there a way I can use
> > the same resource file in my tests?
> >
> > Thanks
> >
> > David
> >
>


WicketTester Access Component Specific resource bundles

2016-09-03 Thread David Beer
Hi All

I am new to WicketTester and am trying to test the content on my panel via
the page. My question is more around the fact that the panel requests its
content from a resource file via ResourceModel, is there a way I can use
the same resource file in my tests?

Thanks

David


Wicket 7 + JEE 7 + wicket-cdi-1.1

2016-05-19 Thread David Beer
Hi All

I am trying to integrate CDI and EJB with wicket 7. I am running the latest
release so 7.3.0 etc and wicket-cdi-1.1. I am having to use
Noncontextual.of().inject(this) for some resource however when I run the
application I am getting the following error.

23:18:58,632 INFO  [wicket-jquery-selectors] (default task-4) initialize
wicket jquery selectors with given settings:
de.agilecoders.wicket.jquery.settings.WicketJquerySelectorsSettings@880a175
23:18:58,660 ERROR [io.undertow.request] (default task-4) UT005023:
Exception handling request to /CIU/: java.lang.NoSuchMethodError:
org.apache.wicket.cdi.CdiConfiguration: method ()V not found
at
com.copperarrow.ciu.WicketApplication.configureCDIEJB(WicketApplication.java:55)
at com.copperarrow.ciu.WicketApplication.init(WicketApplication.java:31)
at org.apache.wicket.Application.initApplication(Application.java:950)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:429)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:353)
at
io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111)
at
org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:84)
at
io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:97)
at
io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:79)
at io.undertow.servlet.core.ManagedFilter.getFilter(ManagedFilter.java:65)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
at
io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at
io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

I am not sure what exactly is causing this. I have CDI configure like so
new
CdiConfiguration().setPropagation(ConversationPropagation.NONE).configure(this);

Any thoughts on this.


Re: HTML5 and Bootstrap Input placeholder tag

2016-05-08 Thread David Beer
Hi Martin

Thanks for this worked great.

Thanks

On 6 May 2016 at 20:19, Martin Grigorov <martin.grigo...@gmail.com> wrote:

> On May 6, 2016 9:05 PM, "David Beer" <david.m.b...@gmail.com> wrote:
> >
> > Hi Guys
> >
> > I am trying to utilise the placeholder tag in input components. So say I
> > have a TextField that mapps to the html  type="text"
> > placeholder="Enter Name">. How can I get wicket to add the placeholder
> tag
> > so that I can populate via properties.
>
> 
>
> >
> > Thanks
> >
> > David
>


HTML5 and Bootstrap Input placeholder tag

2016-05-06 Thread David Beer
Hi Guys

I am trying to utilise the placeholder tag in input components. So say I
have a TextField that mapps to the html . How can I get wicket to add the placeholder tag
so that I can populate via properties.

Thanks

David


Re: Wicket 7 Security and JBoss Keycloak

2016-04-22 Thread David Beer
Hi Martin

This what I am thinking that I need a similar Authorisation plugging to
shiro, my problem is that the security process is set-up in the web.xml
file, then the auth method is declare as Keycloak. Which redirects to the
provided server and provides a user principal back. Would I still need to
create a filter for the authorization process.

Thanks

David
On 22 Apr 2016 9:57 a.m., "Martin Grigorov" <mgrigo...@apache.org> wrote:

Hi,

I don't know how Keycloak works but from my experience with Spring Security
and Apache Shiro you have to create an AuthorizationStrategy that reads
from somewhere (e.g. the Wicket Session or some Subject holder) the logged
in User and then compares its roles with the one set in @AuthorizeAction on
the Wicket component.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Apr 22, 2016 at 12:34 AM, David Beer <david.m.b...@gmail.com> wrote:

> Hi All
>
> I am looking at how to integrate JBoss Keycloak with wicket 7. I am not
> quite sure where to start the configuration the example given is where the
> jsp pages are secured by configuration in the web.xml file. Wicket is a
> little different in that you need to create a Authorization Strategy. I am
> not sure how to secure the pages I want to.
>
> Has anybody tried integrating wicket with keycloak before or even
> picketlink.
>
> Thanks
>
> David
>


Wicket 7 Security and JBoss Keycloak

2016-04-21 Thread David Beer
Hi All

I am looking at how to integrate JBoss Keycloak with wicket 7. I am not
quite sure where to start the configuration the example given is where the
jsp pages are secured by configuration in the web.xml file. Wicket is a
little different in that you need to create a Authorization Strategy. I am
not sure how to secure the pages I want to.

Has anybody tried integrating wicket with keycloak before or even
picketlink.

Thanks

David


Problems with Border ID

2015-04-30 Thread David Kaufman
Hi,

we are currently struggling with getting our Border code to run. Initially
we used the isTransparentResolver() Method. The workaround posted in the
migration document, unfortunately didn't work out of the box.

The current solution fails with following RuntimeException:

Unable to find component with id 'content' in [BorderBodyContainer
[Component id = border_body]]
Expected: 'border:border_body:content'.
Found with similar names: 'border:content'

Where do I have to specify the name? If I specify the name in the markup
the error message reads:
border:border_body:content:border:border_body:content.

Thanks a lot,
David


Subclassing Localizer

2015-04-27 Thread David Kaufman
Hi,

I'm currently struggling with porting a wicket 1.4 subclass of Localizer to
wicket 6. Here subclassing is prohibited by the final keyword.

===
public class MyLocalizer extends Localizer {

@Override
public String getStringIgnoreSettings( final String key, final
Component component, final IModel? model, final String defaultValue ) {

final boolean flag = Session.get().getFlag();
if (flag) {
return String.format([%s], key)
}

return super.getStringIgnoreSettings( key, component, model, defaultValue );
}

}
===


As you can see, I simply want to return the key if a certain flag is set.
Is this somehow possible by using the IStringResourceLoader interface? Any
help is appreciated.

Thanks,
David


How to get a map of parameters of a request in wicket 6

2015-04-15 Thread David Kaufman
Hi,

In Wicket 1.4 we have following code snippet:
final MapString, String[] params =
getRequestCycle().getRequest().getParameterMap();

Wicket 6 doesn't have the capabilities of extracting a map. Is this
assumption correct? I can only find a method that extracts the keys:
final SetString parameterNames =
getRequest().getRequestParameters().getParameterNames();

Do I have to built the map myself or is there a convenience function
somewhere I overlooked?

Thanks,
David


compiling wicket 6.19.0 from source fails -

2015-04-14 Thread David Kaufman
Hi,

we have a few custom performance patches on our wicket 1.4 branch which I
want to port to the current wicket 6.19 branch (f8d3f258d1faa6).
Unfortunately, I'm unable to build the project from scratch, i.e. `mvn
install` fails with an error:

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 2.084 s
[INFO] Finished at: 2015-04-14T11:09:38+02:00
[INFO] Final Memory: 33M/395M
[INFO]

[ERROR] Failed to execute goal
org.codehaus.mojo:clirr-maven-plugin:2.6.1:check (clirr-check) on project
wicket-util: Execution clirr-check of goal
org.codehaus.mojo:clirr-maven-plugin:2.6.1:check failed: Invalid byte tag
in constant pool: 18 - [Help 1]

A similar error was reported in mid August 2014, but no solution was
posted, see
http://mail-archives.apache.org/mod_mbox/wicket-users/201408.mbox/%3ccamomwmpakkq2wz5db0mhaxl6fdfeysqakn4rtq4uu4zfxxc...@mail.gmail.com%3E

My current setup is as follows:
mvn --version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1;
2014-12-14T18:29:23+01:00)
Maven home: /usr/share/maven3
Java version: 1.8.0_31, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.8.0_31/jre
Default locale: en_US, platform encoding: UTF-8
OS name: linux, version: 3.13.0-49-generic, arch: amd64, family:
unix

Any help is greatly appreciated.

Thanks,
David


Re: Concering Borders in Wicket 6

2015-04-14 Thread David Kaufman
Thanks Martin! That was the explanation that I expected.

Thanks a lot,
David

2015-04-14 10:42 GMT+02:00 Martin Grigorov mgrigo...@apache.org:

 Hi,

 Your description is a bit confusing/unclear.
 The markup looks OK to me.
 YourBorder should add container1 and container2 components.
 Any user of YourBorder will add children components to the border body.
 In HTML terms the body is not direct descendant (because div
 class=layer2 is in between) but for Wicket it is direct descendant
 because there is no Wicket component that is both a child of the Border and
 a parent of the Border's BodyContainer.

 Martin Grigorov
 Freelancer, available for hire!
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Mon, Apr 13, 2015 at 12:26 PM, David Kaufman david.kauf...@gmx.de
 wrote:

  Hi,
 
  I'm currently migration our border classes from Wicket 1.4 to Wicket 6.
 I'm
  not quite sure if I understand the change correctly.
 
  We have markup that looks something like this:
 
  /head
  body
  wicket:border
  div class=layer1
  wicket:container wicket:id=container1 /
  div class=layer2
 wicket:container wicket:id=container2 /u
 wicket:body /
  /div
  /div
  /wicket:border
  /body
  /html
 
  Is it sufficient to call the constructor of the border, i.e. super(id,
  model), although the body is not a direct descendant? Since there is no
  enclosing wicket component around the border, (except the border
 itself), I
  don't have to be concerned about adding any container to the border. Is
  this assumption correct?
 
  Thanks
  -David
 



Concering Borders in Wicket 6

2015-04-13 Thread David Kaufman
Hi,

I'm currently migration our border classes from Wicket 1.4 to Wicket 6. I'm
not quite sure if I understand the change correctly.

We have markup that looks something like this:

/head
body
wicket:border
div class=layer1
wicket:container wicket:id=container1 /
div class=layer2
   wicket:container wicket:id=container2 /
   wicket:body /
/div
/div
/wicket:border
/body
/html

Is it sufficient to call the constructor of the border, i.e. super(id,
model), although the body is not a direct descendant? Since there is no
enclosing wicket component around the border, (except the border itself), I
don't have to be concerned about adding any container to the border. Is
this assumption correct?

Thanks
-David


Re: show image retrieved from database

2015-03-29 Thread David Beer
Hi Guys

You may find this discussion useful about reading from databases as well.
http://apache-wicket.1842946.n4.nabble.com/Displaying-Images-Stored-in-DB-on-Openshift-td4666463.html#a4666595

Thanks

David

On 26 March 2015 at 02:26, sabmoonie sabmoo...@gmail.com wrote:

 I've been searching for solutions on how to show an image using its
 location(absolute path) and your code helped me a lot. Been under stress
 the
 past days due to this problem. Thanks Mr. ORACLEADF!

 Btw, for those who wants to know how to convert a File() to byte[] use
 this:

 try {
 File file = new File(imagefilePath);
 byte[] byteArray = new byte[file.length()]();
 byteArray = FileUtils.readFileToByteArray(file);
  }catch(Exception e){
  e.printStackTrace();

  }


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/show-image-retrieved-from-database-tp4658009p4670098.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: TextTemplateHeaderContributor from 1.4 to 6

2015-03-17 Thread David Kaufman
Hi Martin,

is it also eligible to put the body inside a behavior, i.e.:

 protected void addJavaScriptFile() {
add( new Behavior() {
@Override
public void renderHead( final Component component, final
IHeaderResponse response ) {
super.renderHead( component, response );
PackageTextTemplate template = new
PackageTextTemplate(ClassName.class,filename.js);
MapString, Object variables = 
response.render(OnDomReadyHeaderItem.
forScript(template.asString(variables)));

The problem I'm facing is that the function addJavaScriptFile is accessable
from subclasses which either call the function or not, i.e. only in a few
cases the header should be actually added.

Thanks,
David


2015-03-16 15:16 GMT+01:00 Martin Grigorov mgrigo...@apache.org:

 Hi,

 #renderHead(IHeaderResponse response) {
   super.renderHead(response);

   PackageTextTemplate template = new PackageTextTemplate(ClassName.class,
 filename.js);
   MapString, Object variables = 
   ...


 response.render(OnDomReadyHeaderItem.forScript(template.asString(variables)));
 }

 Martin Grigorov
 Freelancer, available for hire!
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Mon, Mar 16, 2015 at 2:14 PM, David Kaufman david.kauf...@gmx.de
 wrote:

  Hello,
 
  I'm currently migrating a code snippet from version 1.4 to version 6:
 
 
  add( TextTemplateHeaderContributor.forJavaScript( ClassName.class,
  filename.js, new LoadableDetachableModelMapString,
  Object() {
  @Override
  protected MapString, Object load() {
  final MapString, Object result = new
  HashMapString, Object();
  result.put( id, static string  );
  // more parameters here
  return result;
  }
  } ) );
 
  The migration documentation (
 
 
 https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedTextTemplateHeaderContributor/StringHeaderContributor
  ) suggests using a custom template, e.g.
  private TextTemplate template = CssTemplate(new MyTextTemplate());
 
  Unfortunately, I can't find a TextTemplate which mimics the behavior in
 my
  1.4 code snippet. I found a JavaScriptTemplate, but I was unable to find
 a
  way to use it, as it needs a TextTemplate instance in its constructor.
 
  Thanks,
  David
 



TextTemplateHeaderContributor from 1.4 to 6

2015-03-16 Thread David Kaufman
Hello,

I'm currently migrating a code snippet from version 1.4 to version 6:


add( TextTemplateHeaderContributor.forJavaScript( ClassName.class,
filename.js, new LoadableDetachableModelMapString,
Object() {
@Override
protected MapString, Object load() {
final MapString, Object result = new
HashMapString, Object();
result.put( id, static string  );
// more parameters here
return result;
}
} ) );

The migration documentation (
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedTextTemplateHeaderContributor/StringHeaderContributor
) suggests using a custom template, e.g.
private TextTemplate template = CssTemplate(new MyTextTemplate());

Unfortunately, I can't find a TextTemplate which mimics the behavior in my
1.4 code snippet. I found a JavaScriptTemplate, but I was unable to find a
way to use it, as it needs a TextTemplate instance in its constructor.

Thanks,
David


Accessing PageParameters within Panel

2015-03-12 Thread David Kaufman
Hi,

I'm currently migrating a fairly large project from wicket 1.4 to wicket 6.

We're currently getting the PageParameters from the RequestCycle
via getRequestCycle().getPageParameters(), with wicket 6 this is no longer
possible. Getting the PageParameters via getPage().getPageParameters() is a
viable option but I'm not quite sure if this is the way to go. Another way
of getting parameters is by calling getRequest().getQueryParameters() but
I'm also not sure if these are identical with the PageParameters (they are
differently typed so I suspect that they are inherently different).

Thanks,
David


How to partially update listview on scroll.

2014-10-30 Thread David Vdd
Hello,

I'm trying to make a component that listens to scroll events and loads data
when needed. When the scrollbar reached the bottom or the top.

The component should have 2 possible usecases :one that keeps all the
previous data and one that only show x rows and reloads them both ways(up
and down).

I've already looked at other libraries like  wicket-quickview library
https://github.com/vineetsemwal/quickview/tree/master/wicket-quickview  ,
but this library adds many functionalities I don't need, and if there are
changes that break this library I would not be able to fix it since I don't
understand all the inner workings.

I was able to use the ajax scroll event implementation in combination with a
listview that add's items. The problem I'm having is that I can only update
the complete listview by adding its parent component. 

In the library they solve this by appending the items using js.(this was
based on  repainting-only-newly-created-repeater-items-via-ajax
http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/
 
)

I was wondering if there was a way to partially update a listview(or similar
component)? Can I extend the listview to prepend and append items with the
js/ajax) Which component should I be using?

I don't have much experience with extending existing wicket components so
I'm not really sure what I should overwrite.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-partially-update-listview-on-scroll-tp4668171.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DataTables Webjars Error

2014-08-28 Thread David Beer
Hi Martin

Thanks for the updated DataTables in wicketstuff, this works well under
tomcat, but deployed on wildfly I get the following error still.

20:59:56,175 WARN
 [org.apache.wicket.request.resource.ResourceReferenceRegistry] (default
task-22) A ResourceReference wont be created for a resource with key
[scope:
de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
name: webjars/datatables/null/js/jquery.dataTables.js; locale: null; style:
null; variation: null] because it cannot be located.


Any thought or help is much appreciated. This is the webjars initialisation
output.

[wicket-webjars] (default task-1) initialize wicket webjars with given
settings: WebjarsSettings{readFromCacheTimeout=3 seconds,
resourceStreamProvider=ClassLoader, recentVersionPlaceHolder='current',
assetPathCollectors=[de.agilecoders.wicket.webjars.collectors.FileAssetPathCollector@6bdf16ff,
de.agilecoders.wicket.webjars.collectors.JarAssetPathCollector@35ef6ad],
webjarsPackage='META-INF.resources.webjars',
webjarsPath='META-INF/resources/webjars', resourcePattern=.*,
webjarsPathPattern=/webjars/([^/]*)/([^/]*)/(.*), useCdnResources=false,
cdnUrl='//cdn.jsdelivr.net:80'}


​


On 26 August 2014 19:36, Martin Grigorov mgrigo...@apache.org wrote:

 wicket-6.x is the exact name of the branch
 a PR to master is also welcome! Otherwise I'll try to cherry-pick it
 (sometimes this doesn't work smoothly and I have to do it manually).

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov


 On Tue, Aug 26, 2014 at 9:33 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi Martin
 
  Thanks for spotting that will have a look. PR against 6.0x branch?
 
  Thanks
 
  David
 
 
 
  On 26 August 2014 19:15, Martin Grigorov mgrigo...@apache.org wrote:
 
   OK.
  
   I see 1.10.2 has changed the way it packs the css/js resources - there
 is
   no 'media' folder anymore.
   Please try it and send Pull Request if it works.
   Thanks!
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
  
   On Tue, Aug 26, 2014 at 9:10 PM, David Beer david.m.b...@gmail.com
   wrote:
  
Hi Martin
   
I am using the DataTables module from wicketstuff. I am simply
  installing
webjars with WicketWebjars.install(this);
   
This where the reference is made to the DataTables css file,
   
   
  
 
 https://github.com/wicketstuff/core/blob/core-6.16.0/jdk-1.6-parent/datatables-parent/datatables/src/main/java/org/wicketstuff/datatables/DataTablesCssReference.java
   
javascript reference is the same.
   
I have simply copied the example code.
   
Thanks
   
David
   
   
On 26 August 2014 18:02, Martin Grigorov mgrigo...@apache.org
 wrote:
   
 Hi,

 How do you use the webjar ?
 Show us the code of the resource reference's constructor.

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov


 On Mon, Aug 25, 2014 at 9:37 PM, David Beer 
 david.m.b...@gmail.com
 wrote:

  Hi All
 
  I am trying to use DataTables from wicketstuff in order to see if
  it
will
  fit my requirements. However I am getting the following error.
 
  19:34:16,427 WARN
   [org.apache.wicket.request.resource.ResourceReferenceRegistry]
(default
  task-22) A ResourceReference wont be created for a resource with
  key
  [scope:
 
 

   
  
 
 de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
  name: webjars/datatables/null/media/js/jquery.dataTables.js;
  locale:
 null;
  style: null; variation: null] because it cannot be located.
 
  I am using wildfly 8.1.0, and happend to be using
 wicket-bootstrap,
that
  works fine.
 
  Any Ideas.
 
  Thanks
 
  David
 

   
  
 



Re: DataTables Webjars Error

2014-08-28 Thread David Beer
Hi Martin,

Yes I use the wicket-bootstrap which seems to work fine without the extra
settings for vfs. If I remove the code to add vfs support DataTables does
not load the css or js. As you can see from the below log output, the
properties in wicket-bootstrap load fine, but those from the dataTables do
not.

21:38:23,882 INFO  [wicket-jquery-selectors] (default task-24) try to get
settings, but WicketJquerySelectors wasn't installed to current
application. Fallback to default settings.
21:38:23,920 INFO  [org.apache.wicket.resource.PropertiesFactory] (default
task-24) Loading properties files from
vfs:/home/dbeer/Programs/wildfly-8.1.0.Final/standalone/deployments/Tansu-Web.war/WEB-INF/lib/wicket-bootstrap-extensions-0.9.6-SNAPSHOT.jar/de/agilecoders/wicket/extensions/markup/html/bootstrap/form/fileinput/BootstrapFileInputField.properties
with loader
org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@2a1b9fe6
21:38:24,086 INFO  [org.apache.wicket.resource.PropertiesFactory] (default
task-24) Loading properties files from
vfs:/home/dbeer/Programs/wildfly-8.1.0.Final/standalone/deployments/Tansu-Web.war/WEB-INF/lib/wicket-core-6.17.0-SNAPSHOT.jar/org/apache/wicket/Application.properties
with loader
org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@2a1b9fe6
21:38:24,091 INFO  [org.apache.wicket.resource.PropertiesFactory] (default
task-24) Loading properties files from
vfs:/home/dbeer/Programs/wildfly-8.1.0.Final/standalone/deployments/Tansu-Web.war/WEB-INF/lib/wicket-extensions-6.17.0-SNAPSHOT.jar/org/apache/wicket/extensions/Initializer.properties
with loader
org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@2a1b9fe6
21:38:24,689 WARN
 [org.apache.wicket.request.resource.ResourceReferenceRegistry] (default
task-26) A ResourceReference wont be created for a resource with key
[scope:
de.agilecoders.wicket.webjars.request.resource.WebjarsCssResourceReference;
name: webjars/datatables/null/css/jquery.dataTables.css; locale: null;
style: null; variation: null] because it cannot be located.
21:38:24,695 WARN
 [org.apache.wicket.request.resource.ResourceReferenceRegistry] (default
task-27) A ResourceReference wont be created for a resource with key
[scope:
de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
name: webjars/datatables/null/js/jquery.dataTables.js; locale: null; style:
null; variation: null] because it cannot be located.


If I add back the code as follows:

WebjarsSettings settings = new WebjarsSettings();

// register vfs collector to use webjars on jboss (you don't need
to add maven dependency)
SetAssetPathCollector collectors =
Sets.newHashSet(settings.assetPathCollectors());
collectors.add(new VfsJarAssetPathCollector());
settings.assetPathCollectors(collectors.toArray(new
AssetPathCollector[collectors.size()]));
WicketWebjars.install(this, settings);

All seems to work fine.


On 28 August 2014 21:23, Martin Grigorov mgrigo...@apache.org wrote:

 Hi David,

 But you use Wicket Bootstrap already, no ?
 It uses Webjars a lot.
 Why do you face the VFS issue now ?

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov


 On Thu, Aug 28, 2014 at 11:20 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi All
 
  Got it to work after stumbling across the section on the wicket-webjars
  github page about adding the settings for vfs.
 
  Thanks
 
  David
 
 
  On 28 August 2014 21:13, David Beer david.m.b...@gmail.com wrote:
 
  Hi Martin
 
  Thanks for the updated DataTables in wicketstuff, this works well under
  tomcat, but deployed on wildfly I get the following error still.
 
  20:59:56,175 WARN
   [org.apache.wicket.request.resource.ResourceReferenceRegistry] (default
  task-22) A ResourceReference wont be created for a resource with key
  [scope:
 
 de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
  name: webjars/datatables/null/js/jquery.dataTables.js; locale: null;
 style:
  null; variation: null] because it cannot be located.
 
 
  Any thought or help is much appreciated. This is the webjars
  initialisation output.
 
  [wicket-webjars] (default task-1) initialize wicket webjars with given
  settings: WebjarsSettings{readFromCacheTimeout=3 seconds,
  resourceStreamProvider=ClassLoader, recentVersionPlaceHolder='current',
 
 assetPathCollectors=[de.agilecoders.wicket.webjars.collectors.FileAssetPathCollector@6bdf16ff
 ,
  de.agilecoders.wicket.webjars.collectors.JarAssetPathCollector@35ef6ad
 ],
  webjarsPackage='META-INF.resources.webjars',
  webjarsPath='META-INF/resources/webjars', resourcePattern=.*,
  webjarsPathPattern=/webjars/([^/]*)/([^/]*)/(.*), useCdnResources=false,
  cdnUrl='//cdn.jsdelivr.net:80'}
 
 
  ​
 
 
  On 26 August 2014 19:36, Martin Grigorov mgrigo...@apache.org wrote:
 
  wicket-6.x is the exact name of the branch
  a PR to master is also welcome! Otherwise I'll try to cherry-pick it
  (sometimes this doesn't

Re: DataTables Webjars Error

2014-08-26 Thread David Beer
Hi Martin

I am using the DataTables module from wicketstuff. I am simply installing
webjars with WicketWebjars.install(this);

This where the reference is made to the DataTables css file,
https://github.com/wicketstuff/core/blob/core-6.16.0/jdk-1.6-parent/datatables-parent/datatables/src/main/java/org/wicketstuff/datatables/DataTablesCssReference.java

javascript reference is the same.

I have simply copied the example code.

Thanks

David


On 26 August 2014 18:02, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 How do you use the webjar ?
 Show us the code of the resource reference's constructor.

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov


 On Mon, Aug 25, 2014 at 9:37 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi All
 
  I am trying to use DataTables from wicketstuff in order to see if it will
  fit my requirements. However I am getting the following error.
 
  19:34:16,427 WARN
   [org.apache.wicket.request.resource.ResourceReferenceRegistry] (default
  task-22) A ResourceReference wont be created for a resource with key
  [scope:
 
 
 de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
  name: webjars/datatables/null/media/js/jquery.dataTables.js; locale:
 null;
  style: null; variation: null] because it cannot be located.
 
  I am using wildfly 8.1.0, and happend to be using wicket-bootstrap, that
  works fine.
 
  Any Ideas.
 
  Thanks
 
  David
 



Re: DataTables Webjars Error

2014-08-26 Thread David Beer
Hi Martin

Thanks for spotting that will have a look. PR against 6.0x branch?

Thanks

David



On 26 August 2014 19:15, Martin Grigorov mgrigo...@apache.org wrote:

 OK.

 I see 1.10.2 has changed the way it packs the css/js resources - there is
 no 'media' folder anymore.
 Please try it and send Pull Request if it works.
 Thanks!

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov


 On Tue, Aug 26, 2014 at 9:10 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi Martin
 
  I am using the DataTables module from wicketstuff. I am simply installing
  webjars with WicketWebjars.install(this);
 
  This where the reference is made to the DataTables css file,
 
 
 https://github.com/wicketstuff/core/blob/core-6.16.0/jdk-1.6-parent/datatables-parent/datatables/src/main/java/org/wicketstuff/datatables/DataTablesCssReference.java
 
  javascript reference is the same.
 
  I have simply copied the example code.
 
  Thanks
 
  David
 
 
  On 26 August 2014 18:02, Martin Grigorov mgrigo...@apache.org wrote:
 
   Hi,
  
   How do you use the webjar ?
   Show us the code of the resource reference's constructor.
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
  
   On Mon, Aug 25, 2014 at 9:37 PM, David Beer david.m.b...@gmail.com
   wrote:
  
Hi All
   
I am trying to use DataTables from wicketstuff in order to see if it
  will
fit my requirements. However I am getting the following error.
   
19:34:16,427 WARN
 [org.apache.wicket.request.resource.ResourceReferenceRegistry]
  (default
task-22) A ResourceReference wont be created for a resource with key
[scope:
   
   
  
 
 de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
name: webjars/datatables/null/media/js/jquery.dataTables.js; locale:
   null;
style: null; variation: null] because it cannot be located.
   
I am using wildfly 8.1.0, and happend to be using wicket-bootstrap,
  that
works fine.
   
Any Ideas.
   
Thanks
   
David
   
  
 



DataTables Webjars Error

2014-08-25 Thread David Beer
Hi All

I am trying to use DataTables from wicketstuff in order to see if it will
fit my requirements. However I am getting the following error.

19:34:16,427 WARN
 [org.apache.wicket.request.resource.ResourceReferenceRegistry] (default
task-22) A ResourceReference wont be created for a resource with key
[scope:
de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
name: webjars/datatables/null/media/js/jquery.dataTables.js; locale: null;
style: null; variation: null] because it cannot be located.

I am using wildfly 8.1.0, and happend to be using wicket-bootstrap, that
works fine.

Any Ideas.

Thanks

David


Properties Override

2014-08-11 Thread David Beer
Hi All

I am trying to change some values specified in a properties file for a
third party component. The component is part of the wicket-bootstrap
project and specifies some value read from a properties file. I would like
to override these values from my application, where my panel calls the
component from. What is the best way of doing this I have tried adding a
properties file the same name as my my panel and adding the values. But I
am not having much luck getting them to override the values.

Any suggestions most hopeful.

Thanks

David


Re: Properties Override

2014-08-11 Thread David Beer
Hi Martin

My properties file is named ProfileImageUploadPanel.properties same as the
the java class except for the extension. In the Java class I reference the
FileInput widget which contains the values I need to overide. The contents
of my properties file is as follows:

browseLabel=Browse

browseLabel being the property I wish to override. As you can see from the
below screen shot the value is still the Original Text. There should be no
elipse at the end.





On 11 August 2014 16:22, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 What you explained should work.
 Give us more details to see what went wrong.

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov


 On Mon, Aug 11, 2014 at 5:16 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi All
 
  I am trying to change some values specified in a properties file for a
  third party component. The component is part of the wicket-bootstrap
  project and specifies some value read from a properties file. I would
 like
  to override these values from my application, where my panel calls the
  component from. What is the best way of doing this I have tried adding a
  properties file the same name as my my panel and adding the values. But I
  am not having much luck getting them to override the values.
 
  Any suggestions most hopeful.
 
  Thanks
 
  David
 



Re: Properties Override

2014-08-11 Thread David Beer
Nope. Just add the properties like I did with a validator.


On 11 August 2014 17:27, Martin Grigorov mgrigo...@apache.org wrote:

 Do you set the i18n value in FileInputConfig ?

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov


 On Mon, Aug 11, 2014 at 6:07 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi Martin
 
  My properties file is named ProfileImageUploadPanel.properties same as
 the
  the java class except for the extension. In the Java class I reference
 the
  FileInput widget which contains the values I need to overide. The
 contents
  of my properties file is as follows:
 
  browseLabel=Browse
 
  browseLabel being the property I wish to override. As you can see from
 the
  below screen shot the value is still the Original Text. There should be
 no
  elipse at the end.
 
 
 
 
 
  On 11 August 2014 16:22, Martin Grigorov mgrigo...@apache.org wrote:
 
   Hi,
  
   What you explained should work.
   Give us more details to see what went wrong.
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
  
   On Mon, Aug 11, 2014 at 5:16 PM, David Beer david.m.b...@gmail.com
   wrote:
  
Hi All
   
I am trying to change some values specified in a properties file for
 a
third party component. The component is part of the wicket-bootstrap
project and specifies some value read from a properties file. I would
   like
to override these values from my application, where my panel calls
 the
component from. What is the best way of doing this I have tried
 adding
  a
properties file the same name as my my panel and adding the values.
  But I
am not having much luck getting them to override the values.
   
Any suggestions most hopeful.
   
Thanks
   
David
   
  
 



Re: Wicket / WildFly 8: Log4J / SLF4J ?

2014-08-08 Thread David Beer
Hi Guys

Thought I would chime in here. I have been using Wildfly 8 for a long time
developing wicket Apps. By default all logging goes to the standard out
log, I have changed nothing different and get the Wicket logged errors
there, I also currently use the java Logger as still in development but
will switch to log4j later.

As for custom modules for drivers for databases I use a postgresql driver
and connection. I simply created a module under the modules directory
modules/system/layers/base/org/postgresql/main/ and then added a module.xml
file and the postgresql jar. Then added the data source in the
standalone/configuration/standalone.xml file. I then created a new database
connection and setup pooling and connect my JPA persistence that way.

Copy of my standalone.xml snippet for data source.

subsystem xmlns=urn:jboss:domain:datasources:2.0
datasources
datasource jndi-name=java:jboss/datasources/ExampleDS
pool-name=ExampleDS enabled=true use-java-context=true

connection-urljdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE/connection-url
driverh2/driver
security
user-namesa/user-name
passwordsa/password
/security
/datasource
datasource jta=false
jndi-name=java:jboss/datasources/PostgreSQLDS pool-name=PostgreSQL
enabled=true use-ccm=false
connection-urlxx/connection-url
driver-classorg.postgresql.Driver/driver-class
driverpostgresql/driver
security
user-name/user-name
passwordx/password
/security
validation
validate-on-matchfalse/validate-on-match
background-validationfalse/background-validation
/validation
statement

share-prepared-statementsfalse/share-prepared-statements
/statement
/datasource
drivers
driver name=h2 module=com.h2database.h2

xa-datasource-classorg.h2.jdbcx.JdbcDataSource/xa-datasource-class
/driver
driver name=postgresql module=org.postgresql

xa-datasource-classorg.postgresql.xa.PGXADataSource/xa-datasource-class
/driver
/drivers
/datasources
/subsystem

I hope this helps plus I am currently using 8.1.0.Final but this all worked
with 8.0.0.Final. I also use a jboss-deployment-structure.xml file to
enable and disable specifc modules. This file must go in the correct
location, for WAR it is in WEB-INF directory.

I hope this helps if you have any other questions feel free to ask.

David



On 8 August 2014 14:08, Stefan Lindner stefan.lind...@visionet.de wrote:

 Hi Sebastien,

 just a few final words abot my Wildfly experiences.

 1. Any jar file that you want to use in your applicationsmust be defined
 as a module in subfolder modules. If you want to use an oracle driver
 this must be a module
 2. Modules that use other modules define this dependencies in their
 module.xml file e.g.

 ?xml version=1.0 encoding=UTF-8?

 module xmlns=urn:jboss:module:1.1 name=de.my.module
   resources
 resource-root path=my-module.jar/
   /resources
   dependencies
 module name=javax.persistence.api/
 module name=com.ingres/
 module name=de.visionet.javalib/
 module name=org.slf4j export=true/
 module name=org.slf4j.impl export=true/
 module name=org.slf4j.jcl-over-slf4j export=true/
 module name=org.apache.log4j export=true/

 system export=true
 paths
 path name=javax/naming/
 path name=javax/sql/
 path name=com/sun/proxy/
 /paths
 /system

   /dependencies
 /module

 3. Using a module like the above one in a deployes JAR/EAR or WAR needs
 the Dependencies=de.my.module specification
 4. modules with export=true are inherited by the JAR/EAR or WAR

 Now I think you have wicket.jar inside your WEB-INF/lib folder inside of
 your application.war file.
 Such jar files are available to your app without defining them as a module.

 But I don't know if e.g. wicket.jar needs a Dependencies=org.apache.log4j
 etc specification in it's MANIFEST.MF to have access tot he logging
 system. I did not try this.

 Mit freundlichen Grüßen
 ---
 Stefan Lindner, Visionet Hard- und Software GmbH, Karolinenstraße 52b,
 90763 Fürth
 Durchwahl: Tel.: 0911/148894-10, FAX: 0911-148894-11, E-Mail:
 stefan.lind...@visionet.de
 Zentrale: Tel.: 0911/148894-0, FAX: 0911-148894-99, Internet:
 http://www.visionet.de
 Registergericht Fürth: HRB 6573, Geschäftsführer: Stefan Lindner


 -Ursprüngliche Nachricht-
 Von: Sebastien [mailto:seb...@gmail.com]
 Gesendet: Freitag

Re: Wicket / WildFly 8: Log4J / SLF4J ?

2014-08-08 Thread David Beer
Hi Sebastien

You get no log messages at to standalone/log/server.log file. If not I
would suggest posting to the Wildfly forum or taking a visit to there IRC
channel. The server.log file should receive all logging unless configured
not to. I assume you have seen this document
https://docs.jboss.org/author/display/WFLY8/Logging+Configuration or this
https://docs.jboss.org/author/display/WFLY8/How+To#HowTo-HowdoIuselog4j.propertiesorlog4j.xmlinsteadofusingtheloggingsubsystemconfiguration%3F

To me it would sound like a Wildfly or JBoss issue.


On 8 August 2014 16:01, Sebastien seb...@gmail.com wrote:

 Hi Stefan, David, Martin,

 Well, I agree about modules, I did it for oracle-db drivers.
 About slf4j, the module/jar already exists in the server
 (modules\system\layers\base\org\slf4j) so no need to declare it, I also
 agree.

 I am currently wondering if the transitive dependency from wicket to
 slf4j-api does not shortcut the jboss one (slf4j-api-1.7.2.jbossorg-1.jar),
 still testing...
 Also a strange thing, there is no log4j jar in
 modules\system\layers\base\org\apache\log4j\main...
 Even more strange (I forgot I did the test, sorry): even a sysout or a JUL
 logger info does *not* work!... (and my ear/war is deployed, up and running
 of course)

 If it is working for you both and not for me and Martin, that's means there
 should be kind of switch/hint that solve the issue! (in the meanwhile, it's
 a nightmare)

 Thanks for your help anyway,
 Sebastien



 On Fri, Aug 8, 2014 at 4:41 PM, David Beer david.m.b...@gmail.com wrote:

  Hi Guys
 
  Thought I would chime in here. I have been using Wildfly 8 for a long
 time
  developing wicket Apps. By default all logging goes to the standard out
  log, I have changed nothing different and get the Wicket logged errors
  there, I also currently use the java Logger as still in development but
  will switch to log4j later.
 
  As for custom modules for drivers for databases I use a postgresql driver
  and connection. I simply created a module under the modules directory
  modules/system/layers/base/org/postgresql/main/ and then added a
 module.xml
  file and the postgresql jar. Then added the data source in the
  standalone/configuration/standalone.xml file. I then created a new
 database
  connection and setup pooling and connect my JPA persistence that way.
 
  Copy of my standalone.xml snippet for data source.
 
  subsystem xmlns=urn:jboss:domain:datasources:2.0
  datasources
  datasource jndi-name=java:jboss/datasources/ExampleDS
  pool-name=ExampleDS enabled=true use-java-context=true
 
 
 
 connection-urljdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE/connection-url
  driverh2/driver
  security
  user-namesa/user-name
  passwordsa/password
  /security
  /datasource
  datasource jta=false
  jndi-name=java:jboss/datasources/PostgreSQLDS pool-name=PostgreSQL
  enabled=true use-ccm=false
  connection-urlxx/connection-url
  driver-classorg.postgresql.Driver/driver-class
  driverpostgresql/driver
  security
  user-name/user-name
  passwordx/password
  /security
  validation
  validate-on-matchfalse/validate-on-match
 
  background-validationfalse/background-validation
  /validation
  statement
 
  share-prepared-statementsfalse/share-prepared-statements
  /statement
  /datasource
  drivers
  driver name=h2 module=com.h2database.h2
 
  xa-datasource-classorg.h2.jdbcx.JdbcDataSource/xa-datasource-class
  /driver
  driver name=postgresql module=org.postgresql
 
 
 xa-datasource-classorg.postgresql.xa.PGXADataSource/xa-datasource-class
  /driver
  /drivers
  /datasources
  /subsystem
 
  I hope this helps plus I am currently using 8.1.0.Final but this all
 worked
  with 8.0.0.Final. I also use a jboss-deployment-structure.xml file to
  enable and disable specifc modules. This file must go in the correct
  location, for WAR it is in WEB-INF directory.
 
  I hope this helps if you have any other questions feel free to ask.
 
  David
 
 
 
  On 8 August 2014 14:08, Stefan Lindner stefan.lind...@visionet.de
 wrote:
 
   Hi Sebastien,
  
   just a few final words abot my Wildfly experiences.
  
   1. Any jar file that you want to use in your applicationsmust be
 defined
   as a module in subfolder modules. If you want to use an oracle driver
   this must be a module
   2. Modules that use other modules define this dependencies in their
   module.xml file e.g.
  
   ?xml version=1.0 encoding

Re: Displaying Images Stored in DB on Openshift

2014-07-14 Thread David Beer
Hi Martin

Thanks for your reply. Attaching a debugger is really easy with OpenShift
and is what I did. I was able to see that storing the file was in fact
producing the wrong set of image bytes, hibernate postgresql issue. Once
fixed I was able to check the file and image properly. All seemed to work
so randomly I cleared the browser cache and all works well. Is there a way
to stop the browser caching the images if I wanted to?

Thanks

David


On 14 July 2014 08:41, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 Is it possible to attach remote debugger to OpenShift and see what happens
 ?
 If it is not possible then add some logging statements and see what is
 returned from the DB (byte[]) and whether Wicket creates a proper
 BufferedImage, whether it is written down in the resource's WriteCallback,
 etc.

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov


 On Sun, Jul 13, 2014 at 11:16 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi Guys
 
  After some more trial and error and research I have got the image to
 store
  properly and write back out a valid image using BufferedImage and
 ImageIO.
  However I am still not able to display the image. I just get the picture
  symbol and he link looks like img alt=
  src=./account?12-IResourceListener-profileImage.
 
  The code used is as follows:
 
  BufferedDynamicImageResource bufferedDynamicImageResource = new
  BufferedDynamicImageResource(jpeg);
  bufferedDynamicImageResource.setImage(image);
  Image proImage = new Image(profileImage, bufferedDynamicImageResource);
  add(proImage);
 
  Where image is a BufferedImage. The file command outputs the following.
 
  I am running Wildfly 8.1.0. Any suggestions .
 
  Thanks
 
  David
 
 
  On 7 July 2014 21:18, David Beer david.m.b...@gmail.com wrote:
 
   Hi All
  
   I am developing and application that is running on openshift. The
   application is still in heavy development, using wicket 6.14 at the
  moment.
   I am running Wildlfy 8.1.0 and testing locally.
  
   The problem I am facing is simply that the images that I am storing are
   not being displayed on Openshift but work fine locally. I am retrieving
  the
   image as a byte[] from the database and then displaying the Image.
  
   I have tried using a simple ByteArray Resource like the following:
  
   ThumbnailImageResource imageResource = new ThumbnailImageResource(new
   ByteArrayResource(image/jpeg,
 userAccount.getProfileimage().getFile()),
   150);
   Image profileImage = new Image(profileImage,
  imageResource);
   add(profileImage);
  
   However on Openshift the image does not display. There is no error
 logged
   just no image and the resource link does not seem to work either.
  
   Any thoughts would be most helpful.
  
   Thanks
  
   David
  
 



Re: Displaying Images Stored in DB on Openshift

2014-07-13 Thread David Beer
Hi Guys

After some more trial and error and research I have got the image to store
properly and write back out a valid image using BufferedImage and ImageIO.
However I am still not able to display the image. I just get the picture
symbol and he link looks like img alt=
src=./account?12-IResourceListener-profileImage.

The code used is as follows:

BufferedDynamicImageResource bufferedDynamicImageResource = new
BufferedDynamicImageResource(jpeg);
bufferedDynamicImageResource.setImage(image);
Image proImage = new Image(profileImage, bufferedDynamicImageResource);
add(proImage);

Where image is a BufferedImage. The file command outputs the following.

I am running Wildfly 8.1.0. Any suggestions .

Thanks

David


On 7 July 2014 21:18, David Beer david.m.b...@gmail.com wrote:

 Hi All

 I am developing and application that is running on openshift. The
 application is still in heavy development, using wicket 6.14 at the moment.
 I am running Wildlfy 8.1.0 and testing locally.

 The problem I am facing is simply that the images that I am storing are
 not being displayed on Openshift but work fine locally. I am retrieving the
 image as a byte[] from the database and then displaying the Image.

 I have tried using a simple ByteArray Resource like the following:

 ThumbnailImageResource imageResource = new ThumbnailImageResource(new
 ByteArrayResource(image/jpeg, userAccount.getProfileimage().getFile()),
 150);
 Image profileImage = new Image(profileImage, imageResource);
 add(profileImage);

 However on Openshift the image does not display. There is no error logged
 just no image and the resource link does not seem to work either.

 Any thoughts would be most helpful.

 Thanks

 David



Displaying Images Stored in DB on Openshift

2014-07-07 Thread David Beer
Hi All

I am developing and application that is running on openshift. The
application is still in heavy development, using wicket 6.14 at the moment.
I am running Wildlfy 8.1.0 and testing locally.

The problem I am facing is simply that the images that I am storing are not
being displayed on Openshift but work fine locally. I am retrieving the
image as a byte[] from the database and then displaying the Image.

I have tried using a simple ByteArray Resource like the following:

ThumbnailImageResource imageResource = new ThumbnailImageResource(new
ByteArrayResource(image/jpeg, userAccount.getProfileimage().getFile()),
150);
Image profileImage = new Image(profileImage, imageResource);
add(profileImage);

However on Openshift the image does not display. There is no error logged
just no image and the resource link does not seem to work either.

Any thoughts would be most helpful.

Thanks

David


Re: Conditional input types

2014-05-19 Thread David Beer
If you go direct to the Packt website you can by the book in many different
formats including, kindle, ePub and PDF. A really useful book.


On 19 May 2014 13:41, david.latan valentin.rob...@gmx.com wrote:

 well the book seems great, unfortunatly google doesn't share the pages that
 are usefull, and the book isn't available as an e-book.
 I can't wait too long, so sadly this doesn't help me too much.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Conditional-input-types-tp4665924p4665935.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Wicket CDI application junit test

2014-04-11 Thread David Beer
Hi

See my earlier thread on CDI 1.1. A lot the problems related to 1.1 come
from not setting your beans.xml file up correctly for your environment. In
General CDI 1.0 is for EE 6 and 1.1 is for EE 7. This is why 1.0 has
dificulties with GF 4 as it is designed for Java EE 7. If you get a
stacktrace use the first part to search, there are lots of answers out
there. 1.1 is quite different.


On 11 April 2014 10:31, Duke warlock9...@gmail.com wrote:

 Thanks, Stephan. I will try to use DeltaSpike with wicket-cdi1.0 in tests.

 PS Maybe using wicket-cdi1.1 version will be more easy and it will not need
 any additional libraries?
 PPS I don't understand about wicket-cdi 1.1 version. Will it work correctly
 with glassfish 4.0? I tryed cdi1.0, but it don't work. Then I found an
 issue
 about this problem.


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-CDI-application-junit-test-tp4665366p4665371.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




FeedbackMessages not appearing on page from panel

2014-04-08 Thread David Beer
Hi All

I have a panel which is added to my page which has contained form which is
used to update users password. All is good here, when the user submits the
form using AjaxButton it goes through the process and gets to the from
submit ok. If everything is valid it updates data fine at which point I am
trying to display a feedbask message on the underlying page. However the
feedback message never appears.

I am using the wicket-bootstrap NotificationPanel and everything is set as
follows.

UserAccountPage

{
feedback = new NotificationPanel(feedback);
feedback.hideAfter(Duration.seconds(2));
feedback.setOutputMarkupId(true);
add(feedback);
}

Ajax Submit Code on Panel:

protected void onSubmit(AjaxRequestTarget target, Form? form) {
target.add(notificationPanel);
target.add(((UserAccountPage) this.getPage()).feedback);
}

So that the feedback panel is added to the Ajax Target.

The form Submit code on the panel:

((UserAccountPage) this.getPage()).feedback.success(Password successfully
updated);
setResponsePage(UserAccountPage.class);

Any ideas as to why the feedback panel is not displaying the message.

Thanks

David


Re: FeedbackMessages not appearing on page from panel

2014-04-08 Thread David Beer
I am actually reloading the same page, due to making sure that the forms
are reset correctly and the associated data. How do you mean via the
session? is it just as possible to send them using PageParameters and
interpret them in the constructor and then add the message to the feedback.

David


On 8 April 2014 13:40, Ernesto Reinaldo Barreiro reier...@gmail.com wrote:

 You are jumping to a new page? Not sure but you might have to pass messages
 via session.


 On Tue, Apr 8, 2014 at 2:36 PM, David Beer david.m.b...@gmail.com wrote:

  Hi All
 
  I have a panel which is added to my page which has contained form which
 is
  used to update users password. All is good here, when the user submits
 the
  form using AjaxButton it goes through the process and gets to the from
  submit ok. If everything is valid it updates data fine at which point I
 am
  trying to display a feedbask message on the underlying page. However the
  feedback message never appears.
 
  I am using the wicket-bootstrap NotificationPanel and everything is set
 as
  follows.
 
  UserAccountPage
 
  {
  feedback = new NotificationPanel(feedback);
  feedback.hideAfter(Duration.seconds(2));
  feedback.setOutputMarkupId(true);
  add(feedback);
  }
 
  Ajax Submit Code on Panel:
 
  protected void onSubmit(AjaxRequestTarget target, Form? form) {
  target.add(notificationPanel);
  target.add(((UserAccountPage) this.getPage()).feedback);
  }
 
  So that the feedback panel is added to the Ajax Target.
 
  The form Submit code on the panel:
 
  ((UserAccountPage) this.getPage()).feedback.success(Password
 successfully
  updated);
  setResponsePage(UserAccountPage.class);
 
  Any ideas as to why the feedback panel is not displaying the message.
 
  Thanks
 
  David
 



 --
 Regards - Ernesto Reinaldo Barreiro



Re: FeedbackMessages not appearing on page from panel

2014-04-08 Thread David Beer
Hi Martin/Ernesto

Thanks for this it worked brilliantly.

Thanks

David


On 8 April 2014 15:08, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 getSession().success(...)

 Martin Grigorov
 Wicket Training and Consulting


 On Tue, Apr 8, 2014 at 5:05 PM, David Beer david.m.b...@gmail.com wrote:

  I am actually reloading the same page, due to making sure that the forms
  are reset correctly and the associated data. How do you mean via the
  session? is it just as possible to send them using PageParameters and
  interpret them in the constructor and then add the message to the
 feedback.
 
  David
 
 
  On 8 April 2014 13:40, Ernesto Reinaldo Barreiro reier...@gmail.com
  wrote:
 
   You are jumping to a new page? Not sure but you might have to pass
  messages
   via session.
  
  
   On Tue, Apr 8, 2014 at 2:36 PM, David Beer david.m.b...@gmail.com
  wrote:
  
Hi All
   
I have a panel which is added to my page which has contained form
 which
   is
used to update users password. All is good here, when the user
 submits
   the
form using AjaxButton it goes through the process and gets to the
 from
submit ok. If everything is valid it updates data fine at which
 point I
   am
trying to display a feedbask message on the underlying page. However
  the
feedback message never appears.
   
I am using the wicket-bootstrap NotificationPanel and everything is
 set
   as
follows.
   
UserAccountPage
   
{
feedback = new NotificationPanel(feedback);
feedback.hideAfter(Duration.seconds(2));
feedback.setOutputMarkupId(true);
add(feedback);
}
   
Ajax Submit Code on Panel:
   
protected void onSubmit(AjaxRequestTarget target, Form? form) {
target.add(notificationPanel);
target.add(((UserAccountPage)
  this.getPage()).feedback);
}
   
So that the feedback panel is added to the Ajax Target.
   
The form Submit code on the panel:
   
((UserAccountPage) this.getPage()).feedback.success(Password
   successfully
updated);
setResponsePage(UserAccountPage.class);
   
Any ideas as to why the feedback panel is not displaying the message.
   
Thanks
   
David
   
  
  
  
   --
   Regards - Ernesto Reinaldo Barreiro
  
 



Re: Wicket CDI 1.1

2014-04-07 Thread David Beer
Hi Edmund

Thanks for the info. It appears the problem spanned further down to the
library I am using. This was more related to Apache Shiro not being CDI
aware. In the end I followed this post StackOverflow
http://stackoverflow.com/questions/15605038/unable-to-inject-my-dao-in-a-custom-apache-shiro-authorizingrealm.
I have just confirmed that this works as described.

Wicket CDI works well in injecting values to my components including pages
and panels. Thanks for the tip about NonContextual.of() method that is good
to know.

Thanks

David


On 7 April 2014 14:36, Emond Papegaaij emond.papega...@gmail.com wrote:

 Did you migrate to wicket-cdi-1.1? To inject a non-managed class, use
 NonContextual.of(MyClass.class).inject(instance). Components, however, are
 injected by wicket-cdi itself. You should not need to inject those
 manually.

 Best regards,
 Emond
 Op 4 apr. 2014 20:54 schreef David Beer david.m.b...@gmail.com:

  Hi All
 
  I am in the process of moving my application to JavaEE7 and CDI 1.1.
 Things
  are going well all except for some CDI values. I have an @Stateless
 Session
  bean used for my DAO which I then Inject into various classes. The issue
 I
  have is that some of the classes don't get the reference Injected
 properly
  and give a NPE. With wicket CDI I was able to call
  CdiContainer.get().getNonContextualManager().inject(this); to Inject the
  reference properly.
 
  I know CDI 1.1 is different but I can't work out how to Inject the
  Component with Wicket CDI 1.1?
 
  Here is the code in my WicketApplication init():
 
   new CdiConfiguration().setPropagation(NONE).configure(this);
 
  Thanks
 
  David
 



Wicket CDI 1.1

2014-04-04 Thread David Beer
Hi All

I am in the process of moving my application to JavaEE7 and CDI 1.1. Things
are going well all except for some CDI values. I have an @Stateless Session
bean used for my DAO which I then Inject into various classes. The issue I
have is that some of the classes don't get the reference Injected properly
and give a NPE. With wicket CDI I was able to call
CdiContainer.get().getNonContextualManager().inject(this); to Inject the
reference properly.

I know CDI 1.1 is different but I can't work out how to Inject the
Component with Wicket CDI 1.1?

Here is the code in my WicketApplication init():

 new CdiConfiguration().setPropagation(NONE).configure(this);

Thanks

David


Re: Adding/Remiving Panels

2014-04-02 Thread David Beer
/allowed

How can I re-enable the component.

Thanks

David




On 1 April 2014 12:37, David Beer david.m.b...@gmail.com wrote:

 Hi Martin

 Thanks for your information here. So if I had a page which extends from a
 base page and adds the header footer, then added the content which is
 basically two column, in order to use a menu on the left to change some of
 the content on the right I could use a combination of Ajax to swap the
 content.

 Thanks

 David



 On 1 April 2014 08:04, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,


 On Mon, Mar 31, 2014 at 1:53 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi All
 
  I am in the process of building a user account page, which will have a
 menu
  on the left, and the related content on the right.
 
  I would like the content on the right to be swapped depending on the
  selection on the left. As in the content on the right might well be
  generated by panels or fragments and then added to the page and the
  previous unrelated removed.
 
  Is it better to have all the code added to the html and then hide
 certain
  components and then re-enable them on selection and disable them or is
 it
  better to use a panels and a page hierarchy and to pass information
 between
  panels and parent page.
 

 In my experience I have preferred the second approach - a mix of pages and
 panels.
 If you want to replace the right part with Ajax then you need to replace
 panels.
 If Ajax is not required then you can show a sub page that inherits the
 base
 layout from a main page and has something custom in the right part.


 
  Any thoughts and examples are always appreciated.
 
  Thanks
 
  David
 





Re: Adding/Remiving Panels

2014-04-02 Thread David Beer
Hi I have fixed the problem by adding setOutputMarkupPlaceholderTag(true);
to the top component.

Thanks

David


On 2 April 2014 18:55, David Beer david.m.b...@gmail.com wrote:

 Hi

 I am able to remove the panel by accessing the top most component (form)
 and setting visible to false. This removes the panel from the page, however
 I am having difficulty adding the panel back to the page. I get and Ajax
 error saying component id can't be found.

 The source is availble here
 https://github.com/dmbeer/wicket-bootstrap-example/tree/master/src/main/java/exampleUserAccountPage
  and the Panel's there.

 The Wicket Ajax Debug Content is as follows;

 *INFO: *Received ajax response (1570 characters)
 *INFO: *

 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=form1c 
 ![CDATA[]]/componentcomponent id=link_dsiable_password17 ![CDATA[a 
 id=link_dsiable_password17 href=javascript:; class=btn-link  btn
 Enable Password Panel

 /a]]/componentheader-contribution encoding=wicket1 
 ![CDATA[head xmlns:wicket=
 http://wicket.apache.org;link rel=stylesheet type=text/css href=//
 netdna.bootstrapcdn.com/bootswatch/3.1.1/spacelab/bootstrap.min.css /
 script type=text/javascript src=
 http://code.jquery.com/jquery-1.11.0.min.js;/script

 script type=text/javascript 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js/script

 script type=text/javascript 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-1392391424000.js/script

 script type=text/javascript 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug-ver-1392391424000.js/script
 script type=text/javascript id=wicket-ajax-debug-enable
 /*![CDATA[*/
 Wicket.Ajax.DebugWindow.enabled=true;
 /*]^]^*/
 /script
 script type=text/javascript id=wicket-ajax-base-url
 /*![CDATA[*/
 Wicket.Ajax.baseUrl=account?1;
 /*]^]^*/
 /script

 /head]]/header-contributionevaluate![CDATA[(function(){Wicket.Ajax.ajax({u:./account?1-1.IBehaviorListener.0-link~dsiable~password,e:click,c:link_dsiable_password17});})();]]/evaluate/ajax-response
  *INFO: *Response processed successfully.
 *INFO: *refocus last focused component not needed/allowed
 *INFO: *Received ajax response (2916 characters)
 *INFO: *

 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=form1c 
 ![CDATA[form id=form1c method=post 
 action=./account?1-1.IFormSubmitListener-change~password-form 
 class=form-horizontaldiv 
 style=width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hiddeninput
  type=hidden name=form1c_hf_0 id=form1c_hf_0 //div
 div class= form-group
 label class=control-label for=password14Password/label



 input type=password value= 
 name=formGroupPassword:formGroupPassword_body:password id=password14/




 /div
 div class= form-group

 label class=control-label for=confirmPassword15Confirm 
 Password/label



 input type=password value= 
 name=formGroupConfirmPassword:formGroupConfirmPassword_body:confirmPassword 
 id=confirmPassword15/




 /div
 div class= form-group



 div class=col-md-offset-2 col-md-10

 button type=submit class= btn-default btn btn-default 
 btn name=formGroupButton:formGroupButton_body:submit-button 
 id=submit_button16
 Submit
 /button
 /div




 /div

 /form]]/componentcomponent id=link_dsiable_password17 
 ![CDATA[a id=link_dsiable_password17 href=javascript:; class=btn-link 
  btn
 Disable Password Change

 /a]]/componentheader-contribution encoding=wicket1 
 ![CDATA[head xmlns:wicket=
 http://wicket.apache.org;link rel=stylesheet type=text/css href=//
 netdna.bootstrapcdn.com/bootswatch/3.1.1/spacelab/bootstrap.min.css /
 script type=text/javascript src=
 http://code.jquery.com/jquery-1.11.0.min.js;/script

 script type=text/javascript 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js/script

 script type=text/javascript 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-1392391424000.js/script

 script type=text/javascript 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug-ver-1392391424000.js/script
 script type=text/javascript id=wicket-ajax-debug-enable
 /*![CDATA[*/
 Wicket.Ajax.DebugWindow.enabled=true;
 /*]^]^*/
 /script
 script type=text/javascript id=wicket-ajax-base-url
 /*![CDATA[*/
 Wicket.Ajax.baseUrl=account?1;
 /*]^]^*/
 /script

 /head]]/header-contributionevaluate![CDATA[(function(){Wicket.Ajax.ajax({u:./account?1-1.IBehaviorListener.0-link~dsiable~password,e:click,c:link_dsiable_password17});})();]]/evaluate/ajax-response
  *ERROR

Re: Netbeans and Compile On Save

2014-04-01 Thread David Beer
Hi All

I did some further research on this and it very much depends on the
container, and the way that NetBeans IDE interacts with it or deploys the
resulting application. If you search for Compile On Save NetBeans IDE you
will get various hits and results. Some saying it works great for tomcat
and Glassfish but not JBoss containers. I have this working great with
tomcat but not JBoss Containers or wildfly. The problem is that this
NetBeans specific technology and uses the availble connector for deploying
to web container all of them are different.

Thanks

David


On 1 April 2014 08:08, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 Do you experience the same problem with 6.13 ?
 It may be some configuration issue with the way Netbeans deploys the app in
 your preferred web container (Glassfish ?!).
 But it is also possible that Wicket regressed somehow and keeps references
 to classes/class loaders and thus the (un)deployment process cannot do its
 job.

  Martin Grigorov
 Wicket Training and Consulting


 On Thu, Mar 27, 2014 at 5:05 PM, Brad Grier brad.gr...@salusnovus.com
 wrote:

  I used to be able to make code changes in Netbeans, save and test the
  results
  immediately. For some time now, this compile on save functionality no
  longer works unless I first log out of my web app. It seems the session
 is
  invalid after the intermediate compile. I'm getting a
 NoClassDefFoundError
  for the current page  (ultimately originating out of
  DefaultPageFactory.newPage line 65 in wicket 6.14).
 
  I've ignored the problem for awhile now but I'd like to get it resolved.
 If
  I forget to sign out after save, I have to restart the entire application
  to
  continue. Has anyone seen this and found a workaround? I'm using
 Netbeans 8
  but the problem also existed in 7.4.
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Netbeans-and-Compile-On-Save-tp4665159.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: JBoss Forge Plugin

2014-04-01 Thread David Beer
Hi Martin

Thanks for this interesting. JBoss Forge is gaining quite some interest and
rapid development. Especially Forge 2.x https://forge.jboss.org/ a new
website is on the way and is being developed more info on github
https://github.com/forge. The JBoss Forge project is a little bit like
Spring Roo, but much more powerful and goes beyond the initial project
creation stage and allows a lot more.

Forge can be used with a range of Java and other web technologies and
integrates nicely. Lots of different plugins for different frameworks.

I can see JBoss Forge being quite popular, very useful for wicket and
adding component and pages quickly and easily.

Thanks

David


On 1 April 2014 08:54, Martin Grigorov mgrigo...@apache.org wrote:

 Forgot to give you a reference -
 https://www.npmjs.org/package/generator-scalatra
 Scalatra is also Servlet based framework like Wicket. It is written in
 Scala.

 Martin Grigorov
 Wicket Training and Consulting


 On Tue, Apr 1, 2014 at 9:34 AM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  Maybe I am not following the right forums but I think JBoss Forge didn't
  gain much attention.
  I think doing a Yeoman generator for the same tasks + providing setup
  (Grunt/Gulp/Brocolli) for generating JS (from
  CoffeeScript/Dart/TypeScript/...) and CSS (from LESS/SCSS/Stylus/...),
  minification (by using UglifyJS), bundle generation (usemin/useref/...),
  CSS optimization (with UNCSS), etc. would be much cooler.
 
  All this would require writing JavaScript instead of Java but the Node.js
  ecosystem for this kind of tasks is much better than what is available in
  Java.
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Fri, Mar 28, 2014 at 1:20 PM, David Beer david.m.b...@gmail.com
 wrote:
 
  Hi All
 
  I am thinking of creating a JBoss Forge Plugin for wicket. The idea
 being
  that it would help create a  base project with the Filter set the Home
  Page
  and a Base Page to work from. It would also provide the ability to
 create
  a
  new Page which would include creating Java source and HTML, the same
 would
  also be done for creating a panel and other commonly used parts.
 
  What do people think? Any suggestions on Features.
 
  Thanks
 
  David
 
 
 



Re: Adding/Remiving Panels

2014-04-01 Thread David Beer
Hi Martin

Thanks for your information here. So if I had a page which extends from a
base page and adds the header footer, then added the content which is
basically two column, in order to use a menu on the left to change some of
the content on the right I could use a combination of Ajax to swap the
content.

Thanks

David



On 1 April 2014 08:04, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,


 On Mon, Mar 31, 2014 at 1:53 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi All
 
  I am in the process of building a user account page, which will have a
 menu
  on the left, and the related content on the right.
 
  I would like the content on the right to be swapped depending on the
  selection on the left. As in the content on the right might well be
  generated by panels or fragments and then added to the page and the
  previous unrelated removed.
 
  Is it better to have all the code added to the html and then hide certain
  components and then re-enable them on selection and disable them or is it
  better to use a panels and a page hierarchy and to pass information
 between
  panels and parent page.
 

 In my experience I have preferred the second approach - a mix of pages and
 panels.
 If you want to replace the right part with Ajax then you need to replace
 panels.
 If Ajax is not required then you can show a sub page that inherits the base
 layout from a main page and has something custom in the right part.


 
  Any thoughts and examples are always appreciated.
 
  Thanks
 
  David
 



Adding/Remiving Panels

2014-03-31 Thread David Beer
Hi All

I am in the process of building a user account page, which will have a menu
on the left, and the related content on the right.

I would like the content on the right to be swapped depending on the
selection on the left. As in the content on the right might well be
generated by panels or fragments and then added to the page and the
previous unrelated removed.

Is it better to have all the code added to the html and then hide certain
components and then re-enable them on selection and disable them or is it
better to use a panels and a page hierarchy and to pass information between
panels and parent page.

Any thoughts and examples are always appreciated.

Thanks

David


JBoss Forge Plugin

2014-03-28 Thread David Beer
Hi All

I am thinking of creating a JBoss Forge Plugin for wicket. The idea being
that it would help create a  base project with the Filter set the Home Page
and a Base Page to work from. It would also provide the ability to create a
new Page which would include creating Java source and HTML, the same would
also be done for creating a panel and other commonly used parts.

What do people think? Any suggestions on Features.

Thanks

David


Re: Wicket-Bootstrap 0.9.2 js resource not found.

2014-03-21 Thread David Beer
Hi Martin

I have been wondering about switching to 0.9.3-SNAPSHOT, I have a couple of
concerns. This is for 3.1.x and 0.9.2 is for 3.0.x and there is quite a
difference wondering how much I have to change. However the change may be
worth it as twbs seems to moving forward quite fast with 3.1.x. The other
is that the latest code failed to build, and I am not sure how recent the
deployed jars are in maven.

The third is more of a question is there a way of disabling webjars for
bootstrap and using CDN. like 0.9.3-SNAPSHOT does/

Thanks

David


On 21 March 2014 09:40, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 JBoss uses their own virtual file system and I remember it Wicket-Bootstrap
 had problems with it before.
 In 0.9.3-SNAPSHOT it is possible to avoid usage of webjars so I'd recommend
 you to use non-webjars in JBoss from now on.

 https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/337

 Martin Grigorov
 Wicket Training and Consulting


 On Thu, Mar 20, 2014 at 7:52 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi All
 
  I am updating a wicket-bootstrap application from 0.9.0-SNAPSHOT to 0.9.2
  and am getting the following error message logged. I am running JBoss AS
  7.1. None of the js seems to work.
 
  [org.apache.wicket.request.resource.ResourceReferenceRegistry]
  (http--127.0.0.1-8080-5) A ResourceReference wont be created for a
 resource
  with key [scope:
 
 
 de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
  name: webjars/bootstrap/null/js/bootstrap.js; locale: null; style: null;
  variation: null] because it cannot be located.
 
  Page source for js css declarations is as follows:
 
  !DOCTYPE htmlhtml lang=en class=theme-spacelabheadlink
  rel=stylesheet type=text/css
 
 
 href=./wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
  
  /script type=text/javascript
 
 
 src=./wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392391424000.js
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392391424000.js
  /scriptscript
  type=text/javascript
 
 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js
  /script
 meta charset=utf-8titleTansu - File Sharing and
  Storage/titlemeta name=viewport
  content=width=device-width, initial-scale=1.0, maximum-scale=1,
  user-scalable=nometa name=description content=Tansu
  meta name=author content=Copper Arrow Software Services
meta name=X-UA-Compatible content=IE=edge,chrome=1
  link rel=stylesheet href=style.css
  view-source:http://localhost:8080/Tansu/style.css type=text/css
  media=screen title=Stylesheet/script type=text/javascript
 
 
 src=./wicket/resource/de.agilecoders.wicket.core.markup.html.references.JQueryMigrateJavaScriptReference/js/jquery-migrate-1.2.1-ver-139176153.js
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.core.markup.html.references.JQueryMigrateJavaScriptReference/js/jquery-migrate-1.2.1-ver-139176153.js
  /scriptscript
  type=text/javascript id=bootstrap-js defer=defer
 
 
 src=./wicket/resource/de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference/webjars/bootstrap/null/js/bootstrap.js
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference/webjars/bootstrap/null/js/bootstrap.js
  /scriptlink
  rel=stylesheet type=text/css
 
 
 href=./wicket/resource/de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesomeCssReference/css/font-awesome-ver-139176153.css
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesomeCssReference/css/font-awesome-ver-139176153.css
  
  /script type=text/javascript
  /*![CDATA[*/Wicket.Event.add(window, domready, function(event) {
  $('#component39
  .dropdown-toggle').dropdown();;;});/*]]*//script/head
 
  Any Thoughts or help on this is much appreciated.
 



Re: Wicket-Bootstrap 0.9.2 js resource not found.

2014-03-21 Thread David Beer
I have decided to switch to 0.9.3-SNAPSHOT after getting latest code to
build. Will work on migrating to 3.1 and see if that helps.

Thanks

David


On 21 March 2014 11:43, David Beer david.m.b...@gmail.com wrote:

 Hi Martin

 I have been wondering about switching to 0.9.3-SNAPSHOT, I have a couple
 of concerns. This is for 3.1.x and 0.9.2 is for 3.0.x and there is quite a
 difference wondering how much I have to change. However the change may be
 worth it as twbs seems to moving forward quite fast with 3.1.x. The other
 is that the latest code failed to build, and I am not sure how recent the
 deployed jars are in maven.

 The third is more of a question is there a way of disabling webjars for
 bootstrap and using CDN. like 0.9.3-SNAPSHOT does/

 Thanks

 David


 On 21 March 2014 09:40, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 JBoss uses their own virtual file system and I remember it
 Wicket-Bootstrap
 had problems with it before.
 In 0.9.3-SNAPSHOT it is possible to avoid usage of webjars so I'd
 recommend
 you to use non-webjars in JBoss from now on.

 https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/337

 Martin Grigorov
 Wicket Training and Consulting


 On Thu, Mar 20, 2014 at 7:52 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi All
 
  I am updating a wicket-bootstrap application from 0.9.0-SNAPSHOT to
 0.9.2
  and am getting the following error message logged. I am running JBoss AS
  7.1. None of the js seems to work.
 
  [org.apache.wicket.request.resource.ResourceReferenceRegistry]
  (http--127.0.0.1-8080-5) A ResourceReference wont be created for a
 resource
  with key [scope:
 
 
 de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
  name: webjars/bootstrap/null/js/bootstrap.js; locale: null; style: null;
  variation: null] because it cannot be located.
 
  Page source for js css declarations is as follows:
 
  !DOCTYPE htmlhtml lang=en class=theme-spacelabheadlink
  rel=stylesheet type=text/css
 
 
 href=./wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
  
  /script type=text/javascript
 
 
 src=./wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392391424000.js
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392391424000.js
  /scriptscript
  type=text/javascript
 
 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js
  /script
 meta charset=utf-8titleTansu - File Sharing and
  Storage/titlemeta name=viewport
  content=width=device-width, initial-scale=1.0, maximum-scale=1,
  user-scalable=nometa name=description content=Tansu
  meta name=author content=Copper Arrow Software Services
meta name=X-UA-Compatible content=IE=edge,chrome=1
  link rel=stylesheet href=style.css
  view-source:http://localhost:8080/Tansu/style.css type=text/css
  media=screen title=Stylesheet/script type=text/javascript
 
 
 src=./wicket/resource/de.agilecoders.wicket.core.markup.html.references.JQueryMigrateJavaScriptReference/js/jquery-migrate-1.2.1-ver-139176153.js
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.core.markup.html.references.JQueryMigrateJavaScriptReference/js/jquery-migrate-1.2.1-ver-139176153.js
  /scriptscript
  type=text/javascript id=bootstrap-js defer=defer
 
 
 src=./wicket/resource/de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference/webjars/bootstrap/null/js/bootstrap.js
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference/webjars/bootstrap/null/js/bootstrap.js
  /scriptlink
  rel=stylesheet type=text/css
 
 
 href=./wicket/resource/de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesomeCssReference/css/font-awesome-ver-139176153.css
  view-source:
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesomeCssReference/css/font-awesome-ver-139176153.css
  
  /script type=text/javascript
  /*![CDATA[*/Wicket.Event.add(window, domready, function(event) {
  $('#component39
  .dropdown-toggle').dropdown();;;});/*]]*//script/head
 
  Any Thoughts or help on this is much appreciated.
 





Re: Wicket-Bootstrap 0.9.2 js resource not found.

2014-03-21 Thread David Beer
Hi Martin

After having updated my local source and built 0.9.3-SNAPSHOT added it to
my pom and changed the statement in WicketApplication I get the following
error and unable to deploy.

Caused by: java.lang.IllegalStateException: you have to call
WicketWebjars.install() before you can use an IWebjarsResourceReference or
any other component.
at
de.agilecoders.wicket.webjars.WicketWebjars.settings(WicketWebjars.java:81)
[wicket-webjars-0.4.1.jar:]
at
de.agilecoders.wicket.webjars.util.WebjarsVersion$Holder.clinit(WebjarsVersion.java:29)
[wicket-webjars-0.4.1.jar:]
... 24 more

My ConfigureBootstrap method is as follows and is called from init() in
WicketApllication

/**
 * configures wicket-bootstrap and installs the settings.
 */
private void configureBootstrap() {
final ThemeProvider themeProvider = new BootswatchThemeProvider() {
{
defaultTheme(spacelab);
}

};

final IBootstrapSettings settings = new BootstrapSettings();
settings.setThemeProvider(themeProvider);
settings.useCdnResources(true);
Bootstrap.install(this, settings);
BootstrapLess.install(this);
}

Thanks

David


On 21 March 2014 12:20, Martin Grigorov mgrigo...@apache.org wrote:

 We didn't have to do any refactorings to upgrade Wicket-Bootstrap from 3.0
 to 3.1.

 As usual - let us know if you have any issues!

 Martin Grigorov
 Wicket Training and Consulting


 On Fri, Mar 21, 2014 at 2:12 PM, David Beer david.m.b...@gmail.com
 wrote:

  I have decided to switch to 0.9.3-SNAPSHOT after getting latest code to
  build. Will work on migrating to 3.1 and see if that helps.
 
  Thanks
 
  David
 
 
  On 21 March 2014 11:43, David Beer david.m.b...@gmail.com wrote:
 
   Hi Martin
  
   I have been wondering about switching to 0.9.3-SNAPSHOT, I have a
 couple
   of concerns. This is for 3.1.x and 0.9.2 is for 3.0.x and there is
 quite
  a
   difference wondering how much I have to change. However the change may
 be
   worth it as twbs seems to moving forward quite fast with 3.1.x. The
 other
   is that the latest code failed to build, and I am not sure how recent
 the
   deployed jars are in maven.
  
   The third is more of a question is there a way of disabling webjars for
   bootstrap and using CDN. like 0.9.3-SNAPSHOT does/
  
   Thanks
  
   David
  
  
   On 21 March 2014 09:40, Martin Grigorov mgrigo...@apache.org wrote:
  
   Hi,
  
   JBoss uses their own virtual file system and I remember it
   Wicket-Bootstrap
   had problems with it before.
   In 0.9.3-SNAPSHOT it is possible to avoid usage of webjars so I'd
   recommend
   you to use non-webjars in JBoss from now on.
  
   https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/337
  
   Martin Grigorov
   Wicket Training and Consulting
  
  
   On Thu, Mar 20, 2014 at 7:52 PM, David Beer david.m.b...@gmail.com
   wrote:
  
Hi All
   
I am updating a wicket-bootstrap application from 0.9.0-SNAPSHOT to
   0.9.2
and am getting the following error message logged. I am running
 JBoss
  AS
7.1. None of the js seems to work.
   
[org.apache.wicket.request.resource.ResourceReferenceRegistry]
(http--127.0.0.1-8080-5) A ResourceReference wont be created for a
   resource
with key [scope:
   
   
  
 
 de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
name: webjars/bootstrap/null/js/bootstrap.js; locale: null; style:
  null;
variation: null] because it cannot be located.
   
Page source for js css declarations is as follows:
   
!DOCTYPE htmlhtml lang=en class=theme-spacelab
  headlink
rel=stylesheet type=text/css
   
   
  
 
 href=./wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
view-source:
   
  
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css

/script type=text/javascript
   
   
  
 
 src=./wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392391424000.js
view-source:
   
  
 
 http://localhost:8080/Tansu/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392391424000.js
/scriptscript
type=text/javascript
   
   
  
 
 src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js
view-source:
   
  
 
 http://localhost:8080/Tansu/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js
/script
   meta charset=utf-8titleTansu - File Sharing and
Storage/titlemeta name=viewport
content=width=device-width, initial-scale=1.0, maximum-scale=1,
user-scalable=nometa name=description content=Tansu
meta name

Re: Wicket-Bootstrap 0.9.2 js resource not found.

2014-03-21 Thread David Beer
Hi Martin

Have created a new issue. After a bit more research this seems to be
becasue of loading a theme. Full Stacktrace and code in issue
https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/344.

Thanks

David



On 21 March 2014 12:50, Martin Grigorov mgrigo...@apache.org wrote:

 Please paste the full stacktrace so we can see what triggers the load of
 WebjarsVersion$Holder.
 Better do it in GitHub issues.
 Thanks!

 Martin Grigorov
 Wicket Training and Consulting


 On Fri, Mar 21, 2014 at 2:37 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi Martin
 
  After having updated my local source and built 0.9.3-SNAPSHOT added it to
  my pom and changed the statement in WicketApplication I get the following
  error and unable to deploy.
 
  Caused by: java.lang.IllegalStateException: you have to call
  WicketWebjars.install() before you can use an IWebjarsResourceReference
 or
  any other component.
  at
 
 de.agilecoders.wicket.webjars.WicketWebjars.settings(WicketWebjars.java:81)
  [wicket-webjars-0.4.1.jar:]
  at
 
 
 de.agilecoders.wicket.webjars.util.WebjarsVersion$Holder.clinit(WebjarsVersion.java:29)
  [wicket-webjars-0.4.1.jar:]
  ... 24 more
 
  My ConfigureBootstrap method is as follows and is called from init() in
  WicketApllication
 
  /**
   * configures wicket-bootstrap and installs the settings.
   */
  private void configureBootstrap() {
  final ThemeProvider themeProvider = new
 BootswatchThemeProvider() {
  {
  defaultTheme(spacelab);
  }
 
  };
 
  final IBootstrapSettings settings = new BootstrapSettings();
  settings.setThemeProvider(themeProvider);
  settings.useCdnResources(true);
  Bootstrap.install(this, settings);
  BootstrapLess.install(this);
  }
 
  Thanks
 
  David
 
 
  On 21 March 2014 12:20, Martin Grigorov mgrigo...@apache.org wrote:
 
   We didn't have to do any refactorings to upgrade Wicket-Bootstrap from
  3.0
   to 3.1.
  
   As usual - let us know if you have any issues!
  
   Martin Grigorov
   Wicket Training and Consulting
  
  
   On Fri, Mar 21, 2014 at 2:12 PM, David Beer david.m.b...@gmail.com
   wrote:
  
I have decided to switch to 0.9.3-SNAPSHOT after getting latest code
 to
build. Will work on migrating to 3.1 and see if that helps.
   
Thanks
   
David
   
   
On 21 March 2014 11:43, David Beer david.m.b...@gmail.com wrote:
   
 Hi Martin

 I have been wondering about switching to 0.9.3-SNAPSHOT, I have a
   couple
 of concerns. This is for 3.1.x and 0.9.2 is for 3.0.x and there is
   quite
a
 difference wondering how much I have to change. However the change
  may
   be
 worth it as twbs seems to moving forward quite fast with 3.1.x. The
   other
 is that the latest code failed to build, and I am not sure how
 recent
   the
 deployed jars are in maven.

 The third is more of a question is there a way of disabling webjars
  for
 bootstrap and using CDN. like 0.9.3-SNAPSHOT does/

 Thanks

 David


 On 21 March 2014 09:40, Martin Grigorov mgrigo...@apache.org
  wrote:

 Hi,

 JBoss uses their own virtual file system and I remember it
 Wicket-Bootstrap
 had problems with it before.
 In 0.9.3-SNAPSHOT it is possible to avoid usage of webjars so I'd
 recommend
 you to use non-webjars in JBoss from now on.

 https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/337

 Martin Grigorov
 Wicket Training and Consulting


 On Thu, Mar 20, 2014 at 7:52 PM, David Beer 
 david.m.b...@gmail.com
  
 wrote:

  Hi All
 
  I am updating a wicket-bootstrap application from 0.9.0-SNAPSHOT
  to
 0.9.2
  and am getting the following error message logged. I am running
   JBoss
AS
  7.1. None of the js seems to work.
 
  [org.apache.wicket.request.resource.ResourceReferenceRegistry]
  (http--127.0.0.1-8080-5) A ResourceReference wont be created
 for a
 resource
  with key [scope:
 
 

   
  
 
 de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
  name: webjars/bootstrap/null/js/bootstrap.js; locale: null;
 style:
null;
  variation: null] because it cannot be located.
 
  Page source for js css declarations is as follows:
 
  !DOCTYPE htmlhtml lang=en class=theme-spacelab
headlink
  rel=stylesheet type=text/css
 
 

   
  
 
 href=./wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
  view-source:
 

   
  
 
 http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
  
  /script type=text/javascript
 
 

   
  
 
 src=./wicket

Wicket-Bootstrap 0.9.2 js resource not found.

2014-03-20 Thread David Beer
Hi All

I am updating a wicket-bootstrap application from 0.9.0-SNAPSHOT to 0.9.2
and am getting the following error message logged. I am running JBoss AS
7.1. None of the js seems to work.

[org.apache.wicket.request.resource.ResourceReferenceRegistry]
(http--127.0.0.1-8080-5) A ResourceReference wont be created for a resource
with key [scope:
de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;
name: webjars/bootstrap/null/js/bootstrap.js; locale: null; style: null;
variation: null] because it cannot be located.

Page source for js css declarations is as follows:

!DOCTYPE htmlhtml lang=en class=theme-spacelabheadlink
rel=stylesheet type=text/css
href=./wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
view-source:http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchCssReference/css/bootstrap.spacelab-ver-139176153.css
/script type=text/javascript
src=./wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392391424000.js
view-source:http://localhost:8080/Tansu/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-ver-1392391424000.js/scriptscript
type=text/javascript
src=./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js
view-source:http://localhost:8080/Tansu/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1392391424000.js/script
   meta charset=utf-8titleTansu - File Sharing and
Storage/titlemeta name=viewport
content=width=device-width, initial-scale=1.0, maximum-scale=1,
user-scalable=nometa name=description content=Tansu
meta name=author content=Copper Arrow Software Services
  meta name=X-UA-Compatible content=IE=edge,chrome=1
link rel=stylesheet href=style.css
view-source:http://localhost:8080/Tansu/style.css type=text/css
media=screen title=Stylesheet/script type=text/javascript
src=./wicket/resource/de.agilecoders.wicket.core.markup.html.references.JQueryMigrateJavaScriptReference/js/jquery-migrate-1.2.1-ver-139176153.js
view-source:http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.core.markup.html.references.JQueryMigrateJavaScriptReference/js/jquery-migrate-1.2.1-ver-139176153.js/scriptscript
type=text/javascript id=bootstrap-js defer=defer
src=./wicket/resource/de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference/webjars/bootstrap/null/js/bootstrap.js
view-source:http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference/webjars/bootstrap/null/js/bootstrap.js/scriptlink
rel=stylesheet type=text/css
href=./wicket/resource/de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesomeCssReference/css/font-awesome-ver-139176153.css
view-source:http://localhost:8080/Tansu/wicket/resource/de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesomeCssReference/css/font-awesome-ver-139176153.css
/script type=text/javascript
/*![CDATA[*/Wicket.Event.add(window, domready, function(event) {
$('#component39
.dropdown-toggle').dropdown();;;});/*]]*//script/head

Any Thoughts or help on this is much appreciated.


Re: 10th aniversary of wicket

2014-01-22 Thread David Beer

Hi Guys

This is a great idea, I would like to suggest the UK as a location 
specifically Newcastle as there seems to be a lot of companies around 
here that use Apache Wicket. I have also seen a few job adverts with 
Apache Wicket mentioned.


Just a thought.

David
On 20/01/14 09:52, Ernesto Reinaldo Barreiro wrote:

Hi,

Chatting with Martin Funk, a fellow wicketeer, he mentioned this year
Apache Wicket will become 10 years old!

Are there any celebrations planned? Shall we organize something? Just
kidding, I mentioned to Martin that we should maybe promote a wicket
meeting at some exotic place: e.g. Wicket, Salsa and Mojitos, in
Havana... Seriously, is someone planning a celebration? Maybe it is a good
opportunity to say a big THANKS to those who have sacrificed their own
free time in order to make our developer's lives a lot better and
pleasurable!




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket-Bootstrap Question

2014-01-10 Thread David Beer

Hi Joesph

Take a look at this simple example project I did of getting 
wicket-bootstrap3 working.

https://github.com/dmbeer/wicket-bootstrap-example

Thanks

David
On 09/01/14 03:40, Joseph Mokenela wrote:

Hi,

I am not sure whether this is the right place to ask
*wicket-bootstrap*specific questions, I apologize if its not.

Following is my question.

I am building a wicket application and I am using wicket-bootstrap for
bootstrap layout.

However I am not able to access some of the bootstrap classes from my
markup even though it looks like it has successfully pulled the css, i saw
this when i checked view source on the page.

Is there any specific configuration i need to make in order to have access
to the css classes on my page?

Another question: Is there support for bootstrap 3 yet?

Thanks in advance,

Kind Regards,
Joseph





Re: java.lang.NoSuchMethodError: de.agilecoders.wicket.core.util.References.renderWithFilter

2013-12-13 Thread David Beer

Hi Stephen

As I said on IRC you need to compile the source locally and add the 
dependency as usual to you maven pom.xml. There is no need to add the 
source directly.


I have crerated a sample manven project on github last night that shows 
how to get a basic Wicket and Bootstrap Site working.


https://github.com/dmbeer/wicket-bootstrap-example

Hope this helps.

Thanks

David
On 13/12/13 12:14, terryTornado wrote:

Hi Martin,

thanks for answering.

Seems i have the latest with the code changes. I have delete the dependend
local .m2 repositories and rebuild the app new with the same result.
The codes are here: https://github.com/terrytornado/wicket-sample

I don't know what i'm doing wrong. Sorry.

Stephan



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-lang-NoSuchMethodError-de-agilecoders-wicket-core-util-References-renderWithFilter-tp4662985p4662990.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





Re: getPage(pageReference) == null since Wicket 6.10.0

2013-11-06 Thread David Beer
JBoss AS 7 and Wildfly 8 work nicely with Wicket.


On 6 November 2013 15:25, Ondrej Zizka ozi...@redhat.com wrote:

 Try the JBoss EAP 6.1:
 http://www.jboss.org/jbossas/downloads/

 I didn't have much trouble using that with Wicket 6.x.

 Ondra




 On 5.11.2013 18:19, Dieter Tremel wrote:

 Am 12.10.2013 12:19, schrieb Dieter Tremel:

 Sometimes I have the impression that a Glassfish and wicket are not a
 couple in great love.


 Seems that Glassfish and Oracle are not in great love either, since
 commercial Glassfish is dead, and this is no good future for the open
 source edition:

 https://blogs.oracle.com/theaquarium/entry/java_ee_and_glassfish_server

 Dieter

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




How to use BootStrap3 ProgressBar and UpdateableProgress Bar

2013-11-06 Thread David Beer
Hi Guys

I have added an UploadProgressBar from the Wicket extensions to my upload
form and process, it would be nice if I could keep the Bootstrap3
components.

I am having a bit of difficulty fguring out how I can attach either a
ProgressBar or UpdatableProgresBar to my upload form.

Any thoughts on this would be great. HTML template for form is as follows:

form wicket:id=uploadForm
div wicket:id=formGroup-Upload
div class=col-lg-10 fileupload fileupload-new
data-provides=fileupload
span class=btn btn-default btn-file
span class=fileupload-newSelect file/span
span class=fileupload-existsChange/span
input type=file wicket:id=file
/span
span class=fileupload-preview/span
a href=# class=close fileupload-exists
data-dismiss=fileupload style=float: nonetimes;/a
/div
div class=col-lg-offset-2 col-lg-10
span wicket:id=max-size/span
/div
/div
div wicket:id=formGroup-Description
div class=col-lg-10
input type=text wicket:id=description
/div
/div
div wicket:id=submit-formGroup class=form-group
div class=col-lg-offset-2 col-lg-10
button wicket:id=submit-button type=submitUpload
File/button
/div
/div
span wicket:id=progress[progressbar]/span
/form

Thanks

David


Re: Installing Wicket application on a VPS server - How?!

2013-11-03 Thread David Beer
Hi Martino

How is your WAR file produced is it via Maven or ANT, generally a WAR file
is produced to a standard way. Can you deploy your application to a local
instance of glassfish? Check the logs of the glassfish container, it should
tell you if there was an error deploying the application. You can also
deploy an application via the admin console in glassfish, you could try
that and see if everything works.

David


On 2 November 2013 23:34, MartinoSuperman martinosuper...@live.nl wrote:

 Hi David,

 Thanks for your help and answer.

 I tried what you did.

 In the command line, I deployed an example WAR file of Oracle hello.war
 according to the descriptions of the following link:

 http://docs.oracle.com/cd/E18930_01/html/821-2432/geyvr.html#ghgis

 And that worked.

 But now, I pressed the button Clean and Build in Netbeans, after which a
 WAR
 file of my own Wicket Application was made.

 I did the same procedure for installing my WAR file on my VPS server, but
 now it does not work. I think I forgot something to do in my own generated
 WAR file, because I did the same installations as at the example hello.war
 of Oracle. And that worked.

 Do you know what I could have done wrong in generating my own WAR file in
 NetBeans. Did I forget something? If so, what did I forget?

 Thanks in advance for your help.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Installing-Wicket-application-on-a-VPS-server-How-tp4662064p4662083.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Installing Wicket application on a VPS server - How?!

2013-11-01 Thread David Beer
Hi Martino

If you have glasshfish running the simple answer is to make sure that port
8080 (which is the default for glassfish) is open on your file. Build your
WAR file of your application upload to your VPS and deploy to glassfish.
You should then be able to see your application by doing the following web
address:8080/Name of application WAR FILE. If you you wish to get rid of
8080 you need to use Apache or Webserver than can redirect to glassfish and
back.

David


On 31 October 2013 22:33, MartinoSuperman martinosuper...@live.nl wrote:

 Hi,

 I have a website address online on the internet. It is a VPS server. Here,
 I
 installed Glassfish 3 and it works perfect.

 But now, I would like to upload the Wicket Application I built on the VPS
 server running on GlassFish.

 So, when you go to the website address in Internet Explorer, you come on
 the
 beginning webpage of the Wicket application directly.

 My question is:

 Can somebody tell how I have to install my own built Wicket application
 that
 I built in NetBeans, on that VPS server running on Glassfish.

 Thanks in advance!



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Installing-Wicket-application-on-a-VPS-server-How-tp4662064.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: wicket-bootstrap NoSuchMethodError: Url.parse

2013-10-21 Thread David Beer
Hi

Which wicket-bootstrap version and how have you added wicket-bootstrap to
your application?

Thanks

David


On 21 October 2013 21:26, meduolis meduol...@gmail.com wrote:

 Hello, does anybody knows, what I could be doing wrong with wicket-bootsrap
 setup?

 I keep getting this error when entering wicket application:







 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/wicket-bootstrap-NoSuchMethodError-Url-parse-tp4661909.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




wicket-bootstrap3 FormControl Position the Label

2013-10-13 Thread David Beer
Hi Guys

I am using the wicket-bootstrap3 FormGroup and provide a Model for the in
built Label that gets added. My Problem is how to apply the relevant
formatting and spacing on the item. So according to the bootstrap3 examples
my HTML should look like the following resulting markup.

div class=form-group
label for=inputEmail1 class=col-lg-2 control-labelEmail/label
div class=col-lg-10
  input type=email class=form-control id=inputEmail1
placeholder=Email
/div
  /div

Where label should have the class col-lg-2 or similar col definition hw
could I add this.

Thanks

David


Re: wicket-bootstrap3 FormControl Position the Label

2013-10-13 Thread David Beer
Hi Martin

Thanks for this I new there was a way of doing this. For some reason
couldn't see it works great thanks.

David


On 13 October 2013 12:36, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 Override
 de.agilecoders.wicket.core.markup.html.bootstrap.form.FormGroup#newLabel
 :
 Label label = new Label(id, model);
 label.add(AttributeModifier.append(col-lg-2));
 return label;


 or:
 formGroup.get(label)..add(AttributeModifier.append(col-lg-2));


 On Sun, Oct 13, 2013 at 2:25 PM, David Beer david.m.b...@gmail.com
 wrote:

  Hi Guys
 
  I am using the wicket-bootstrap3 FormGroup and provide a Model for the in
  built Label that gets added. My Problem is how to apply the relevant
  formatting and spacing on the item. So according to the bootstrap3
 examples
  my HTML should look like the following resulting markup.
 
  div class=form-group
  label for=inputEmail1 class=col-lg-2 control-labelEmail/label
  div class=col-lg-10
input type=email class=form-control id=inputEmail1
  placeholder=Email
  /div
/div
 
  Where label should have the class col-lg-2 or similar col definition hw
  could I add this.
 
  Thanks
 
  David
 



[wicket-bootstrap3] How to add Fontawsome

2013-10-11 Thread David Beer
Hi All

I see that Fontawsome was added to the extensions for wicket-bootstrap.
However I can't see how to add the CSS reference. I have tried using
CSSHeaderItem and adding that to the renderHead of the page but no CSS file
gets added.

How do I go about adding this to my Bootstrap3 project?

Thanks

David


Re: [wicket-bootstrap3] How to add Fontawsome

2013-10-11 Thread David Beer
Hi All

I solved this by adding
response.render(CssHeaderItem.forReference(FontAwesomeCssReference.instance()));
to my renderHeader method.

David


On 11 October 2013 16:53, David Beer david.m.b...@gmail.com wrote:

 Hi All

 I see that Fontawsome was added to the extensions for wicket-bootstrap.
 However I can't see how to add the CSS reference. I have tried using
 CSSHeaderItem and adding that to the renderHead of the page but no CSS file
 gets added.

 How do I go about adding this to my Bootstrap3 project?

 Thanks

 David



Wicket Bootstrap 3

2013-10-07 Thread David Beer
]
Caused by: java.lang.IllegalArgumentException:
/webjars/bootstrap/3.0.0/css/bootstrap.css could not be found. Make sure
you've added the corresponding WebJar and please check for typos.
at
org.webjars.WebJarAssetLocator.throwNotFoundException(WebJarAssetLocator.java:190)
[webjars-locator-0.5.jar:]
at
org.webjars.WebJarAssetLocator.getFullPath(WebJarAssetLocator.java:211)
[webjars-locator-0.5.jar:]
at
de.agilecoders.wicket.webjars.util.file.WebjarsResourceFinder.find(WebjarsResourceFinder.java:82)
[wicket-webjars-0.3.0.jar:]
... 33 more

I have added the VFS jar file and configured the VFS and Bootstrap the same
way as in 0.8.4. Is there anything else I could do try and get it to find
the resources.

David


Re: Wicket-bootstrap Bootstrap 3 support

2013-09-25 Thread David Beer
Hi Michael

Great will take a look later. Have also checked out the source as well.

Thanks

David


On 25 September 2013 14:28, Michael Haitz michael.ha...@1und1.de wrote:

 Hi,

 i've deployed a 0.9.0-SNAPSHOT to sonatype this morning ;)

 dependency
   groupIdde.agilecoders.wicket/groupId
   artifactIdwicket-bootstrap-core/artifactId
   version0.9.0-SNAPSHOT/version
 /dependency

 cheers,
 Michael

 Am 25.09.2013 um 14:24 schrieb David Beer david.m.b...@gmail.com:

  Hi All
 
  I am looking at using Bootstrap 3 for our next webapplication layout. I
  have used 2.3.2 with success and the Wicket-Bootstrap project. I just
  wondered what the status is of the support for BS3 before I start coding
  the initial layout. Or am I better sticking with BS2 for now and
 upgrading
  once Wicket-Bootstrap for BS3 is released.
 
  Thanks
 
  David


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread David Solum
Hi,

As I said in my original post, that markup works, but the
BookmarkablePageLinks that I add are rendered as div tags with onclick
handlers.  I am trying to get anchor tags.

I believe the post that Sven referred to is a step in the right direction,
but my markup gives me the unclosed tag error.

Has anyone gotten a BookmarkablePageLink to render as an anchor tag?  If so,
may I see the markup you used?  Thank you very much in advance.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659551.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread David Solum
Here is the simplest thing I've tried: 

 wicket:panel 
 table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90% 
 a href=# wicket:id=link /a 
 /table 
 /wicket:panel 

(I added the spaces after the angled brackets just for posting, they are not
part of the markup in my code.)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659556.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-17 Thread David Solum
If you're saying to add the fragment tag outside the table tag, I don't get
any errors, but the Links I add are still rendered as div tags with onclick
handlers.  What would tie the BookmarkablePageLinks that I add to the
DefaultDataTable to the anchor tags in your markup?  Thank you.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659570.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-14 Thread David Solum
I am using Wicket 6.8 and have a sortable DefaultDataTable that gets its
columns programmatically. 

The markup to get this table and the dynamically generated columns simple
(I've added spaces so it all shows):

 wicket:panel
 table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90% / 
 /wicket:panel

All of the columns are generated from a passed in LinkedHashMap of labels
and attributes:

for (EntryString, String entry : entrySet) {
final String label = entry.getKey();
final String attribute = entry.getValue();
columns.add(new PsPropertyColumn(label, attribute) {

@Override
public void populateItem(Item cellItem, String componentId,
IModel model)
{
final Object modelObject = model.getObject();
final Object value = PropertyResolver.getValue(attribute,
modelObject);
// Add an edit link
BookmarkablePageLink link = new ...;
...
cellItem.add(link);
}
}
}

DefaultDataTable table = new DefaultDataTable(dataTable, columns,
dataProvider, MAX_ROWS) {
...
}
add(table);

So this properly displays as a sortable table with clickable columns that
send the user to the required page.  However, as many posts have mentioned,
this is rendered as a cell with an onclick handler rather than an anchor (
a href=... /) tag. I want the anchor tag for a couple of reasons, one if
which is that I want to add my own onclick handler without having an
existing onclick handler in the way.

I have seen a solution that says to put an anchor tag inside a panel in the
HTML markup, and to add the link inside of a Panel subclass.  Sadly for me
the markup in the examples wasn't complete, and whatever I try (anchor tags,
tr/td tags, panel tags, etc.), I get the same error:

 Last cause: Close tag not found for tag: 
. For Components only raw markup is allow in between the tags but not other
Wicket Component. Component: [DefaultDataTable [Component id = dataTable]] 

Here is the simplest thing I've tried:

 wicket:panel
 table wicket:id=dataTable border=0 cellpadding=1
cellspacing=1 width=90%
 a href=# wicket:id=link /a
 /table
 /wicket:panel

Again, no success.  I would love to see markup that allows the
BookmarkablePageLinks be rendered insided the DefaultDataTable as anchor
tags.  Thanks in advance for any help.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

2013-06-14 Thread David Solum
Yes Sven, that is where I got the HTML I posted that gives me the Close tag
not found error.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-dynamically-add-a-hyperlink-BookmarkablePageLink-to-DefaultDataTable-that-is-rendered-as-an-ar-tp4659502p4659514.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketTester CDI and WicketApplication

2013-06-06 Thread David Beer

Hi Cedric

Thanks for this most useful with some searching th internet I managed to 
get the test class running with testng as well. One thing to note 
though, if you don not use Conversations you need to add the following 
to the new CdiConfiguration, .setPropagation(NONE).


Thanks

David
On 02/06/13 18:57, Cedric Gatay wrote:

Hi David,
you can have a look at the base CDI enabled test class we're using at
code-troopers in the following gist :
https://gist.github.com/CedricGatay/5694293

Regards,

__
Cedric Gatay (@Cedric_Gatay http://twitter.com/Cedric_Gatay)
http://code-troopers.com | http://www.bloggure.info | http://cedric.gatay.fr


On Sat, Jun 1, 2013 at 6:15 PM, David Beer david.m.b...@gmail.com wrote:


Hi Cedric

Thanks for the reply I will take a look at Arquillian and see how I can
use it. Any guides are helpful especially when used with wicket.

Thanks

David

On 01/06/13 16:20, Cedric Gatay wrote:


Hi,

I usually use Arquillian to deploy a CDI context in my tests which require
injection to work (often it happens for pages tests). When testing
individual components it is easy to manually inject references (either
via package visibility or via PowerMock's Whitebox for instance).

Regards,

__
Cedric Gatay (@Cedric_Gatay 
http://twitter.com/Cedric_**Gatayhttp://twitter.com/Cedric_Gatay

)

http://code-troopers.com | http://www.bloggure.info |
http://cedric.gatay.fr


On Sat, Jun 1, 2013 at 5:13 PM, David Beer david.m.b...@gmail.com
wrote:

  Hi All

I am having difficulty finding information on how I can create a CDI
context for use in my tests. Is there some kind of way of creating a mock
cdi environment for testing. Currently my tests fail trying to retrieve
the
CDI Bean Manager as this is normally controlled by the Web Application
Container.

Do I need to create a mock Web Application class which simulates a dummy
Bean Manager? Is there any guides specific to Wicket?

Thanks

David

--**
--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.orghttp://apache.org
users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



WicketTester CDI and WicketApplication

2013-06-01 Thread David Beer

Hi All

I am having difficulty finding information on how I can create a CDI 
context for use in my tests. Is there some kind of way of creating a 
mock cdi environment for testing. Currently my tests fail trying to 
retrieve the CDI Bean Manager as this is normally controlled by the Web 
Application Container.


Do I need to create a mock Web Application class which simulates a dummy 
Bean Manager? Is there any guides specific to Wicket?


Thanks

David

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketTester CDI and WicketApplication

2013-06-01 Thread David Beer

Hi Cedric

Thanks for the reply I will take a look at Arquillian and see how I can 
use it. Any guides are helpful especially when used with wicket.


Thanks

David
On 01/06/13 16:20, Cedric Gatay wrote:

Hi,

I usually use Arquillian to deploy a CDI context in my tests which require
injection to work (often it happens for pages tests). When testing
individual components it is easy to manually inject references (either
via package visibility or via PowerMock's Whitebox for instance).

Regards,

__
Cedric Gatay (@Cedric_Gatay http://twitter.com/Cedric_Gatay)
http://code-troopers.com | http://www.bloggure.info | http://cedric.gatay.fr


On Sat, Jun 1, 2013 at 5:13 PM, David Beer david.m.b...@gmail.com wrote:


Hi All

I am having difficulty finding information on how I can create a CDI
context for use in my tests. Is there some kind of way of creating a mock
cdi environment for testing. Currently my tests fail trying to retrieve the
CDI Bean Manager as this is normally controlled by the Web Application
Container.

Do I need to create a mock Web Application class which simulates a dummy
Bean Manager? Is there any guides specific to Wicket?

Thanks

David

--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket-Bootstrap ControlGroup Error

2013-05-29 Thread David Beer
(Model.of(Creating 
Repository;
notificationPanel = new NotificationPanel(notification, new 
ContainerFeedbackMessageFilter(form));

add(notificationPanel);

Any ideas, suggestions are most helpful.

Thanks

David

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket-Bootstrap ControlGroup Error

2013-05-29 Thread David Beer

Hi Martin

Thanks for the reply issues submitted against the github project 
https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/187


Thanks

David
On 29/05/13 13:18, Martin Grigorov wrote:

Hi,

File a ticket please.
Since you use -SNAPSHOT you may have your fix pretty soon ;-)


On Wed, May 29, 2013 at 2:55 PM, David Beer david.m.b...@gmail.com wrote:


Hi All

I am using a wicket-bootstrap 0.8.2-SNAPSHOT, and wicket 6.7.0. I am
trying to create a from and add the components using a ControlGroup. I can
add the components to the matching html OK, but I get the following error
when the page renders.

12:45:25,905 ERROR [org.apache.wicket.serialize.**java.JavaSerializer]
(http--127.0.0.1-8080-1) Error serializing object class
com.copperarrow.dvcs.web.**pages.AddRepository [object=[Page class =
com.copperarrow.dvcs.web.**pages.AddRepository, id = 1, render count =
1]]: org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream$**ObjectCheckException: The object type is not
Serializable!
A problem occurred while checking object with type:
de.agilecoders.wicket.core.**markup.html.bootstrap.form.**ControlGroup$**
FeedbackMessageToCssClassNameT**ransformer
Field hierarchy is:
   1 [class=com.copperarrow.dvcs.**web.pages.AddRepository, path=1]
 private java.lang.Object org.apache.wicket.**MarkupContainer.children
[class=[Ljava.lang.Object;]
   java.lang.Object org.apache.wicket.Component.**data[8]
[class=de.agilecoders.wicket.**core.markup.html.bootstrap.**form.BootstrapForm,
path=1:form]
 private java.lang.Object org.apache.wicket.**MarkupContainer.children
[class=[Ljava.lang.Object;]
   private java.lang.Object 
org.apache.wicket.**MarkupContainer.children[0]
[class=de.agilecoders.wicket.**core.markup.html.bootstrap.**form.ControlGroup,
path=1:form:reponame-**controlgroup]
 private final com.google.common.base.**Function
de.agilecoders.wicket.core.**markup.html.bootstrap.form.**ControlGroup.**feedbackMessageToCssClassName
[class=de.agilecoders.wicket.**core.markup.html.bootstrap.**
form.ControlGroup$**FeedbackMessageToCssClassNameT**ransformer] -
field that is causing the problem
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**internalCheck(**CheckingObjectOutputStream.**java:387)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**check(**CheckingObjectOutputStream.**java:361)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**checkFields(**CheckingObjectOutputStream.**java:645)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**internalCheck(**CheckingObjectOutputStream.**java:569)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**check(**CheckingObjectOutputStream.**java:361)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**internalCheck(**CheckingObjectOutputStream.**java:432)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**check(**CheckingObjectOutputStream.**java:361)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**checkFields(**CheckingObjectOutputStream.**java:645)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**internalCheck(**CheckingObjectOutputStream.**java:569)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**check(**CheckingObjectOutputStream.**java:361)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**internalCheck(**CheckingObjectOutputStream.**java:432)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**check(**CheckingObjectOutputStream.**java:361)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**checkFields(**CheckingObjectOutputStream.**java:645)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**internalCheck(**CheckingObjectOutputStream.**java:569)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**check(**CheckingObjectOutputStream.**java:361)
[wicket-core-6.7.0.jar:6.7.0]
 at org.apache.wicket.core.util.**objects.checker.**
CheckingObjectOutputStream.**writeObjectOverride(**
CheckingObjectOutputStream.**java:713) [wicket-core-6.7.0.jar:6.7.0]
 at java.io.ObjectOutputStream.**writeObject(**ObjectOutputStream.java:342)
[rt.jar:1.7.0_21]
 at org.apache.wicket.serialize

Re: Attaching Ajax Function to Java Method

2013-05-15 Thread David Beer

Hi Bill

I would also suggest you take a look at the Wicket-Bootstrap project by 
agilecoders for Bootstrap integration. Is very good and has a lot of the 
bootstrap components.


http://wb.agilecoders.de/demo/ and 
https://github.com/l0rdn1kk0n/wicket-bootstrap/


Thanks

David
On 14/05/13 21:36, William Speirs wrote:

I'm trying to create a typeahead component for Wicket that uses Bootstrap's
Typeahead:

To set this up though I need to provide the .typeahead method in JavaScript
with a function that will return the results, given the query. What I'd
like to do is attach that JavaScript function to a Java method much like
what is done with an AjaxEventBehavior [2]. I cannot figure out how to go
about setting all of this up... any ideas?

Thanks...

Bill-

[1] http://twitter.github.io/bootstrap/javascript.html#typeahead
[2]
http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/ajax/AjaxEventBehavior.html





Re: DataTable update components on Page Change

2013-05-12 Thread David Beer

Hi Francois

Thanks for your help, this useful in firing the event but how can I get 
it so that the buttons state is updated on the page. Sorry If I am 
missing something but am having trouble seeing how I can do this if I  
can't get hold of the AjaxRequestTarget.


I am using wicket 6.6.0

Thanks for your help really appreciated

David

On 12/05/13 09:40, Francois Meillet wrote:

Hi David,

With the event mechanism, you don't need to keep reference.
Yours components keep loosely coupled.

In the onPageChanged() method you can send an event like this
send(getPage(), Broadcast.BREADTH, new YourEvent());


see the exemple: http://www.wicket-library.com/wicket-examples/events/
and at the end of this page : 
http://wicket.apache.org/2011/09/07/wicket-1.5-released.html


François Meillet
Formation Wicket - Développement Wicket





Le 11 mai 2013 à 17:37, David Beer david.m.b...@gmail.com a écrit :


Hi Francois

Thanks for the reply I am not sure howfrom a reference to my table which 
Extends DataTable I can update the button when the onPageChanged() method is 
fired. My Table looks like the following.

AJaxTableContact, String contacts = new AJaxTableContact, String(persons, 
columns, new SortableContactDataProvider(), 10) {
@Override
protected void onPageChanged() {
super.onPageChanged();
System.out.println(Page Changed);
//enable or disable submitButton
}
};

submitButton is initialized as follows:

submitButton = new DefaultBootstrapButton(submit-button, Model.of(Submit));
submitButton.add(new ButtonBehavior(Buttons.Type.Primary));
submitButton.setOutputMarkupId(true);
submitButton.setEnabled(false);

AjaxTable class looks like the following:

public class AJaxTableT, S extends DataTableT, S {

public AJaxTable(String id, List columns, ISortableDataProvider 
dataProvider, int rowsPerPage) {
super(id, columns, dataProvider, rowsPerPage);
setOutputMarkupId(true);
setVersioned(false);
addTopToolbar(new HeadersToolbar(this, dataProvider));
addBottomToolbar(new NoRecordsToolbar(this));
addBottomToolbar(new BootstrapNavigationToolbar(this));
}

}

Any help or examples are much appreciated.

Thanks

David

On 11/05/13 08:27, Francois Meillet wrote:

You can use the event handling mechanism.


François Meillet
Formation Wicket - Développement Wicket





Le 11 mai 2013 à 01:17, David Beer david.m.b...@gmail.com a écrit :


Hi All

I have an Ajax DataTable that extends DataTable and when I click the navigation 
panel to change page in the table I would like to make sure that the necessary 
components are disable or enabled. What is the best way of doing this?

So on onPageChanged I would like to enable or disable my form submit buttons. 
The buttons are Ajax enabled.

Thanks

David

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DataTable update components on Page Change

2013-05-12 Thread David Beer

Hi Francois

Thanks for the pointers I have now solved this problem thanks again.

David
On 12/05/13 18:38, David Beer wrote:

Hi Francois

Thanks for your help, this useful in firing the event but how can I 
get it so that the buttons state is updated on the page. Sorry If I am 
missing something but am having trouble seeing how I can do this if I  
can't get hold of the AjaxRequestTarget.


I am using wicket 6.6.0

Thanks for your help really appreciated

David

On 12/05/13 09:40, Francois Meillet wrote:

Hi David,

With the event mechanism, you don't need to keep reference.
Yours components keep loosely coupled.

In the onPageChanged() method you can send an event like this
send(getPage(), Broadcast.BREADTH, new YourEvent());


see the exemple: http://www.wicket-library.com/wicket-examples/events/
and at the end of this page : 
http://wicket.apache.org/2011/09/07/wicket-1.5-released.html



François Meillet
Formation Wicket - Développement Wicket





Le 11 mai 2013 à 17:37, David Beer david.m.b...@gmail.com a écrit :


Hi Francois

Thanks for the reply I am not sure howfrom a reference to my table 
which Extends DataTable I can update the button when the 
onPageChanged() method is fired. My Table looks like the following.


AJaxTableContact, String contacts = new AJaxTableContact, 
String(persons, columns, new SortableContactDataProvider(), 10) {

@Override
protected void onPageChanged() {
super.onPageChanged();
System.out.println(Page Changed);
//enable or disable submitButton
}
};

submitButton is initialized as follows:

submitButton = new DefaultBootstrapButton(submit-button, 
Model.of(Submit));

submitButton.add(new ButtonBehavior(Buttons.Type.Primary));
submitButton.setOutputMarkupId(true);
submitButton.setEnabled(false);

AjaxTable class looks like the following:

public class AJaxTableT, S extends DataTableT, S {

public AJaxTable(String id, List columns, ISortableDataProvider 
dataProvider, int rowsPerPage) {

super(id, columns, dataProvider, rowsPerPage);
setOutputMarkupId(true);
setVersioned(false);
addTopToolbar(new HeadersToolbar(this, dataProvider));
addBottomToolbar(new NoRecordsToolbar(this));
addBottomToolbar(new BootstrapNavigationToolbar(this));
}

}

Any help or examples are much appreciated.

Thanks

David

On 11/05/13 08:27, Francois Meillet wrote:

You can use the event handling mechanism.


François Meillet
Formation Wicket - Développement Wicket





Le 11 mai 2013 à 01:17, David Beer david.m.b...@gmail.com a écrit :


Hi All

I have an Ajax DataTable that extends DataTable and when I click 
the navigation panel to change page in the table I would like to 
make sure that the necessary components are disable or enabled. 
What is the best way of doing this?


So on onPageChanged I would like to enable or disable my form 
submit buttons. The buttons are Ajax enabled.


Thanks

David

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org








-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DataTable update components on Page Change

2013-05-11 Thread David Beer

Hi Francois

Thanks for the reply I am not sure howfrom a reference to my table which 
Extends DataTable I can update the button when the onPageChanged() 
method is fired. My Table looks like the following.


AJaxTableContact, String contacts = new AJaxTableContact, 
String(persons, columns, new SortableContactDataProvider(), 10) {

@Override
protected void onPageChanged() {
super.onPageChanged();
System.out.println(Page Changed);
//enable or disable submitButton
}
};

submitButton is initialized as follows:

submitButton = new DefaultBootstrapButton(submit-button, 
Model.of(Submit));

submitButton.add(new ButtonBehavior(Buttons.Type.Primary));
submitButton.setOutputMarkupId(true);
submitButton.setEnabled(false);

AjaxTable class looks like the following:

public class AJaxTableT, S extends DataTableT, S {

public AJaxTable(String id, List columns, ISortableDataProvider 
dataProvider, int rowsPerPage) {

super(id, columns, dataProvider, rowsPerPage);
setOutputMarkupId(true);
setVersioned(false);
addTopToolbar(new HeadersToolbar(this, dataProvider));
addBottomToolbar(new NoRecordsToolbar(this));
addBottomToolbar(new BootstrapNavigationToolbar(this));
}

}

Any help or examples are much appreciated.

Thanks

David

On 11/05/13 08:27, Francois Meillet wrote:

You can use the event handling mechanism.


François Meillet
Formation Wicket - Développement Wicket





Le 11 mai 2013 à 01:17, David Beer david.m.b...@gmail.com a écrit :


Hi All

I have an Ajax DataTable that extends DataTable and when I click the navigation 
panel to change page in the table I would like to make sure that the necessary 
components are disable or enabled. What is the best way of doing this?

So on onPageChanged I would like to enable or disable my form submit buttons. 
The buttons are Ajax enabled.

Thanks

David

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



DataTable update components on Page Change

2013-05-10 Thread David Beer

Hi All

I have an Ajax DataTable that extends DataTable and when I click the 
navigation panel to change page in the table I would like to make sure 
that the necessary components are disable or enabled. What is the best 
way of doing this?


So on onPageChanged I would like to enable or disable my form submit 
buttons. The buttons are Ajax enabled.


Thanks

David

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CheckGroup, CheckGroupSelection and Check behavior

2013-05-08 Thread David Beer

Hi All

I have one other issue. When I use the Navigation in the table and 
navigate to the second page, it keeps the selection on page 1 until i 
make a new selection. Also If I hit submit on page the selection is blank.


1. How do I go about keeping the selection from page 1 in the table.
2. How can I make sure that the submit button is not enabled on page 2 
if there is no selection


Update source available at 
https://dl.dropboxusercontent.com/u/1979126/Wicket-Bootstrap-DataTable.zip


Thanks

David
On 07/05/13 13:11, David Beer wrote:

Hi Sven

I understand now why the page re-renders thanks for that. This worked 
well and allows me to enable disable the buttons as needed.


Thanks

David

On 07/05/13 12:26, Sven Meier wrote:

Hi David,

the CheckGroupSelector fails to select all checks, because the first 
changed check already submits the form and then re-renders the page :(.


You can use an AjaxFormChoiceComponentUpdatingBehavior instead of 
#wantOnSelectionChangedNotifications(true).


Regards
Sven


On 05/07/2013 12:30 PM, David Beer wrote:

Hi Sven

Thanks for replying the table is inside a form. Here is the html 
snippet.


form wicket:id=form
span wicket:id=group
table style=border: 2px dotted #fc0; width: 400px; 
padding: 5px;

tr
td valign=topSelect persons/td
td

table wicket:id=persons cellspacing=0 
cellpadding=2

tr wicket:remove
tdbSelect/b/td
tdbName/b/td
tdbEmail/b/td
tdbPhone/b/td
/tr
tr wicket:remove
tdinput type=checkbox//td
tdspan[this is where name will 
be]/span/td
tdspan[this is where email will 
be]/span/td
tdspan[this is where phone will 
be]/span/td

/tr
/table
  span valign=top
  /span
/td
/tr
tr
td colspan=2 align=center
button wicket:id=submit-button 
type=submitSubmit/button

/td
/tr
/table
/span
/form

The full src can be downloaded from here 
https://dl.dropboxusercontent.com/u/1979126/Wicket-Bootstrap-DataTable.zip


Appreciate the help on this.

Thanks

David

On 06/05/13 15:53, Sven Meier wrote:
You have to wrap you whole table in a form, otherwise only the 
value of the single check is sent to the server.


Sven

On 05/06/2013 03:34 PM, David Beer wrote:

Hi All

I am trying to add Checkgroup selection behaviour to my table, 
this all works fins so far. I can use the select all and 
individual check boxes to select items. What I am trying to get is 
get notified when a selection occurs so that I can enable and or 
disable buttons depending on how many selected.


When I overide the 'protected boolean 
wantOnSelectionChangedNotifications' method the page fefreshses to 
a new version and only selects one item. Is this a known problem 
and what is the best way to find out if an item is selected so 
that I can enable the correct button?


Thanks

David

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



  1   2   3   4   5   6   7   >