Re: Wicket 6.2: Required attribute on ListMultipleChoice has no effect

2012-11-07 Thread Martin Grigorov
Hi,

Please create a ticket in Jira with a small quickstart app.
Thanks!


On Tue, Nov 6, 2012 at 6:29 PM, Thomas Heigl tho...@umschalt.com wrote:

 Hey All,

 I noticed that setRequired(true) on ListMultipleChoice does not have an
 effect anymore after upgrading to Wicket 6 from Wicket 1.5.7.

 I think it might be a problem with the ajax library because the AJAX post
 request looks like this (where 'tags' is my select multiple / field)

 tags:null
  :submit:1


 The ListMultipleChoice now thinks that the input was non-empty (String
 'null') and returns an empty list when converting the value and hence
 passes the required check because an empty list is non-null.

 @Override
 protected CollectionT convertValue(String[] ids) throws
 ConversionException
 {
 if (ids != null  ids.length  0  !Strings.isEmpty(ids[0]))
 {
 return convertChoiceIdsToChoices(ids);
 }
 else
 {
 ArrayListT result = new ArrayListT();
 addRetainedDisabled(result);
 return result;
 }
 }

 When I change the component to a simple DropDownChoice the request looks
 like this and everything works as expected:


  tags:
  :submit:1


 Cheers,

 Thomas




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


Re: Currency Converter

2012-11-07 Thread Martin Grigorov
Hi,

You don't use the generics.
I expect to see : extends AbstractNumberConverterDouble and later
convertTo methods work with Double too.
In your #convertToString() I see no call to super.convertToString() but the
exception says that it fails at AbstractNumberConverter.java:**31 so your
override actually doesn't work.


On Wed, Nov 7, 2012 at 3:54 AM, Jered Myers jer...@maplewoodsoftware.comwrote:

 I am updating my application from Wicket 1.4.18 to Wicket 6.2 and my
 currency converter no longer works once I add the generics into it. I am
 using the converter to allow the user to enter an amount of money.  The
 problem is that when something like asdfasdf is entered, I get an
 exception like this:

 java.lang.ClassCastException: java.lang.String cannot be cast to
 java.lang.Number
 at org.apache.wicket.util.**convert.converter.**AbstractNumberConverter.**
 convertToString(**AbstractNumberConverter.java:**31)

 Is there a currency converter already in Wicket that I haven't seen?  Does
 anybody have a good example of a working converter for currency in Wicket
 6.x?

 Here is my code from 1.4 that was working:

 public class CurrencyConverter extends AbstractNumberConverter {
 private static final long serialVersionUID = 1L;

 public CurrencyConverter() {
 }

 @Override
 public NumberFormat getNumberFormat(Locale locale) {
 return NumberFormat.**getCurrencyInstance(locale);
 }

 @Override
 public Class? getTargetType() {
 return Double.class;
 }

 public Object convertToObject(String value, Locale locale) {

 try {
 if(value.startsWith($)) {
 value = value.replace($, );
 }
 value = String.valueOf( Double.valueOf( value ) * 100 );
 value = $ + value;

 return getNumberFormat(locale).parse(**value).doubleValue();
 } catch (ParseException ex) {
 ConversionException conv = new ConversionException(' + value
 + ' is not a valid dollar amount.);
 conv.setResourceKey(**CurrencyConverter);
 throw conv;
 } catch(NumberFormatException ex){
 ConversionException conv = new ConversionException(' + value
 + ' is not a valid dollar amount.);
 conv.setResourceKey(**CurrencyConverter);
 throw conv;
 }
 }

 @Override
 public String convertToString(Object value, Locale locale) {
 if( value == null )
 return null;

 int cents;

 if( value instanceof Integer ) {
 cents = (Integer) value;
 return getNumberFormat(locale).**format((double) cents /
 100.0);
 } else if( value instanceof String ) {
 cents = Integer.parseInt( (String) value );
 return getNumberFormat(locale).**format((double) cents /
 100.0);

 }

 return value.toString();
 }

 }

 --
 Jered Myers




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


Re: Image source location problems, examples did not help

2012-11-07 Thread Delange
sorry, the directory structure is exactly

myapplication 
css 
images 
opdrachten
WEB-INF 
  classes etc etc 


Both directories (images and opdrachten) contain images. The images from
opdrachten are uploads from the website



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Image-source-location-problems-examples-did-not-help-tp4653664p4653673.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: Image source location problems, examples did not help

2012-11-07 Thread Ernesto Reinaldo Barreiro
Why not use ContextImage?

On Wed, Nov 7, 2012 at 11:37 AM, Delange delan...@telfort.nl wrote:

 sorry, the directory structure is exactly

 myapplication
 css
 images
 opdrachten
 WEB-INF
   classes etc etc


 Both directories (images and opdrachten) contain images. The images from
 opdrachten are uploads from the website



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Image-source-location-problems-examples-did-not-help-tp4653664p4653673.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




-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ http://antiliasoft.com/antilia


Checkbox Onclick event usage

2012-11-07 Thread wicket_new_user
Hi,
I need help on how to incorporate the Javascript function for onclick event
in Checkbox

Scenario as follows
==
I have 2 checkboxes and this are taken as a Checkbox group


private CheckGroupModelType addType(final MarkupContainer parent, final
String id,
final IModelModelCriteriaModel model)
{
final CheckGroupModelType result = new CheckGroupReportType(id,
new PropertyModelSetlt;ModelType(model,
model.types));
result.add(new ListViewModelType(modelsTypes,
Arrays.asList(ModelType.values())) {
private static final long serialVersionUID = 1L;

/** {@inheritDoc} */
@Override
protected void populateItem(final ListItemModelType item)
{
item.add(new CheckModelType(type, item.getModel()));
item.add(new Label(name,
getLocalizer().getString(String.format(modelType.%s, item
.getModelObject().getIdentifier()), getPage(;
}
});
parent.add(result);
return result;
}

On clicking of one checkbox, one field needs to be hidden from the form
and unselecting, needs to be displayed back

can you please help me out



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Checkbox-Onclick-event-usage-tp4653676.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: Checkbox Onclick event usage

2012-11-07 Thread Sven Meier

Attach an AjaxFormChoiceComponentUpdatingBehavior to the group.

Sven

On 11/07/2012 12:02 PM, wicket_new_user wrote:

Hi,
I need help on how to incorporate the Javascript function for onclick event
in Checkbox

Scenario as follows
==
I have 2 checkboxes and this are taken as a Checkbox group


private CheckGroupModelType addType(final MarkupContainer parent, final
String id,
 final IModelModelCriteriaModel model)
 {
 final CheckGroupModelType result = new CheckGroupReportType(id,
new PropertyModelSetlt;ModelType(model,
 model.types));
 result.add(new ListViewModelType(modelsTypes,
Arrays.asList(ModelType.values())) {
 private static final long serialVersionUID = 1L;

 /** {@inheritDoc} */
 @Override
 protected void populateItem(final ListItemModelType item)
 {
 item.add(new CheckModelType(type, item.getModel()));
 item.add(new Label(name,
getLocalizer().getString(String.format(modelType.%s, item
 .getModelObject().getIdentifier()), getPage(;
 }
 });
 parent.add(result);
 return result;
 }

On clicking of one checkbox, one field needs to be hidden from the form
and unselecting, needs to be displayed back

can you please help me out



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Checkbox-Onclick-event-usage-tp4653676.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: wicketstuff poms still depend on wicketstuff repo which no longer exists

2012-11-07 Thread Steve Swinsburg
Hi,

This is for a piece of software that has thousands of users building it (Sakai 
CLE), so asking everyone to build their own copy isn't a feasible request.

For now we just grabbed the POMs, edited them and put them in our own 
repository. I note that this was fixed in later versions, perhaps at some stage 
we can upgrade :)

cheers,
Steve


On 01/11/2012, at 7:20 PM, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 You better build the projects locally.
 
 On Thu, Nov 1, 2012 at 1:31 AM, Steve Swinsburg
 steve.swinsb...@gmail.com wrote:
 Hi,
 
 Some artifacts in wicketstuff still mention the old wicketstuff repo, i.e.:
 
 http://repo1.maven.org/maven2/org/wicketstuff/tinymce-parent/1.4.21/tinymce-parent-1.4.21.pom
 
 And on Maven2 that is causing the build to fail:
 
 Downloading: 
 http://repo1.maven.org/maven2/org/wicketstuff/tinymce-parent/1.4.21/tinymce-parent-1.4.21.pom
 3K downloaded  (tinymce-parent-1.4.21.pom)
 Downloading: 
 http://wicketstuff.org/maven/repository/org/wicketstuff/jdk-1.5-parent/1.4.21/jdk-1.5-parent-1.4.21.pom
 
 [WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for 
 org/wicketstuff/jdk-1.5-parent/1.4.21/jdk-1.5-parent-1.4.21.pom - IGNORING
 [INFO] 
 
 [ERROR] BUILD ERROR
 [INFO] 
 
 [INFO] Error building POM (may not be this project's POM).
 
 
 Project ID: null:tinymce-parent:pom:null
 
 Reason: Cannot find parent: org.wicketstuff:jdk-1.5-parent for project: 
 null:tinymce-parent:pom:null for project null:tinymce-parent:pom:null
 
 Any chance a new release can be pushed that doesn't refer to that repo? It 
 is not possible to upgrade to Maven 3 for some versions of software at this 
 time so the build is effectively broken until this is fixed.
 
 thanks,
 Steve
 
 
 
 -
 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
 
 -
 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: Button value with escaped Model String

2012-11-07 Thread Martin Grigorov
Hi,

You markup didn't make it and Nabble doesn't have a record for your thread.

You should use button.setEscapeModelStrings(false) if you are certain that
the button's value wont break the produced markup.


On Tue, Nov 6, 2012 at 12:30 PM, Dirk Forchel dirk.forc...@exedio.comwrote:

 We have a mutli-language Application where Button values are rendered with
 wrong and escaped Strings. Therefore our Button components have a default
 Model which property is used to set the value attribute.
 For example in French, the default Model String of a specific button is S'
 abonner but the rendered value String is S#039; abonner.

 Simplified it looks like this:


 Just if I set


 the Button value is rendered with the correct value (not escaped).
 I think, that the method Button#onComponentTag(ComponentTag) should use
 getDefaultModelObject() (which is a String) instead of
 getDefaultModelObjectAsString().
 Or do I miss something?



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Button-value-with-escaped-Model-String-tp4653650.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 http://jweekend.com/


Re: Wicket Application instance from outside Wicket Application

2012-11-07 Thread Martin Makundi
Solved, extend this class from your webservice or other:

public abstract class AbstractWicketCompatibleWebService {
  private static Application application; // Set in Application()
constructor for example
  private final MockWebApplication mockWebApplication;

  /**
   *
   */
  public AbstractWicketCompatibleWebService() {
Application.set(getApplication());
mockWebApplication = new MockWebApplication(getApplication(), null);
mockWebApplication.createRequestCycle();
  }

  /**
   * @return the application
   */
  public static Application getApplication() {
return application;
  }

  /** Call from Application() constructor for example
   * @param application
   */
  public static void setApplication(Application application) {
AbstractWicketCompatibleWebService.application = application;
  }
}



**
Martin

2012/9/19 Oscar Besga Arcauz obe...@isdefe.es:
 Maybe if you do a foward from webservice to wicket page...

 From other side, you can see Wicket Session classes and data into the normal 
 HttpSession (thougth it needs a little navigation)
 or you can hook data in normal HttpSession into wicket  classes.

 My2cents: I would refactor helpers outside wicket



Oscar Besga Arcauz

 -Martin Grigorov mgrigo...@apache.org escribió: -
 Para: users@wicket.apache.org
 De: Martin Grigorov mgrigo...@apache.org
 Fecha: 18/09/2012  21:42
 Asunto: Re: Wicket Application instance from outside Wicket Application

 See org.apache.wicket.protocol.http.servlet.WicketSessionFilter

 On Tue, Sep 18, 2012 at 9:31 PM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
 Can't the wicket filter be put in from of axis (servlet/filter) so that you
 have a session and application attached to the thread?

 On Tue, Sep 18, 2012 at 6:05 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 We have Axis web services running in the same Jetty as Wicket.

 Our Axis web services happen to call some wicket helper methods, which
 assume there is a session and application on thread. For localization,
 etc.

 How can our Wreb Service best get hold of the wicket application at
 runtime?


 **
 Martin

 -
 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



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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


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



RE: How to call a ModalWindow's close callback?

2012-11-07 Thread Paul Bors
Sounds like you have nested forms and from last time I checked you cannot
submit the outer form from within an inner form. Either get rid of the inner
form so any button will perform the form submission or share a method to
refresh the page and call it from two places.

Wither way you should check into nested forms:
https://cwiki.apache.org/WICKET/nested-forms.html

~ Thank you,
  Paul Bors

-Original Message-
From: rudi [mailto:rudi_mai...@yahoo.com] 
Sent: Tuesday, October 30, 2012 4:58 AM
To: users@wicket.apache.org
Subject: How to call a ModalWindow's close callback?

Hi all,

I have a ModalWindow, which when closed should update a panel (in this case,
happens to be the parent of the ModalWindow) :

final ChangePasswordModal changePasswordModal = new
ChangePasswordModal(changePasswordModal, person,
InputEditCustomerSysPanel.this);
changePasswordModal.setCloseButtonCallback(new CloseButtonCallback() {
@Override
public boolean onCloseButtonClicked(AjaxRequestTarget target) {
info(close button);
target.add(InputEditCustomerSysPanel.this);
return true;
}
});
add(changePasswordModal);

This works when the close button is clicked by the user. However, the
primary use case is the modal will be closed by a an AjaxButton inside a
form inside a panel inside the modal:

AjaxButton submitBtn = new AjaxButton(submitBtn) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form? form) {
//  info(Updating password for  +
person.getObject().getId() +  to be
 + passwordField.getModelObject().toString());
log.info(Updating password for {} to be {},
person.getObject().getId(), passwordField.getModelObject());

person.getObject().setPassword(LdapUtils.encodeSsha(passwordField.getModelOb
ject()));
modalWindow.close(target); // PROBLEM: this doesn't call the
callback above
super.onSubmit(target, form);
}
};
add(submitBtn);

Problem is, the callback is not called by onSubmit(). And I can't call the
callback manually using the ModalWindow because I can't get to the callback
object, i.e. no getCloseButtonCallback() method.

How to solve this? Thank you.

Rudi



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-to-call-a-ModalWindow-s-close
-callback-tp4653456.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: Opening new tab causes model to be null

2012-11-07 Thread Paul Bors
Fix the NPE :)

Try lazy loading the model.

~ Thank you,
  Paul Bors

-Original Message-
From: Gytis [mailto:lietuvis...@mail.ru] 
Sent: Friday, November 02, 2012 7:30 AM
To: users@wicket.apache.org
Subject: Opening new tab causes model to be null

Hello, I have noticed one problem and cannot say how is that happening.
I have a page, which contains form with two DropDowns with AJAX behaviours
on them.
When I select something from first dropdown, AJAX sets some values on other
dropdown.
To get a value from dropDown I use CompoundPropertyModel, and everything
works fine.
But when I open that page in another tab (using Firefox), and select
something from first dropdown, NullPointer exception appears and as I
debugged it seems that my CompoundPropertyModel is null.

How is that happens and how to get rid of it?



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Opening-new-tab-causes-model-to-b
e-null-tp4653565.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: HTML storyboard and Maybe there are several Ajax event behaviors warning

2012-11-07 Thread Paul Bors
If I understand you right, you're navigating between pages.
Must you really use Ajax? Can't you just simply call setResponsePage() and
redirect the user to the page you want?

Also, the error indicates that you're using the same button as a submit
button to a form. Try changing its type from submit to button or have it
surrounded by a form of its own.

~ Thank you,
  Paul Bors

-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com] 
Sent: Friday, November 02, 2012 5:30 PM
To: users@wicket.apache.org
Subject: HTML storyboard and Maybe there are several Ajax event behaviors
warning

Hello,

Our designer put together an HTML storyboard where navigation is implemented
with button onclick=window.location='NextPage.html'.
However, when we add a Wicket behavior to this button we start receiving the
following warning:

WARN  [http-bio-8080-exec-10] org.apache.wicket.ajax.AjaxEventBehavior
- org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1
{event='onclick'} assigned to [AjaxSubmitContentFormLink [Component id =
saveButton]] is overriding the previous value of the inline attribute. Maybe
there are several Ajax event behaviors on the same type assigned to this
component.

I don't want to break the storyboard and would like Wicket not to log this
warning in case when onclick is defined in markup and overridden in Java
code. How can I do that?

Thanks,

Alec

-
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: ContextRelativeResource working different in WebMarkupContainer?

2012-11-07 Thread Paul Bors
Have you turned on the automatic linking inside your webapp markup settings?

wicket:link as documented at:
https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%2527sXHTMLtag
s-Elementwicket%253Alink

Supports the autolink functionality documented at:
https://cwiki.apache.org/WICKET/autolink.html

~ Thank you,
  Paul Bors

-Original Message-
From: Delange [mailto:delan...@telfort.nl] 
Sent: Wednesday, November 07, 2012 5:53 AM
To: users@wicket.apache.org
Subject: ContextRelativeResource working different in WebMarkupContainer?

I try to show images from the images folder. When I use the following code,
it works:

wicket:link
images/284/IMG_0013.JPG
/wicket:link

form.add(new Image(imagetest,new
ContextRelativeResource(images/284/P1010841.JPG)));

The generated html code is:
../page?1-IResourceListener-form-imagetest
Which is fine for me, cause it works


But putting the same code in a WebMarkupContainer and I don't get any image.
Even if I do a little trick on the first image where I use the same code as
above. Why is the webmarkupcontainer working DIFFERENTLY?? How to solve?


Here the code for the images in the webmarkupcontainer:
ul class=jcarousel-skin-tango id=mycarouselb wicket:id=mycarousel  
  li  images/284/IMG_0013.JPG /li
  li  images/284/IMG_0147.JPG /li 
  li wicket:id=rv 
  wicket:link images/284/IMG_0013.JPG
/wicket:link
  /li
 /ul
JCarouselWebMarkupContainer jCarouselWebMarkupContainer = new
JCarouselWebMarkupContainer(mycarousel);
File[] files =
getUploadFolder(order.getImages()).listFiles();
RepeatingView rv = new RepeatingView(rv);
jCarouselWebMarkupContainer.add(rv);
boolean first=true;
for (final File file: files){
WebMarkupContainer parent = new
WebMarkupContainer(rv.newChildId());
rv.add(parent);

Image image=null;
if (first) {
image = new Image(image,new
ContextRelativeResource(images/284/P1010841.JPG));
}else
image = new Image(image, new
ContextRelativeResource(images/284/+file.getName()));
first = false;

parent.add(image ) ;
}

Webstructure
 myapplication
 css
 images
 WEB-INF
 classes
etc






--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/ContextRelativeResource-working-d
ifferent-in-WebMarkupContainer-tp4653675.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



FW: [Building Sakai] Wicket-Sakai archetype Add page in other page

2012-11-07 Thread Antonio muñoz alonso


From: antoniovalenciasp...@hotmail.com
To: steve.swinsb...@gmail.com
Date: Wed, 7 Nov 2012 13:46:52 +0100
CC: sakai-...@collab.sakaiproject.org
Subject: Re: [Building Sakai] Wicket-Sakai archetype Add page in other page




Yes, what you say is doing.
My first page has a dropchoice and button.I want the second page appears 
below.But always keeping the first page to keep doing more consultations.
thanks

Subject: Re: [Building Sakai] Wicket-Sakai archetype Add page in other page
From: steve.swinsb...@gmail.com
Date: Wed, 7 Nov 2012 23:37:50 +1100
CC: sakai-...@collab.sakaiproject.org
To: antoniovalenciasp...@hotmail.com

Hi,
Not quite sure what you are asking. Do you want to open a new page in the tool 
when you click a button/link?
If so, in the onSubmit/onClick handler of the button or link:
setResponsePage(new SomeOtherPage());
You can also do this with AJAX but it invokes replacing panels using the 
AjaxRequestTarget target that Wicket gives you access to. I would recommend the 
first one until you are more comfortable with it.
cheers,Steve


On 07/11/2012, at 10:19 PM, Antonio muñoz alonso 
antoniovalenciasp...@hotmail.com wrote:Hi
how to run a page in another by pressing the button.I can run 2 as a single 
page(JAvascript???).
thanks___sakai-dev mailing 
listsakai-dev@collab.sakaiproject.orghttp://collab.sakaiproject.org/mailman/listinfo/sakai-devTO
 UNSUBSCRIBE: send email to sakai-dev-unsubscr...@collab.sakaiproject.org with 
a subject of unsubscribe
  

___
sakai-dev mailing list
sakai-...@collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscr...@collab.sakaiproject.org 
with a subject of unsubscribe   ___
sakai-dev mailing list
sakai-...@collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscr...@collab.sakaiproject.org 
with a subject of unsubscribe
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

RE: [Building Sakai] Wicket-Sakai archetype Add page in other page

2012-11-07 Thread Antonio muñoz alonso
how to join 2 classes (page1.java, page.java) in one page1.html (javascript?)

From: antoniovalenciasp...@hotmail.com
To: users@wicket.apache.org
Subject: FW: [Building Sakai] Wicket-Sakai archetype Add page in other page
Date: Wed, 7 Nov 2012 14:24:00 +0100






From: antoniovalenciasp...@hotmail.com
To: steve.swinsb...@gmail.com
Date: Wed, 7 Nov 2012 13:46:52 +0100
CC: sakai-...@collab.sakaiproject.org
Subject: Re: [Building Sakai] Wicket-Sakai archetype Add page in other page




Yes, what you say is doing.
My first page has a dropchoice and button.I want the second page appears 
below.But always keeping the first page to keep doing more consultations.
thanks

Subject: Re: [Building Sakai] Wicket-Sakai archetype Add page in other page
From: steve.swinsb...@gmail.com
Date: Wed, 7 Nov 2012 23:37:50 +1100
CC: sakai-...@collab.sakaiproject.org
To: antoniovalenciasp...@hotmail.com

Hi,
Not quite sure what you are asking. Do you want to open a new page in the tool 
when you click a button/link?
If so, in the onSubmit/onClick handler of the button or link:
setResponsePage(new SomeOtherPage());
You can also do this with AJAX but it invokes replacing panels using the 
AjaxRequestTarget target that Wicket gives you access to. I would recommend the 
first one until you are more comfortable with it.
cheers,Steve


On 07/11/2012, at 10:19 PM, Antonio muñoz alonso 
antoniovalenciasp...@hotmail.com wrote:Hi
how to run a page in another by pressing the button.I can run 2 as a single 
page(JAvascript???).
thanks___sakai-dev mailing 
listsakai-dev@collab.sakaiproject.orghttp://collab.sakaiproject.org/mailman/listinfo/sakai-devTO
 UNSUBSCRIBE: send email to sakai-dev-unsubscr...@collab.sakaiproject.org with 
a subject of unsubscribe
  

___
sakai-dev mailing list
sakai-...@collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscr...@collab.sakaiproject.org 
with a subject of unsubscribe   

___
sakai-dev mailing list
sakai-...@collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscr...@collab.sakaiproject.org 
with a subject of unsubscribe   

RE: [Building Sakai] Wicket-Sakai archetype Add page in other page

2012-11-07 Thread Richard W. Adams
Not sure exactly what you're asking, but have you looked at Wicket panels?
_

I have yet to meet a C compiler that is more friendly and easier to use 
than eating soup with a knife.




From:   Antonio muñoz alonso antoniovalenciasp...@hotmail.com
To: users@wicket.apache.org users@wicket.apache.org
Date:   11/07/2012 11:22 AM
Subject:RE: [Building Sakai] Wicket-Sakai archetype Add page in 
other page



how to join 2 classes (page1.java, page.java) in one page1.html 
(javascript?)

From: antoniovalenciasp...@hotmail.com
To: users@wicket.apache.org
Subject: FW: [Building Sakai] Wicket-Sakai archetype Add page in other 
page
Date: Wed, 7 Nov 2012 14:24:00 +0100






From: antoniovalenciasp...@hotmail.com
To: steve.swinsb...@gmail.com
Date: Wed, 7 Nov 2012 13:46:52 +0100
CC: sakai-...@collab.sakaiproject.org
Subject: Re: [Building Sakai] Wicket-Sakai archetype Add page in other 
page




Yes, what you say is doing.
My first page has a dropchoice and button.I want the second page appears 
below.But always keeping the first page to keep doing more consultations.
thanks

Subject: Re: [Building Sakai] Wicket-Sakai archetype Add page in other 
page
From: steve.swinsb...@gmail.com
Date: Wed, 7 Nov 2012 23:37:50 +1100
CC: sakai-...@collab.sakaiproject.org
To: antoniovalenciasp...@hotmail.com

Hi,
Not quite sure what you are asking. Do you want to open a new page in the 
tool when you click a button/link?
If so, in the onSubmit/onClick handler of the button or link:
setResponsePage(new SomeOtherPage());
You can also do this with AJAX but it invokes replacing panels using the 
AjaxRequestTarget target that Wicket gives you access to. I would 
recommend the first one until you are more comfortable with it.
cheers,Steve


On 07/11/2012, at 10:19 PM, Antonio muñoz alonso 
antoniovalenciasp...@hotmail.com wrote:Hi
how to run a page in another by pressing the button.I can run 2 as a 
single page(JAvascript???).
thanks___sakai-dev mailing 
listsakai-dev@collab.sakaiproject.orghttp://collab.sakaiproject.org/mailman/listinfo/sakai-devTO
 
UNSUBSCRIBE: send email to sakai-dev-unsubscr...@collab.sakaiproject.org 
with a subject of unsubscribe
  

___
sakai-dev mailing list
sakai-...@collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to 
sakai-dev-unsubscr...@collab.sakaiproject.org with a subject of 
unsubscribe  

___
sakai-dev mailing list
sakai-...@collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to 
sakai-dev-unsubscr...@collab.sakaiproject.org with a subject of 
unsubscribe  


**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Mounting of ConcatResourceBundleReference in a WebPage

2012-11-07 Thread aws0934
I want a nice URL for my customized ConcatResourceBundleReference.

If the bundle would not have a reference to the Session object in order to
get the WebClientInfo, I could easily mount it in the application´s init
method.

As a workaround I mount the resource in my abstract BasePage (superclass of
WebPage) via:

WebApplication.get().mountResource(css, new
MyConcatResourceBundleReference(cssRefs));

This, I fear, might hurt the application´s performance, because the bundle
is mounted every time a page is requested. Does it hurt? And if yes, is
there any existing mechanism to mount MyConcatResourceBundleReference just
once or do I have to implement that on my own?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-of-ConcatResourceBundleReference-in-a-WebPage-tp4653693.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: Custom CSS for Feedback message is broken in 1.5

2012-11-07 Thread Martin Grigorov
Hi Alec,

Please use the mailing lists. Don't write private messages.

On Wed, Nov 7, 2012 at 8:02 PM, Alec Swan alecs...@gmail.com wrote:

 I verified that the change is in master branch, but not in
 wicket-1.5.x branch. What is wicket-1.5.x branch used for?



martin@martin-laptop:~/git/apache/wicket-1.5.x(wicket-1.5.x=)$ git log
--grep=WICKET-4831
commit d7e019152df0756d307d8136dd94fcdb819823a6
Author: svenmeier svenme...@apache.org
Date:   Fri Nov 2 21:31:46 2012 +0100

WICKET-4831 removed class attribute from markup

commit afec3a61ccd63e833586be33867eb873a721a941
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Date:   Fri Nov 2 19:01:09 2012 +0200

WICKET-4831 Append the feedback message CSS class instead of overriding
it




 On Tue, Nov 6, 2012 at 11:44 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
  The ticket says that the improvement is in 1.5.9, no ?
 
 
  On Wed, Nov 7, 2012 at 1:45 AM, Alec Swan alecs...@gmail.com wrote:
 
  Martin, could you please merge your changes to 1.5.9 branch?
 
  Thanks,
 
  Alec
 
 
  -- Forwarded message --
  From: Alec Swan alecs...@gmail.com
  Date: Fri, Nov 2, 2012 at 1:48 PM
  Subject: Re: Custom CSS for Feedback message is broken in 1.5
  To: users@wicket.apache.org
 
 
  I don't see 1.5.9 branch either and I don't see the changes in 1.5.x
  branch. Martin, where did you check your changes in?
 
  Thanks,
 
  Alec
 
  On Fri, Nov 2, 2012 at 12:56 PM, Sebastien seb...@gmail.com wrote:
   Hi Martin,
  
   Tested  approved! Works like a charm...
  
   I tested upon master branch (6.3.0-SNAPSHOT), because I do not see
 were
   wicket-1.5.9 branch is... But I guess it behaves exactly the same.
   Just a little note; on the version I pulled I still have
   class=errorlevel
   in the associated markup (Sven's added a comment in the ticket about
   this,
   I don't know if you had it)...
  
   Thanks again  best regards,
   Sebastien.
  
   On Fri, Nov 2, 2012 at 6:08 PM, Martin Grigorov
   mgrigo...@apache.orgwrote:
  
   Done!
  
   Please confirm that this is enough for now.
  
   On Fri, Nov 2, 2012 at 7:01 PM, Sebastien seb...@gmail.com wrote:
Great! Thanks Martin!
   
On Fri, Nov 2, 2012 at 5:01 PM, Martin Grigorov 
 mgrigo...@apache.org
   wrote:
   
I'll take care.
   
On Fri, Nov 2, 2012 at 5:59 PM, Sebastien seb...@gmail.com
 wrote:
 Hi Alec,

 If Sven or Martin agree with this solution for 1.5.9  6.3.0, I
 can
attach
 the patch(es) to the opened ticket if needed. (but to replace a
 word
   by
 another, I am not sure my support will help that much! :) )

 I also think that we can keep this AttributeAppender even with
 the
changes
 to be done for wicket7 (with the Martin's suggestion for
 instance). At
 least I do not see yet any potential issue / unexpected behavior
 that
   can
 happens, and we keep the advantage it provides...

 Best regards,
 Sebastien.

 On Fri, Nov 2, 2012 at 4:21 PM, Alec Swan alecs...@gmail.com
 wrote:

 Sebastien, thanks for reviewing and approving the proposal. So,
 what
 do we need to do to make it in 1.5.9? Or did you already check
 it
 in
 there?

 Thanks,

 Alec

 On Thu, Nov 1, 2012 at 6:04 PM, Sebastien seb...@gmail.com
 wrote:
  Hi Alec,
 
  Thanks for having taking time to write the code snippet
 bellow,
  I
better
  understand your idea!..
  I did not realized you didn't want to use getCssClass, but I
  think
   it
is
  good solution anyway! It is easy for the user to replace
  message.isInfo() ? .my-ui-info : .my-ui-error
  by its custom method: getMessageCssClass(message.getLevel())
 or
something
  equivalent as we spoke before, so that's fine for me. Well
  done!
 
  Thanks again  best regards,
  Sebastien.
 
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.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
 




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


Re: NullPointerException is running Wicket 6.2 app

2012-11-07 Thread Martin Grigorov
Hi,

Can you easily reproduce this ?

The problem is at this code in Wicket:

logger.warn(Thread '{}' failed to acquire lock to page with id '{}',
attempted for {} out of allowed {}. The thread that holds the lock has name
'{}'.,
 new Object[] { thread.getName(), pageId, start.elapsedSince(), timeout,
previous.thread.getName() });

For some reason 'previous' is null. But looking at the code it shouldn't be
...
If you can reproduce it in a quickstart application then please attach it
to a ticket in Jira.



On Wed, Nov 7, 2012 at 10:14 PM, saty satya...@gmail.com wrote:

 Any help on what i am doing wrong here..

 Caused by: java.lang.NullPointerException
 at

 org.apache.wicket.page.PageAccessSynchronizer$PageLock.access$000(PageAccessSynchronizer.java:296)
 at

 org.apache.wicket.page.PageAccessSynchronizer.lockPage(PageAccessSynchronizer.java:148)
 at

 org.apache.wicket.page.PageAccessSynchronizer$2.touchPage(PageAccessSynchronizer.java:272)
 at org.apache.wicket.Page.dirty(Page.java:293)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:324)
 at org.apache.wicket.Page.init(Page.java:715)
 at org.apache.wicket.Page.init(Page.java:182)
 at org.apache.wicket.Page.init(Page.java:161)
 at org.apache.wicket.markup.html.WebPage.init(WebPage.java:106)
 at

 org.wicketstuff.security.components.SecureWebPage.init(SecureWebPage.java:59)
 .
 .




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/NullPointerException-is-running-Wicket-6-2-app-tp4653694.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 http://jweekend.com/


Re: NullPointerException is running Wicket 6.2 app

2012-11-07 Thread saty
Thanks for responding,

I am trying to migrate an older app to 6.2 and hit this error.

using debug i could also narrow it down to 'previous' (PageLock previous)
being null, i will try to reproduce this in quickstart application and
create jira.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-running-Wicket-6-2-app-tp4653694p4653697.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: NullPointerException is running Wicket 6.2 app

2012-11-07 Thread saty
I see that timeout prints 0 in my case , so it never executed the  code
previous = locks.get().putIfAbsent(pageId, lock); 

, for some reason the old app did not set a timeout, so after setting it to
something meaningful the app works.

Perhaps

/** timeout value for acquiring a page lock */
private final Duration timeout;

assigning it some default value here may be considered.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-running-Wicket-6-2-app-tp4653694p4653698.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



Unique PDF file name for displaying PDF in iframe

2012-11-07 Thread hannach
Hi there,

Recently I have implemented displaying PDF in iframe on my system reference
to 
https://cwiki.apache.org/WICKET/displaying-content-eg-pdf-excel-word-in-an-iframe.html.

I have list of documents and when user clicks each row, panel at the bottom
will refresh and show corresponding PDF.

It's all good however, when you try to download this PDF file, the file name
is non-user friendly as it looks something like
http---localhost-8080-?wicket-interface=-1-windows-0-window-..-embeddedPdf--IResourceListener--.

This name came from the URL of the iframe. (i.e. src)

Is there any way that I could make PDF name unique and user friendly?

Thank you in advance





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unique-PDF-file-name-for-displaying-PDF-in-iframe-tp4653701.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