Re: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5

2012-04-17 Thread dpmihai
I saw that the resolution for this
bug(https://issues.apache.org/jira/browse/WICKET-4496) is "Not a problem"
using getDefaultModelObject().

But it remains a question. If I have a DatetimeField and I want an
AjaxFormComponentUpdatingBehavior so that if I click the button, or if I
change the hours or minutes field, to see the model of my current date, I
was done like this in wicket 1.4 (and in wicket 1.5 date is null):

private Date date; 

final DateTimeField txtDate = new DateTimeField("txtDate", new
PropertyModel(this, "date")) {
@Override
protected DateTextField 
newDateTextField(java.lang.String id,
PropertyModel dateFieldModel) {
final DateTextField f = 
super.newDateTextField(id, dateFieldModel);
f.add(new 
AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void 
onUpdate(AjaxRequestTarget target) {
System.out.println("*** date=" 
+ f.getDefaultModelObject());
}
});
return f;
}
};
final Component HOUR = txtDate.get("hours");
HOUR.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) { 

System.out.println("*** hours=" + 
HOUR.getDefaultModelObject()); // ok
as sugested
System.out.println("*** date=" + date);  //
null in wicket 1.5
}
});
final Component MINUTES = txtDate.get("minutes");
MINUTES.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
System.out.println("*** minutes=" + 
MINUTES.getDefaultModelObject()); //
ok as sugested
System.out.println("*** date=" + date);  //
null in wicket 1.5
}
});
add(txtDate);

Using getDefaultModelObject() I can get hours and minutes field. But how to
get the entire date? Do you have any sugestions?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4566846.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



WicketStuff Animator

2012-04-17 Thread Andrew Williams
Hi guys,

I have just upgraded a large project from wicket 1.3 to 1.4(.18) and needed to 
update wicketstuff-animator.
I now have a patch against the import-backup on github but have no idea how / 
where to contribute this.

Should I fork the backup (weird) or can I start a new repo from the code in the 
-animator directory? (no history?)

Sorry if this is the wrong forum, very hard to see where to send things with 
all the website moves lately...

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



RE: Wicket cannot find id in inner enclosure...but has no problem in outer one!!!

2012-04-17 Thread Colin Rogers
Hey there,

This is just a guess!!

Why are you creating a new SelectOption?;

SelectOption selectedOption = new 
SelectOption(selectOption[0].getKey(), "Selected Value");

when you could just use the one that exists (selectOption[0])? The 
PropertyModel doesn't make sense, ether. I'd remove that line above, and the 
property model and maybe go for, in total;

ChoiceRenderer choiceRenderer = new 
ChoiceRenderer("value", "key");
final IModel iModel = new 
Model(selectOption[0]);
final DropDownChoice postCategoriesDropDown = new 
DropDownChoice("postCategories", iModel, 
Arrays.asList(selectOption), choiceRenderer);


Like I said, it's a guess, but those things look strange to me... sure other 
people could help better. Hope it helps...

Cheers,
Col.

-Original Message-
From: kshitiz [mailto:k.agarw...@gmail.com]
Sent: Wednesday, 18 April 2012 2:51 AM
To: users@wicket.apache.org
Subject: Re: Wicket cannot find id in inner enclosure...but has no problem in 
outer one!!!

I have removed inner enclosure and its working fine. I am facing another 
problem. This is my code:

ChoiceRenderer choiceRenderer = new 
ChoiceRenderer("value", "key");
SelectOption selectedOption = new
SelectOption(selectOption[0].getKey(), "Selected Value");
final IModel iModel = new 
PropertyModel(selectedOption.getValue(), "value");
final DropDownChoice postCategoriesDropDown = new 
DropDownChoice("postCategories", iModel, Arrays.asList(selectOption), 
choiceRenderer);

Select Option is :

public class SelectOption {

private int key;
  private String value;

  public SelectOption(int key, String value) {
this.key = key;
this.value = value;
  }
/ getters and setters
}

Now here, drop down is being rendered in markup..

*

*

But the as given in the code, I want a particular value to come as default 
value. But the default one is coming out 'Choose One'. What is the issue??
But


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-cannot-find-id-in-inner-enclosure-but-has-no-problem-in-outer-one-tp4559666p4565376.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

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

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



Re: WicketStuff Animator

2012-04-17 Thread andy
Submitted, thanks very much

On Tue, 17 Apr 2012 14:55:43 -0700, Igor Vaynberg

wrote:
> fork the project into your github account, commit the patch, and
> create a pull request.
> 
> -igor
> 
> 
> On Tue, Apr 17, 2012 at 2:52 PM, andy  wrote:
>> Hi guys,
>>
>> I have just upgraded a large project from wicket 1.3 to 1.4(.18) and
>> needed to update wicketstuff-animator.
>> I now have a patch against the import-backup on github but have no idea
>> how / where to contribute this.
>>
>> Should I fork the backup (weird) or can I start a new repo from the
code
>> in the -animator directory? (no history?)
>>
>> Sorry if this is the wrong forum, very hard to see where to send things
>> with all the website moves lately...
>>
>> Thanks,
>> Andrew
>>
>> -
>> 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: WicketStuff Animator

2012-04-17 Thread Igor Vaynberg
fork the project into your github account, commit the patch, and
create a pull request.

-igor


On Tue, Apr 17, 2012 at 2:52 PM, andy  wrote:
> Hi guys,
>
> I have just upgraded a large project from wicket 1.3 to 1.4(.18) and
> needed to update wicketstuff-animator.
> I now have a patch against the import-backup on github but have no idea
> how / where to contribute this.
>
> Should I fork the backup (weird) or can I start a new repo from the code
> in the -animator directory? (no history?)
>
> Sorry if this is the wrong forum, very hard to see where to send things
> with all the website moves lately...
>
> Thanks,
> Andrew
>
> -
> 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



wicktTester.getLastResponseAsString() returns strange result in starting a Component

2012-04-17 Thread carsten behring
Dear all,

This following test :

@Test
public void test() throws Exception {
  WicketTester tester=new WicketTester();
  tester.startComponentInPage(new Label("lableId", "content") {
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("test","123");
}
 });
  tester.assertResultPage("icket:id=\"lableId\" test=\"123\">content");
  assertEquals("icket:id=\"lableId\" test=\"123
\">content",tester.getLastResponseAsString());
  assertEquals("",tester.getResponse().getDocument());
}





expose IMHO a very strange result.   As you can see, the page content
returned by getPastResponseAsString() is
"icket:id=\"lableId\" test=\"123\">content"   , so somehow cut in the
middle.

I want to use a similar test, testing a extension of Label.

Do I do something wrong by starting a component (without explicit page)
like 

tester.startComponentInPage(new Label("lableId", "content"):


Thanks for any help,

Carsten


WicketStuff Animator

2012-04-17 Thread andy
Hi guys,

I have just upgraded a large project from wicket 1.3 to 1.4(.18) and
needed to update wicketstuff-animator.
I now have a patch against the import-backup on github but have no idea
how / where to contribute this.

Should I fork the backup (weird) or can I start a new repo from the code
in the -animator directory? (no history?)

Sorry if this is the wrong forum, very hard to see where to send things
with all the website moves lately...

Thanks,
Andrew

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



Re: Page Expired with Google Analytics Tracking Code

2012-04-17 Thread Andre Schütz
Hi, I will try to complete that in the next days and
attach the quickstart as an answer.

Thank you for the help,
Andre

On Mon, 16 Apr 2012 22:57:11 +0200
Bas Gooren  wrote:

> Hi,
> 
> Can you build a small quickstart so I can have a look at things when 
> they are not working?
> So just the bare minimum where it's not working: your page that is not 
> working with a dummy model (e.g. with hardcoded results).
> 
> Bas
> 
> Op 16-4-2012 20:50, schreef Andre Schütz:
> > Hi,
> >
> > I tried with super.renderHead..., but the result is the
> > same. The PageableListView is empty after clicking on
> > one of links in the PagingNavigator.
> >
> > Additinally, I fodun out that the elements (listItem) are
> > empty when I click on one of the links in the PagingNavigator.
> > They are filled, when the PageableListView is build.
> > Any idea why how that could happen?
> >
> > Andre
> >
> > On Fri, 13 Apr 2012 10:29:41 +0200
> > Bas Gooren  wrote:
> >
> >> Hi,
> >>
> >> What happens if you change that to:
> >>
> >> @Override
> >> public void renderHead(HeaderResponse response) {
> >> super.renderHead(response);
> >> String script = "var _gaq = _gaq || ...";
> >> response.renderJavaScript(script, null);
> >> }
> >>
> >> ? (note that I added a call to super.renderHead());
> >>
> >> Bas
> >>
> >> Op 11-4-2012 23:08, schreef Andre Schütz:
> >>> Hi,
> >>>
> >>> I implemented your version but still I get the same error, if
> >>> I have the Google Analytics Code in the head.
> >>>
> >>> Could it be an error with the way I insert the Google
> >>> Analytics Code? I do it in the following way.
> >>>
> >>> In my WebPage class I overwrite the following method:
> >>>
> >>> @Override
> >>> public void renderHead(HeaderResponse response) {
> >>> String script = "var _gaq = _gaq || ...";
> >>> response.renderJavaScript(script, null);
> >>> }
> >>>
> >>> Andre
> >>>
> >>> On Wed, 11 Apr 2012 11:38:52 +0200
> >>> Bas Gooren   wrote:
> >>>
>  Well, for starters I wonder why you are using multiple
>  LoadableDetachableModels in a Vector?
> 
>  What we do 99% of the time is this:
>  - Wrap the entire resultset in a LDM
>  - Feed that LDM to a ListView or a variant (we have a custom
>  RepeatingView for paged database listings)
>  - Use PropertyModels inside the repeater item(s) (or not, since the
>  ListView will refresh itself anyway)
> 
>  I'm pretty sure you don't need setReuseItems(true) in this case; The
>  only reason I've seen where it's required on a ListView is when you use
>  it inside a form and need form validation to work. Since I don't see any
>  form fields inside your listview I guess this is not the case.
> 
>  I also wonder why you had "datacontainer.setVersioned(false)"?
> 
>  E.g.:
> 
>  private void displayResults(IModel>
>  results, int entriesPerPage) {
> WebMarkupContainer datacontainer = new 
>  WebMarkupContainer("listviewContainer");
> datacontainer.setOutputMarkupId(true);
> add(datacontainer);
> 
> PageableListViewlistview = new 
>  PageableListView("listview", results, 
>  entriesPerPage) {
> StringBuilder sb;
> 
> @Override
> protected void populateItem(ListItem
>  item) {
> DefaultSearchResult s = item.getModelObject();
> 
> // Either (A)
>   item.add(new ExternalLink("title", new 
>  PropertyModel(item.getModel(), "title"));
>   // Or (B)
>   item.add(new ExternalLink("title", s.getTitle());
> 
> item.add(new Label("description", new 
>  PropertyModel(item.getModel(), "description")));
> item.add(new Label("time", 
>  s.getTime()).setEscapeModelStrings(false));
> }
> };
> 
> datacontainer.add(listview);
>  AjaxPagingNavigator apn = new 
>  AjaxPagingNavigator("navigator", listview){
>  @Override
>  protected void onAjaxEvent(AjaxRequestTarget target) {
>  super.onAjaxEvent(target);
>  target.appendJavaScript("scrollTo(0,0)");
>  }
>  };
> datacontainer.add(apn);
>  }
> 
> 
> 
> 
>  Op 11-4-2012 11:22, schreef wic...@faustas.de:
> > Hi,
> >
> > thank you for the answer.
> >
> > The "they are not completely empty" means the following. My results 
> > variable
> > is a Vector that contains LoadableDetachableModel's in the form of the
> > LoaableListingEntryModel. This model contains a class that has two 
> > variables
> > that I access with getResults() and getTime().
> > The content of the getResults() variable is a class that implements the 
> > Serializable
> > interface. The getT

Re: Wicket cannot find id in inner enclosure...but has no problem in outer one!!!

2012-04-17 Thread kshitiz
I have removed inner enclosure and its working fine. I am facing another
problem. This is my code:

ChoiceRenderer choiceRenderer = new
ChoiceRenderer("value", "key");
SelectOption selectedOption = new
SelectOption(selectOption[0].getKey(), "Selected Value");
final IModel iModel = new
PropertyModel(selectedOption.getValue(), "value");
final DropDownChoice postCategoriesDropDown = new
DropDownChoice("postCategories", iModel, Arrays.asList(selectOption),
choiceRenderer);

Select Option is :

public class SelectOption {

private int key;
  private String value;

  public SelectOption(int key, String value) {
this.key = key;
this.value = value;
  }
/ getters and setters
}

Now here, drop down is being rendered in markup..

*

*

But the as given in the code, I want a particular value to come as default
value. But the default one is coming out 'Choose One'. What is the issue??
But


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-cannot-find-id-in-inner-enclosure-but-has-no-problem-in-outer-one-tp4559666p4565376.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 And Multi-threaded Business Object

2012-04-17 Thread cmagnollay
So I have somewhat limited experience with serialization, Wicket, and multi
thread projects so bear with me.

Essentially my web application class is instantiating a POJ (parentObject)
which creates a starts a new timer and instantiates several POJs
(childObjects) that also have timers in them. These childObjects are stored
in a list in the parentObject class. Pages in my wicket application need to
access parentObject, so I made it accessible as so:

public Object getParentObject
{
   return this.parentObject;
}

And it is retrieved in each page like so:

((MyApplication)Application.get()).getParentObject()

The problem currently is that the timertask for both the parentObject and
childObjects are no longer being called every minute as they should be. My
logs pick up the first start of the parentObject, but the logging message is
never outputted again signalling that the run() method of parent Object's
timertask is not being executed every minute. The same holds true for the
child Objects. It seems like the timers are only being executed once. Below
is some pseudocode for what I have

public class childObject implements Serializable
{
private transient NamedParameterJdbcTemplate njt;
private transient Timer timer;

public childObject(DataSource ds)
{
this.njt = new NamedParamterJdbcTemplate(ds);
}

public void start()
{
timer = new Timer();

timer.schedule(new TimerTask(){

public void run()
{
//do some stuff that is never happening
}

}, 0, 6);
}
}

public class ParentObject implements Serializable
{
private DataSource ds;
private List childObjects;
private transient Timer;

public ParentObject(DataSource ds)
{
this.ds = ds;
//add some stuff to childObjects

timer = new Timer();

timer.schedule(new TimerTask(){

public void run()
{
for(some condition)
{
//Do some stuff

if(/*condition is met*/)
{
 //starts the child's timer to do stuff
childObjects.get(i).start();
}
}
}

}, 0, 6);
}
}

public MyApplication extends WebApplication
{
private ParentObject object;
private DataSource ds;

public void init()
{
super.init();

ApplicationContext context = new
ClassPathXmlApplicationContext("/applicationContext.xml");
ds = (DataSource) context.getBean("dataSource");

parentObject = new ParentObject(ds);
}
}

Do I even need to make these objects Serializable? The objects themselves
are never being attached to wicket components, although String, integer,
Date sorts of variables that are members of their classes are.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-And-Multi-threaded-Business-Object-tp4565337p4565337.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



After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?

2012-04-17 Thread fachhoch
I need to handle this , I know this  is asked several times in forums , the
solutions  suggested I cannot apply  as this happens once in while and I
dont have steps to  reproduce this , this happens in page 1  ,  page2 etc ,
but not always in page1 or page2 , its happens if database  for some reason
taking time for the query the page is using, the problem I face with this is
none of my other links work   , all links get stuck , only   a new session 
will work good, user will close   and start a new browser to over come this
problem, I need advice if I can globally handle this , I   want to show an
error page and tell wicket it need not wait for the page map to fulfill the
request  and complete the request by  sending the error page.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4565091.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: getconverter is final

2012-04-17 Thread Tom Eugelink


https://issues.apache.org/jira/browse/WICKET-4503

By now I have created my own JodaDateTextField and a JodaDateConverter. The 
only thing that doesn't work yet is the DatePicker popup; it doesn't format the 
time.

Tom



On 2012-04-17 16:21, Martin Grigorov wrote:

I see no reason why to keep the final at
org.apache.wicket.datetime.markup.html.form.DateTextField#getConverter()
There are several other places where #getConverter() is overridden and
it is not final there.




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



Re: getconverter is final

2012-04-17 Thread Martin Grigorov
Hi Tom,

I see no reason why to keep the final at
org.apache.wicket.datetime.markup.html.form.DateTextField#getConverter()
There are several other places where #getConverter() is overridden and
it is not final there.

Please file a ticket.

On Tue, Apr 17, 2012 at 5:16 PM, Tom Eugelink  wrote:
>
> Is there any particular reason why getConverter has been made final. I
> really would like to roll in my own converter in DateTextField to handle
> Joda time.
>
> Tom
>
>
>
> -
> 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



getconverter is final

2012-04-17 Thread Tom Eugelink


Is there any particular reason why getConverter has been made final. I really 
would like to roll in my own converter in DateTextField to handle Joda time.

Tom



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



Re: remove /wicket in front of url Wicket 1.5

2012-04-17 Thread Martin Grigorov
In YourApp class:

public IMapperContext newMapperContext() {
   return new MyMapperContext();
}

MyMapperContext.java:
class MyMapperContext extends DefaultMapperContext {
   @Override
   public String getNamespace() { return "mine"; }
}

On Tue, Apr 17, 2012 at 4:50 PM, Taag  wrote:
> The easy one. I only need this for a popupwindow that I want to change the
> path on. from /wicket/.. to /..
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/remove-wicket-in-front-of-url-Wicket-1-5-tp4564704p4564787.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

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



Re: remove /wicket in front of url Wicket 1.5

2012-04-17 Thread Taag
The easy one. I only need this for a popupwindow that I want to change the
path on. from /wicket/.. to /..

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/remove-wicket-in-front-of-url-Wicket-1-5-tp4564704p4564787.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: remove /wicket in front of url Wicket 1.5

2012-04-17 Thread Martin Grigorov
On Tue, Apr 17, 2012 at 4:40 PM, Taag  wrote:
> Maby a dumb question, but i can't seem to find the right place to do this.
> And do i need a prefix? Is there a code example with this? =)

To do which option ?

>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/remove-wicket-in-front-of-url-Wicket-1-5-tp4564704p4564757.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

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



Re: remove /wicket in front of url Wicket 1.5

2012-04-17 Thread Taag
Maby a dumb question, but i can't seem to find the right place to do this.
And do i need a prefix? Is there a code example with this? =)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/remove-wicket-in-front-of-url-Wicket-1-5-tp4564704p4564757.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: remove /wicket in front of url Wicket 1.5

2012-04-17 Thread Martin Grigorov
Hi,

Easy solution: replace 'wicket' with 'myOwnPrefix' by registering
custom IMapperContext by overriding Application#newMapperContext()
method

More complex: see PageInstanceMapper and create your own that does the
same job but uses less segments for the url.

On Tue, Apr 17, 2012 at 4:22 PM, Taag  wrote:
> Hey, I'm haveing a problem one url. Is there a way to remove the /wicket that
> is added to the url when this is run. The page opens up in a new window,
> from the popup settings added to the link:
>
> setResponsePage( new OwnWindowPage( object ) );
>
> The url i get is ...wicket/page?5
> I only want it like /page?5
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/remove-wicket-in-front-of-url-Wicket-1-5-tp4564704p4564704.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

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



remove /wicket in front of url Wicket 1.5

2012-04-17 Thread Taag
Hey, I'm haveing a problem one url. Is there a way to remove the /wicket that
is added to the url when this is run. The page opens up in a new window,
from the popup settings added to the link:

setResponsePage( new OwnWindowPage( object ) );

The url i get is ...wicket/page?5
I only want it like /page?5

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/remove-wicket-in-front-of-url-Wicket-1-5-tp4564704p4564704.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 minimize window ?

2012-04-17 Thread Andrea Del Bene
Well, I don't know if this is exactly what you need but in order to
close a modal window via JavaScript I use the following instruction:

Wicket.Window.get().settings.onCloseButton();


>
> Yes..  please give some suggestion to achieve this requirment
>
>
>
>
> |->
> |Andrea Del Bene  |
> |  |
> | |
> | |
> | |
> |2012/04/17 下午 05:53|
> | |
> | |
> |Please respond to|
> | users@wicket.apache.org |
> | |
> |->
>   
> >--|
>   |   
>|
>   |   
>|
>   |   
>  To|
>   |users@wicket.apache.org
>|
>   |   
>  cc|
>   |   
>|
>   |   
> Subject|
>   |Re: How to minimize window ?   
>|
>   |   
>|
>   |   
>|
>   |   
>|
>   |   
>|
>   |   
>|
>   
> >--|
>
>
>
>
> Hi,
>
> can you be more specific? What kind of window are you trying to
> minimize? A modal window?
>
> PS: btw, the corporate site of tsmc is built with Wicket :)?
>> Dear All:
>>   I want to add a JS code into the following method to minimize
> the
>> window, but it doesn't work..
>> Could anyone give me some suggestion to solve this issue?
>> Thanks a Millions
>>
>>   protected CharSequence 
>> getEventHandler
> ()
>>   {
>>   
>> AppendingStringBuffer
> rtnJs=new
>> AppendingStringBuffer("if (!confirm('continue?')) return false;
>> How_to_min_win();");
>>   return 
>> rtnJs.append
> (super.getEventHandler()).append
>> ("; return false;");
>>   }
>>
>>
>> Best Regards,
>>
>> BSID/ERP
>> Joan Wang
>>
>>
> ---
>>   TSMC PROPERTY
>>   This email communication (and any attachments) is proprietary
> information
>>   for the sole use of its
>>   intended recipient. Any unauthorized review, use or distribution by
> anyone
>>   other than the intended
>>   recipient is strictly prohibited.  If you are not the intended
> recipient,
>>   please notify the sender by
>>   replying to this email, and then delete this email and any copies of it
>>   immediately. Thank you.
>>
> ---
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>

Re: How to minimize window ?

2012-04-17 Thread swwangl


Yes..  please give some suggestion to achieve this requirment




|->
|Andrea Del Bene  |
|  |
| |
| |
| |
|2012/04/17 下午 05:53|
| |
| |
|Please respond to|
| users@wicket.apache.org |
| |
|->
  
>--|
  | 
 |
  | 
 |
  | 
   To|
  |users@wicket.apache.org  
 |
  | 
   cc|
  | 
 |
  | 
  Subject|
  |Re: How to minimize window ? 
 |
  | 
 |
  | 
 |
  | 
 |
  | 
 |
  | 
 |
  
>--|




Hi,

can you be more specific? What kind of window are you trying to
minimize? A modal window?

PS: btw, the corporate site of tsmc is built with Wicket :)?
> Dear All:
>I want to add a JS code into the following method to minimize
the
> window, but it doesn't work..
> Could anyone give me some suggestion to solve this issue?
> Thanks a Millions
>
>protected CharSequence 
> getEventHandler
()
>{
>
> AppendingStringBuffer
rtnJs=new
> AppendingStringBuffer("if (!confirm('continue?')) return false;
> How_to_min_win();");
>return 
> rtnJs.append
(super.getEventHandler()).append
> ("; return false;");
>}
>
>
> Best Regards,
>
> BSID/ERP
> Joan Wang
>
>
---
>   TSMC PROPERTY
>   This email communication (and any attachments) is proprietary
information
>   for the sole use of its
>   intended recipient. Any unauthorized review, use or distribution by
anyone
>   other than the intended
>   recipient is strictly prohibited.  If you are not the intended
recipient,
>   please notify the sender by
>   replying to this email, and then delete this email and any copies of it
>   immediately. Thank you.
>
---
>
>
>
>
>
> -
> 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



 --- 
 TSMC PROPER

ModalWindow in iframe problem in IE9

2012-04-17 Thread besty
Hi all,

I implemented ModalWindow using wicket 1.4.19. After the modalWindow was
opened, it frozed the whole IE window. Has anyone ever had the same
experience? After a couple of experiments, I found out that the problem
would disappear if the div which wraps over the ifram consisted of scroll
bars.

I tested it with FireFox and Safari and it worked fine.

Thanks in advance

Best 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-in-iframe-problem-in-IE9-tp4564382p4564382.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 minimize window ?

2012-04-17 Thread Andrea Del Bene

Hi,

can you be more specific? What kind of window are you trying to 
minimize? A modal window?


PS: btw, the corporate site of tsmc is built with Wicket :)?

Dear All:
I want to add a JS code into the following method to minimize the
window, but it doesn't work..
Could anyone give me some suggestion to solve this issue?
Thanks a Millions

protected CharSequence getEventHandler()
{
AppendingStringBuffer rtnJs=new
AppendingStringBuffer("if (!confirm('continue?')) return false;
How_to_min_win();");
return 
rtnJs.append(super.getEventHandler()).append
("; return false;");
}


Best Regards,

BSID/ERP
Joan Wang

  ---
  TSMC PROPERTY
  This email communication (and any attachments) is proprietary information
  for the sole use of its
  intended recipient. Any unauthorized review, use or distribution by anyone
  other than the intended
  recipient is strictly prohibited.  If you are not the intended recipient,
  please notify the sender by
  replying to this email, and then delete this email and any copies of it
  immediately. Thank you.
  ---





-
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: 1.5 - getResourceSettings addResourceFolder - getResource

2012-04-17 Thread Martin Grigorov
Hi,

ResourceGetter.getClass().getResource() has nothing to do with Wicket.
It will try to load the resource from the same folder where
ResourceGetter is.

By adding a custom folder with
getResourceSettings().addResourceFolder() you can later load from it
with 
org.apache.wicket.settings.IResourceSettings#getResourceFinder().find(Class,
String). The class argument may be null.

On Tue, Apr 17, 2012 at 11:24 AM, Marieke Vandamme
 wrote:
> Dear,
>
> I'm converting a project from wicket 1.4 to wicket 1.5.
> Underneath worked in 1.4, but doesn't in 1.5.
>
> - In my application I add an additional resource folder:
>  getResourceSettings().addResourceFolder("c:\\myfolder");
> - I have a class ResourceGetter in com.test package.
> - I'm trying to get "test.xml" from the filesystem doing the following:
>  ResourceGetter.getClass().getResource("test.xml").
> - This works when the "test.xml" is inside my project, but not when it's on
> c:\myfolder\com\test\test.xml.
>
> Is this a bug, or am I doing something wrong? Thanks in advance !
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/1-5-getResourceSettings-addResourceFolder-getResource-tp4563969p4563969.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

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



1.5 - getResourceSettings addResourceFolder - getResource

2012-04-17 Thread Marieke Vandamme
Dear, 

I'm converting a project from wicket 1.4 to wicket 1.5. 
Underneath worked in 1.4, but doesn't in 1.5. 

- In my application I add an additional resource folder:
  getResourceSettings().addResourceFolder("c:\\myfolder");
- I have a class ResourceGetter in com.test package.
- I'm trying to get "test.xml" from the filesystem doing the following:
  ResourceGetter.getClass().getResource("test.xml").
- This works when the "test.xml" is inside my project, but not when it's on
c:\myfolder\com\test\test.xml.

Is this a bug, or am I doing something wrong? Thanks in advance !

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-getResourceSettings-addResourceFolder-getResource-tp4563969p4563969.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 minimize window ?

2012-04-17 Thread swwangl

Dear All:
I want to add a JS code into the following method to minimize the
window, but it doesn't work..
Could anyone give me some suggestion to solve this issue?
Thanks a Millions

protected CharSequence getEventHandler()
{
AppendingStringBuffer rtnJs=new
AppendingStringBuffer("if (!confirm('continue?')) return false;
How_to_min_win();");
return 
rtnJs.append(super.getEventHandler()).append
("; return false;");
}


Best Regards,

BSID/ERP
Joan Wang

 --- 
 TSMC PROPERTY   
 This email communication (and any attachments) is proprietary information   
 for the sole use of its 
 intended recipient. Any unauthorized review, use or distribution by anyone  
 other than the intended 
 recipient is strictly prohibited.  If you are not the intended recipient,   
 please notify the sender by 
 replying to this email, and then delete this email and any copies of it 
 immediately. Thank you. 
 --- 





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