Re: Wicket 6.3.0 AjaxLink: IAjaxCallListener behaviour

2012-12-13 Thread Martin Grigorov
Hi,

You experience this behavior because there is a synchronization of the Ajax
requests at the client side - see AjaxChannel's javadoc.
What is your use case ?



On Thu, Dec 13, 2012 at 10:14 PM, pe1er  wrote:

> Prior to Wicket 6 the javascript code returned by
> IAjaxCallDecorator.decorateScipt was executed immediately after a click. I
> migrated IAjaxCallDecorator according to the migration-guide. By clicking 3
> times the link within 5 seconds the expected result is:
>
> getPrecondition
> getPrecondition
> getPrecondition
> getSuccessHandler
> getSuccessHandler
> getSuccessHandler
>
> But the result was:
>
> getPrecondition
> getSuccessHandler
> getPrecondition
> getSuccessHandler
> getPrecondition
> getSuccessHandler
>
> Is there another way to migrate IAjaxCallDecorator to Wicket 6?
>
> public class HomePage extends WebPage {
>
>  public HomePage(final PageParameters parameters) {
>   add(new Label("version",
> getApplication().getFrameworkSettings().getVersion()));
>
>   AjaxLink blockingLink = new AjaxLink("blockingLink") {
> @Override
> public void onClick(AjaxRequestTarget target) {
>   try {
> Thread.sleep(5000);
>   } catch (InterruptedException e) {
> e.printStackTrace();
>   }
> }
> @Override
> protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
>   super.updateAjaxAttributes(attributes);
>
>   IAjaxCallListener blockingListener = new AjaxCallListener() {
> @Override
> public CharSequence getPrecondition(Component component) {
>   return "console.log('getPrecondition');";
> }
> @Override
> public CharSequence getSuccessHandler(Component component) {
>   return "console.log('getSuccessHandler');";
> }
>   };
>   attributes.getAjaxCallListeners().add(blockingListener);
> }
>   };
>   add(blockingLink);
>  }
> }
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-3-0-AjaxLink-IAjaxCallListener-behaviour-tp4654785.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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread Stefan Renz
heapifyman wrote:
> Maybe an AjaxLazyLoadPanel could help?
> I think you could catch service exceptions in getLazyLoadComponent() and
> return an error panel instead of the real one.

That probably makes sense in any case because one can never be sure that
the RPC-style call returns in acceptable time. That way, slow response
times of the service have some indication, too.

Thanks, bye
Stefan
> 
> 
> 2012/12/13 Stefan Renz 
> 
>> Hi,
>>
>> my searches didn't turn up anything, so I figured I ask on the mailing
>> list:
>>
>> Consider the following scenario: a Page contains a number of Panels, one
>> of which displays data retrieved by a web service, typically by means of
>> LoadableDetachableModel or IDataProvider.
>>
>> In my case, the WebService used is a Hessian-Endpoint, which is
>> conveniently available to the caller as a Proxy of an Interface. Such an
>> interface doesn't expose any transport layer exceptions; rather, the
>> Proxy takes care of converting any underlying IOException, such as
>> ConnectException, into a RuntimeException.
>>
>> I would like to exchange the Panel with an error message panel saying
>> that the service is not available rather than showing an entire error
>> page (which is something we do for other kind of exceptions, thanks to
>> the fabulous Wicket framework).
>>
>> How could I achieve something like that? Something like this can happen
>> during rendering time, not necessarily in onInitialize(), where I could
>> do an alive check and exchange the panel.
>>
>> Where should I look? What would be your suggestions? Should I come up
>> with a Quickstart as an executable example (without the service -- just
>> any Exception from within a LoadableDetachableModel#load() will do nicely)?
>>
>> Thanks in advance,
>> bye
>> Stefan
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 

-- 
im Auftrag der eFonds Solutions AG, +49-89-579494-3417


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



Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread Stefan Renz
Sven Meier wrote:
> You could probe the model in #onConfigure(), catching exceptions and
> replacing the panel. If your model is a LDM, how should it fail on
> successive accesses during actual rendering?

Theoretically because the web service can become unavailable at any
given time. However, I think that #onConfigure() should catch most
cases, in particular any "forgot to start the service" scenario.

I'll give it shot and see if I can get away with probing in #onConfigure().

Thanks for your suggestion.

Bye
Stefan

T
> 
> Sven
> 
> On 12/13/2012 09:46 PM, Stefan Renz wrote:
>> Hi,
>>
>> my searches didn't turn up anything, so I figured I ask on the mailing
>> list:
>>
>> Consider the following scenario: a Page contains a number of Panels, one
>> of which displays data retrieved by a web service, typically by means of
>> LoadableDetachableModel or IDataProvider.
>>
>> In my case, the WebService used is a Hessian-Endpoint, which is
>> conveniently available to the caller as a Proxy of an Interface. Such an
>> interface doesn't expose any transport layer exceptions; rather, the
>> Proxy takes care of converting any underlying IOException, such as
>> ConnectException, into a RuntimeException.
>>
>> I would like to exchange the Panel with an error message panel saying
>> that the service is not available rather than showing an entire error
>> page (which is something we do for other kind of exceptions, thanks to
>> the fabulous Wicket framework).
>>
>> How could I achieve something like that? Something like this can happen
>> during rendering time, not necessarily in onInitialize(), where I could
>> do an alive check and exchange the panel.
>>
>> Where should I look? What would be your suggestions? Should I come up
>> with a Quickstart as an executable example (without the service -- just
>> any Exception from within a LoadableDetachableModel#load() will do
>> nicely)?
>>
>> Thanks in advance,
>> bye
>>  Stefan
>>
>>
>> -
>> 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
> 

-- 
im Auftrag der eFonds Solutions AG, +49-89-579494-3417


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



Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread Sven Meier
You could probe the model in #onConfigure(), catching exceptions and 
replacing the panel. If your model is a LDM, how should it fail on 
successive accesses during actual rendering?


Sven

On 12/13/2012 09:46 PM, Stefan Renz wrote:

Hi,

my searches didn't turn up anything, so I figured I ask on the mailing list:

Consider the following scenario: a Page contains a number of Panels, one
of which displays data retrieved by a web service, typically by means of
LoadableDetachableModel or IDataProvider.

In my case, the WebService used is a Hessian-Endpoint, which is
conveniently available to the caller as a Proxy of an Interface. Such an
interface doesn't expose any transport layer exceptions; rather, the
Proxy takes care of converting any underlying IOException, such as
ConnectException, into a RuntimeException.

I would like to exchange the Panel with an error message panel saying
that the service is not available rather than showing an entire error
page (which is something we do for other kind of exceptions, thanks to
the fabulous Wicket framework).

How could I achieve something like that? Something like this can happen
during rendering time, not necessarily in onInitialize(), where I could
do an alive check and exchange the panel.

Where should I look? What would be your suggestions? Should I come up
with a Quickstart as an executable example (without the service -- just
any Exception from within a LoadableDetachableModel#load() will do nicely)?

Thanks in advance,
bye
 Stefan


-
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 wicket handles images

2012-12-13 Thread markR
I am using a css file that refers to several images in form of
images/some.gif

running the application i can see in browser console:

[16:40:29.956] GET
http://localhost:8080/webtools/wicket/resource/com.abc.webtools.web.HomePage/images/big.gif
[HTTP/1.1 404 Not Found 0ms]

On server side:
WARN  - ResourceReferenceRegistry  - A ResourceReference wont be created for
a resource with key [scope: com.abc.webtools.web.HomePage; name:
images/big.gif; locale: null; style: null; variation: null] because it
cannot be located.

I do have the images at com/abc/webtools/web/images/big.gif location and
Homepage.java in com/abc/webtools/web package.

What am i missing here, what do i need to do to make these work.


Thank You




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-wicket-handles-images-tp4654793.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 handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread heapifyman
Maybe an AjaxLazyLoadPanel could help?
I think you could catch service exceptions in getLazyLoadComponent() and
return an error panel instead of the real one.


2012/12/13 Stefan Renz 

> Hi,
>
> my searches didn't turn up anything, so I figured I ask on the mailing
> list:
>
> Consider the following scenario: a Page contains a number of Panels, one
> of which displays data retrieved by a web service, typically by means of
> LoadableDetachableModel or IDataProvider.
>
> In my case, the WebService used is a Hessian-Endpoint, which is
> conveniently available to the caller as a Proxy of an Interface. Such an
> interface doesn't expose any transport layer exceptions; rather, the
> Proxy takes care of converting any underlying IOException, such as
> ConnectException, into a RuntimeException.
>
> I would like to exchange the Panel with an error message panel saying
> that the service is not available rather than showing an entire error
> page (which is something we do for other kind of exceptions, thanks to
> the fabulous Wicket framework).
>
> How could I achieve something like that? Something like this can happen
> during rendering time, not necessarily in onInitialize(), where I could
> do an alive check and exchange the panel.
>
> Where should I look? What would be your suggestions? Should I come up
> with a Quickstart as an executable example (without the service -- just
> any Exception from within a LoadableDetachableModel#load() will do nicely)?
>
> Thanks in advance,
> bye
> Stefan
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread Stefan Renz
Hi,

my searches didn't turn up anything, so I figured I ask on the mailing list:

Consider the following scenario: a Page contains a number of Panels, one
of which displays data retrieved by a web service, typically by means of
LoadableDetachableModel or IDataProvider.

In my case, the WebService used is a Hessian-Endpoint, which is
conveniently available to the caller as a Proxy of an Interface. Such an
interface doesn't expose any transport layer exceptions; rather, the
Proxy takes care of converting any underlying IOException, such as
ConnectException, into a RuntimeException.

I would like to exchange the Panel with an error message panel saying
that the service is not available rather than showing an entire error
page (which is something we do for other kind of exceptions, thanks to
the fabulous Wicket framework).

How could I achieve something like that? Something like this can happen
during rendering time, not necessarily in onInitialize(), where I could
do an alive check and exchange the panel.

Where should I look? What would be your suggestions? Should I come up
with a Quickstart as an executable example (without the service -- just
any Exception from within a LoadableDetachableModel#load() will do nicely)?

Thanks in advance,
bye
Stefan


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



Wicket 6.3.0 AjaxLink: IAjaxCallListener behaviour

2012-12-13 Thread pe1er
Prior to Wicket 6 the javascript code returned by
IAjaxCallDecorator.decorateScipt was executed immediately after a click. I
migrated IAjaxCallDecorator according to the migration-guide. By clicking 3
times the link within 5 seconds the expected result is:

getPrecondition
getPrecondition
getPrecondition
getSuccessHandler
getSuccessHandler
getSuccessHandler

But the result was:

getPrecondition
getSuccessHandler
getPrecondition
getSuccessHandler
getPrecondition
getSuccessHandler

Is there another way to migrate IAjaxCallDecorator to Wicket 6?

public class HomePage extends WebPage {

 public HomePage(final PageParameters parameters) {
  add(new Label("version",
getApplication().getFrameworkSettings().getVersion()));

  AjaxLink blockingLink = new AjaxLink("blockingLink") {
@Override
public void onClick(AjaxRequestTarget target) {
  try {
Thread.sleep(5000);
  } catch (InterruptedException e) {
e.printStackTrace();
  }
}
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
  super.updateAjaxAttributes(attributes);

  IAjaxCallListener blockingListener = new AjaxCallListener() {
@Override
public CharSequence getPrecondition(Component component) {
  return "console.log('getPrecondition');";
}
@Override
public CharSequence getSuccessHandler(Component component) {
  return "console.log('getSuccessHandler');";
}
  };
  attributes.getAjaxCallListeners().add(blockingListener);
}
  };
  add(blockingLink);
 }
}





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-3-0-AjaxLink-IAjaxCallListener-behaviour-tp4654785.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: Has DropDownChoice changed?

2012-12-13 Thread Sven Meier

I would like to set dropDownChoice.setNullValid(false);


Why? This property is false anyway.


But in 1.5 on the first upload I got a choice of
Choose One
Option 1
Option2


Did you take a look at In wicket-example's DropDownChoicePage? That's exactly 
how the 'site' DropDownChoice works in Wicket 6.

Sven


On 12/13/2012 05:26 PM, N. Metzger wrote:

I don't think I made myself clear. I would like to set
dropDownChoice.setNullValid(false);

And yes, I can do it. But in 1.5 on the first upload I got a choice of
Choose One
Option 1
Option2

Then the user would choose either option 1 or 2 and "Choose One" would
vanish.

In 6.3 I only get
Option 1
Option 2

that's why I was asking if the behavior had changed. A better question would
be: why did the behavior change? I liked it the way it was.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Has-DropDownChoice-changed-tp4653271p4654774.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




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



Re: Has DropDownChoice changed?

2012-12-13 Thread N. Metzger
I don't think I made myself clear. I would like to set
dropDownChoice.setNullValid(false);

And yes, I can do it. But in 1.5 on the first upload I got a choice of
Choose One
Option 1
Option2

Then the user would choose either option 1 or 2 and "Choose One" would
vanish.

In 6.3 I only get
Option 1
Option 2

that's why I was asking if the behavior had changed. A better question would
be: why did the behavior change? I liked it the way it was.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Has-DropDownChoice-changed-tp4653271p4654774.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: Can't get AutocompleteBehavior to work

2012-12-13 Thread Marc Nuri
I meant Wicket 6.3, not 6.0.3



-
--
Marc Nuri
www.marcnuri.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-get-AutocompleteBehavior-to-work-tp4654780p4654781.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



Can't get AutocompleteBehavior to work

2012-12-13 Thread Marc Nuri San FĂ©lix
Hello

I'm migrating my applications to wicket 6.0.3 form the latest Wicket 1.5.

I've got some problems with wicket AutocompleteBehavior. There are no
javascript exceptions in the browser console, but some functionality is not
working.
The problems are regarding showing the list of choices when keys are
pressed in the TextField.  The list is only shown when TextField gains
focus or when 'KEYDOWN' is pressed.

The following function is never triggered from the browser when text is
input:
[code]
Wicket.Event.add(obj, 'inputchange', function (jqEvent) {
var kc = Wicket.Event.keyCode(jqEvent);
switch(kc) {
case KEY_TAB:
case KEY_ENTER:
return jqEvent.stopPropagation();
case KEY_UP:
case KEY_DOWN:
case KEY_ESC:
case KEY_RIGHT:
case KEY_LEFT:
case KEY_SHIFT:
case KEY_ALT:
case KEY_CTRL:
break;
default:
updateChoices();
}
if(typeof objonkeyup === "function") {
return objonkeyup.apply(this,[jqEvent]);
}
});
[/code]

Both "onkeydown"  and "onkeypress" are working, thus the list is only shown
when the down arrow key is pressed in the TextField.


Is anyone else having the same problem? Might be browser related
(Chrome 23.0.1271.95
m)? or is it a bug?

--
Marc Nuri
http://www.marcnuri.com


RE: [ANN] wicket-dnd now ready for Wicket 6

2012-12-13 Thread Chris Colman
Looks good. I can see some very handy uses for drag and drop.
 
>-Original Message-
>From: Sven Meier [mailto:s...@meiers.net]
>Sent: Thursday, 13 December 2012 7:09 PM
>To: users@wicket.apache.org
>Subject: [ANN] wicket-dnd now ready for Wicket 6
>
>Hi all,
>
>I've migrated wicket-dnd, the drag&drop library for Wicket 6:
>
>- now utilizing Wicket's built-in jQuery
>- better support for scrolled containers
>- in Maven central repository soon
>- no changes to the Java API (CSS classes have changed though)
>
>The code is located on github now and a first snapshot is available:
>
> https://github.com/svenmeier/wicket-dnd
>
>If you haven't done so already, take a look at the examples:
>
> http://wicket-dnd.appspot.com
>
>Have fun
>Sven
>
>-
>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: Wicket training - instructor led

2012-12-13 Thread Michael Chandler
Books are on order and shipping to me just in time for the holiday! :) Thanks 
Paul!

-Original Message-
From: Paul Bors [mailto:p...@bors.ws] 
Sent: Thursday, December 13, 2012 9:21 AM
To: users@wicket.apache.org
Subject: RE: Wicket training - instructor led

http://wicket.apache.org/learn/books/

:)

-Original Message-
From: Michael Chandler [mailto:michael.chand...@onassignment.com]
Sent: Thursday, December 13, 2012 11:52 AM
To: users@wicket.apache.org
Subject: Wicket training - instructor led

Greetings!

I was hoping someone might be able to point me in the right direction for 
Wicket training either in the United States or someone interested in doing 
online/webinar training. I have located two good sources in the US who are well 
respected and very knowledgeable, but they are booked solid through the entire 
first quarter of next year.  Is anyone aware of any good training sources for 
Wicket who are willing to do an online classroom style of training?

In the meantime, I'll most likely submit my inquiries (confusion?) here from 
time to time, so hello everyone! Nice to meet you all! ;)

Best,

Mike Chandler


-
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: Wicket training - instructor led

2012-12-13 Thread Paul Bors
http://wicket.apache.org/learn/books/

:)

-Original Message-
From: Michael Chandler [mailto:michael.chand...@onassignment.com] 
Sent: Thursday, December 13, 2012 11:52 AM
To: users@wicket.apache.org
Subject: Wicket training - instructor led

Greetings!

I was hoping someone might be able to point me in the right direction for
Wicket training either in the United States or someone interested in doing
online/webinar training. I have located two good sources in the US who are
well respected and very knowledgeable, but they are booked solid through the
entire first quarter of next year.  Is anyone aware of any good training
sources for Wicket who are willing to do an online classroom style of
training?

In the meantime, I'll most likely submit my inquiries (confusion?) here from
time to time, so hello everyone! Nice to meet you all! ;)

Best,

Mike Chandler


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



Re: Has DropDownChoice changed?

2012-12-13 Thread Sven Meier

In wicket-example's DropDownChoicePage it works fine as ever.

Sven

On 12/13/2012 03:19 PM, N. Metzger wrote:

Anybody with a clue about the DropDownChoice?

I had to set

dropDownChoice.setNullValid(true);

which is not my favorite option. I miss the old behavior where in the
initial rendering the was a "Choose one" option which vanished after the
user made the first "real" choice. Has that been removed in 6.3?

Natalie



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Has-DropDownChoice-changed-tp4653271p4654770.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




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



Re: AjaxEditableLabel not saving after migration to 6.3

2012-12-13 Thread Martin Grigorov
Hi,

By default AEL submits on ENTER key press or blur event. Does it work with
blur ?
Check with Firebug or similar whether an Ajax call is made at all.
Check whether
http://www.wicket-library.com/wicket-examples-6.0.x/ajax/editable-label
works
with your browser.


On Thu, Dec 13, 2012 at 4:16 PM, N. Metzger  wrote:

> Hi all,
>
> I recently migrated from 1.5.5 to 6.3. My objective is to display a list of
> group members with the ability to insert or update an expiration date for a
> specific member. It worked correctly before, but now I'm having problems
> with my AjaxEditableLabel nested in a PropertyColumn. I can click the label
> and type something, but on hitting enter, nothing changes and the
> onSubmit()
> is never called.  As I said, it worked in 1.5.
>
> Below is a code excerpt.
>
> Any pointers would be appreciated,
> Natalie
>
>
> private class PersonTabPanel extends Panel
> {
> public PersonTabPanel(String id){
> super(id);
>
> AjaxFallbackDefaultDataTable dataTable = new
> AjaxFallbackDefaultDataTable("memberTable", definePersonColumns(),
> new
> MemberDataProvider(currentGroup,
> "MEMBER", "PERSON"), ELEMENTS_PER_PAGE);
> dataTable.setItemReuseStrategy(new
> DefaultItemReuseStrategy());
> add(dataTable);
> }
> }
>
> public List> definePersonColumns(){
> List> columns = new
> ArrayList>();
>
> columns.add(new PropertyColumn(new
> Model("Last Name"), "lastname", "lastname"));
> columns.add(new PropertyColumn(new
> Model("First Name"), "displayedFirstName", "displayedFirstName"));
> columns.add(new PropertyColumn(new
> Model("Email Address"), "emailAddress", "emailAddress"));
>
> if (isMemberEditAuthorized(currentGroup.getGroupCode()) ){
>
> columns.add(new PropertyColumn(new
> Model("Expiration (MM/DD/YY)"), "expirationDate", "expirationDate")
> {
> @Override
> public void
> populateItem(Item> cellItem, String
> componentId,
>  final IModel
> rowModel)
> {
> AjaxEditableLabel editableLabel = new
> AjaxEditableLabel(componentId,
> new
> PropertyModel(rowModel, "expirationDate")){
> @Override
> protected void onSubmit(AjaxRequestTarget target){
> int groupCode = currentGroup.getGroupCode();
> Date expiration = (Date)
> getDefaultModelObject();
> if (expiration != null)
> expiration = new Date(expiration.getTime()
> +
> 86399000L); //expires at 23:59:59 on the given date
>
> MemberInterface selectedMember =
> (MemberInterface) rowModel.getObject();
> int gidm = selectedMember.getGidm();
> String memberType =
> selectedMember.getMemberType();
>
> try {
> expireMember(sessionId, midm, groupCode,
> gidm, memberType, expiration);
> logger.debug("{}:{}: Set a member
> expiration
> date to "+
> expiration+" for GIDM " +gidm,
> sessionId, midm);
> } catch (Exception e) {
> logger.error("Caught an exception while
> updating a group member expiration", e);
> error("An error occurred while updating the
> expiration date.");
> }
>
> getLabel().setVisible(true);
> getEditor().setVisible(false);
> target.add(this);
> target.appendJavaScript("window.status='';");
> target.add(feedback);
> }
>
> @Override
> protected String defaultNullLabel(){
> return ("[click to edit]");
> }
>
> @Override
> protected void onError(AjaxRequestTarget target){
>
> target.add(feedback);
> }
> };
> cellItem.add(editableLabel);
> }
> });
>
> [Rest of code omitted]
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxEditableLabel-not-saving-after-migration-to-6-3-tp4654769.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mai

Re: Has DropDownChoice changed?

2012-12-13 Thread N. Metzger
Anybody with a clue about the DropDownChoice?

I had to set 

dropDownChoice.setNullValid(true);

which is not my favorite option. I miss the old behavior where in the
initial rendering the was a "Choose one" option which vanished after the
user made the first "real" choice. Has that been removed in 6.3? 

Natalie



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Has-DropDownChoice-changed-tp4653271p4654770.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



AjaxEditableLabel not saving after migration to 6.3

2012-12-13 Thread N. Metzger
Hi all,

I recently migrated from 1.5.5 to 6.3. My objective is to display a list of
group members with the ability to insert or update an expiration date for a
specific member. It worked correctly before, but now I'm having problems
with my AjaxEditableLabel nested in a PropertyColumn. I can click the label
and type something, but on hitting enter, nothing changes and the onSubmit()
is never called.  As I said, it worked in 1.5. 

Below is a code excerpt. 

Any pointers would be appreciated,
Natalie


private class PersonTabPanel extends Panel
{
public PersonTabPanel(String id){
super(id);

AjaxFallbackDefaultDataTable dataTable = new
AjaxFallbackDefaultDataTable("memberTable", definePersonColumns(), 
new MemberDataProvider(currentGroup,
"MEMBER", "PERSON"), ELEMENTS_PER_PAGE);
dataTable.setItemReuseStrategy(new
DefaultItemReuseStrategy());
add(dataTable); 
 
}
}

public List> definePersonColumns(){
List> columns = new
ArrayList>();

columns.add(new PropertyColumn(new
Model("Last Name"), "lastname", "lastname"));
columns.add(new PropertyColumn(new
Model("First Name"), "displayedFirstName", "displayedFirstName"));
columns.add(new PropertyColumn(new
Model("Email Address"), "emailAddress", "emailAddress"));

if (isMemberEditAuthorized(currentGroup.getGroupCode()) ){
  
columns.add(new PropertyColumn(new
Model("Expiration (MM/DD/YY)"), "expirationDate", "expirationDate")
{
@Override
public void
populateItem(Item> cellItem, String
componentId,
 final IModel
rowModel)
{
AjaxEditableLabel editableLabel = new
AjaxEditableLabel(componentId,
new
PropertyModel(rowModel, "expirationDate")){
@Override
protected void onSubmit(AjaxRequestTarget target){
int groupCode = currentGroup.getGroupCode();
Date expiration = (Date)
getDefaultModelObject();
if (expiration != null)
expiration = new Date(expiration.getTime() +
86399000L); //expires at 23:59:59 on the given date

MemberInterface selectedMember =
(MemberInterface) rowModel.getObject();
int gidm = selectedMember.getGidm();
String memberType =
selectedMember.getMemberType();

try {
expireMember(sessionId, midm, groupCode,
gidm, memberType, expiration);
logger.debug("{}:{}: Set a member expiration
date to "+
expiration+" for GIDM " +gidm,
sessionId, midm);
} catch (Exception e) {
logger.error("Caught an exception while
updating a group member expiration", e);
error("An error occurred while updating the
expiration date.");
}

getLabel().setVisible(true);
getEditor().setVisible(false);
target.add(this);
target.appendJavaScript("window.status='';");
target.add(feedback);
}

@Override
protected String defaultNullLabel(){
return ("[click to edit]");
}

@Override
protected void onError(AjaxRequestTarget target){

target.add(feedback);
}
};
cellItem.add(editableLabel);
}
});

[Rest of code omitted]
 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxEditableLabel-not-saving-after-migration-to-6-3-tp4654769.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



[RELEASE] WicketStuff 6.3.0 released

2012-12-13 Thread Martijn Dashorst
All,

I've released wicketstuff core 6.3.0 based on Wicket 6.3.0 and it will
become shortly available in Maven Central. Below is the changelog
between 6.2.1 and 6.3.0

Martijn

Martin Grigorov (6):
  Merge pull request #163 from wickeria/master
  Merge pull request #164 from Jimlars/patch-1
  Merge pull request #169 from fieona/master
  Merge pull request #170 from wickeria/master
  Merge pull request #174 from ridiekel/master
  Merge pull request #175 from shuraa/master

Geroen Dierckx (5):
  Fixed compilation error of jwicket and changed wicket version to
6.3.0 (no snapshot, that was no longer available in the apache repos)
  Started work on porting YUI components to wicket 6.3.0. First
order of business is to make a YUI common module and seperate
component modules.
  Continue work on moving everything from YUI to seperate modules
  Changes to YUI core and calendar so it compiles under 6.3.0
  Adopted changes as suggested by martin-g

Sofie Muys (4):
  Added idea config dir to gitignore
  Made jWicket part of build
  Added @Override annotation Fixed deprecated methods call
  Merge remote-tracking branch 'upstream/master'

Martijn Dashorst (3):
  Upgrade wicket dependency to 6.3.0-SNAPSHOT
  Fix the parent version to 6.0-SNAPSHOT to make it follow in line with core
  Release wicket stuff core 6.3.0

reiern70 (2):
  porting inmethod grid to jquery
  fix for escape and enter on grid edit

Martin Tzvetanov Grigorov (2):
  Fix a typo in maven-compiler-plugin config
  [objectautocomplete] #173 - Fix the build of objectautocomplete project

dan (2):
  inmethod grid column state fixed
  small fixes

Jimlars (1):
  lat/lon is always in US locale, using valueOf

Alexander Morozov (1):
  Porting wicketstuff-jasperreports project to Apache Wicket 6.x

Michael Mosmann (1):
  readme changes for maven

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



Re: url problem of resourceLink popup page

2012-12-13 Thread Martin Grigorov
Hi,

The popup settings' name is the JavaScript name used in window.open(). It
is used for inter window communication (JavaScript).
The resource name and cache are controlled by IResource's ResourceResponse
fields.


On Wed, Dec 12, 2012 at 7:30 PM, appwicket  wrote:

> Hi
> I am using resourceLink for a grammatically generated pdf resource:
> PopupSettings popupSettings = new PopupSettings("resourcePage",
> PopupSettings.RESIZABLE
> |
> PopupSettings.SCROLLBARS).setHeight(500).setWidth(700);
> ResourceLink resourceLink = (ResourceLink) new
> ResourceLink("resourceLink",getMyResource());
> resourceLink.setPopupSettings(popupSettings);
> myForm.add(resourceLink);
>
> when the popup window opens the name is "Page(application/pdf object)"
> instead of "resourcePage",
> and the link is
>
> http://localhost:8080/myCompany/previewPDf?3-IResourceListener-myForm-resourceLink
>
> The resource is generated when user comes to this page by using page
> parameters sent from previous page.
>
> I notice there are few ways to mount url in application.java but how can I
> mount this dynamic resource?
> another question, sometimes when I open the popup from resourceLink, the
> contents (pdf) are not updating. is there any cache in resourceLink?
>
> Thanks
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/url-problem-of-resourceLink-popup-page-tp4654750.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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


[ANN] wicket-box for Wicket

2012-12-13 Thread Sven Meier

Hi all,

wicket-box is a collection of Behaviors to enhance your Wicket 
components with client-side dynamic layouts.


Most prominently is enhances DataTable to look and feel like other 
modern JavaScript solutions. See here for examples:


http://wicket-box.appspot.com

The code is located on github and a first snapshot is available:

https://github.com/svenmeier/wicket-box

Have fun
Sven

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



[ANN] wicket-dnd now ready for Wicket 6

2012-12-13 Thread Sven Meier

Hi all,

I've migrated wicket-dnd, the drag&drop library for Wicket 6:

- now utilizing Wicket's built-in jQuery
- better support for scrolled containers
- in Maven central repository soon
- no changes to the Java API (CSS classes have changed though)

The code is located on github now and a first snapshot is available:

https://github.com/svenmeier/wicket-dnd

If you haven't done so already, take a look at the examples:

http://wicket-dnd.appspot.com

Have fun
Sven

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



Re: AJAX updating of non "typical components"

2012-12-13 Thread Martin Makundi
Maybe add a dummy component inside the panel that is refreshed instead
and piggybacks your js or smth.

2012/12/13 Ernesto Reinaldo Barreiro :
> Hi,
>
> On Wed, Dec 12, 2012 at 8:29 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> Why not have outputmarkupid=true?
>>
>>
> In this particular use case doing that would mean that a IFeedback panel,
> based on (
> http://www.erichynds.com/jquery/a-jquery-ui-growl-ubuntu-notification-widget/),
> will be reconstructed any time there are errors on page (all JS, and
> dependencies will be streamed back to the server as PART of ART) while the
> only thing that is need is pass back some JavaScript (e.g. appended to ART)
> that adds some notifications at client side widget.
>
>
>
>> 2012/12/12 Ernesto Reinaldo Barreiro :
>> > IHeaderContibutor won't work if component does not has
>> > setOutputMarkupId(true) AjaxRequestHandler#add()
>> >
>> > public void add(Component... components)
>> > {
>> > for (final Component component : components)
>> > {
>> > Args.notNull(component, "component");
>> >
>> > if (component.getOutputMarkupId() == false && !(component instanceof
>> Page))
>> > {
>> > throw new IllegalArgumentException(
>> > "cannot update component that does not have setOutputMarkupId property
>> set
>> > to true. Component: " +
>> > component.toString());
>> > }
>> > add(component, component.getMarkupId());
>> > }
>> > }
>> >
>> > On Wed, Dec 12, 2012 at 4:59 PM, Martin Makundi <
>> > martin.maku...@koodaripalvelut.com> wrote:
>> >
>> >> IHeaderContributor?
>> >>
>> >> 2012/12/12 Ernesto Reinaldo Barreiro :
>> >> > Hi,
>> >> >
>> >> > Several times I have encountered the situation where I want to
>> "update" a
>> >> > component via AJAX and this component does not have
>> >> setOutputMarkupId(true)
>> >> > or even the component generates no  visible markup.  All this
>> component
>> >> > needs is a way to repaint itself (either by adding some sub-components
>> >> that
>> >> > are re-paintable via AJAX or by generating some JavaScript that will
>> >> update
>> >> > component state at client side). So, what I want is being to do
>> >> > target.add(myNotStandardComponent) and wicket to take care of its
>> >> update...
>> >> > Maybe by providing and  interface like
>> >> >
>> >> > IAjaxUpdatable {
>> >> >
>> >> > void update(AjaxRequestTarget target);
>> >> >
>> >> > }
>> >> >
>> >> > that marks the  component as being re-renderable via AJAX ... and
>> modify
>> >> > AjaxRequestTarget logic to take this into account.
>> >> >
>> >> > I gave a look into the sources and the closest thing I have found is
>> >> >
>> >> > interface ITargetRespondListener
>> >> > {
>> >> > /**
>> >> >  * Invoked when AjaxRequestTarget is about the respond.
>> >> >  *
>> >> >  * @param target
>> >> >  */
>> >> > void onTargetRespond(AjaxRequestTarget target);
>> >> > }
>> >> >
>> >> > but these are added via target.registerRespondListener do not seem to
>> be
>> >> > the same.
>> >> >
>> >> > Is the above a good idea? Or shall I simply use
>>  ITargetRespondListener?
>> >> >
>> >> > --
>> >> > Regards - Ernesto Reinaldo Barreiro
>> >> > Antilia Soft
>> >> > http://antiliasoft.com/ 
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Regards - Ernesto Reinaldo Barreiro
>> > Antilia Soft
>> > http://antiliasoft.com/ 
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
> Antilia Soft
> http://antiliasoft.com/ 

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