Re: How to test just a panel using apache wicket?

2011-11-26 Thread sudeivas
I just used tester.startPanel(new xxpanel(x,y));

It worked for me. Make sure that this panel has a .html file associated with
it. Also make sure that you don't have any mock objects for the parent page
or for this panel. Just keep the test case as simple as possible. Let me
know if you still have this issue. Also post your code. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4111869.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: Howto override markup

2011-11-26 Thread Jeremy Thomerson
On Sat, Nov 26, 2011 at 4:37 PM, Stan.  wrote:

> Hallo, please advice.
> I have BasePage, Page1 and Page2. Page2 extends Page1, Page1 extends
> BasePage. When is Page1 opened, his markup is placed into BasePage instead
> . But doesn't work identically for Page2. How can I do this?
> Thanks.
>

BasePage.html:


  blah, blah
  


Page1.html (extends BasePage)



  this is page 1
  

some other markup


Page2.html (extends Page1)



  this is page 2

some other markup


Now

Viewing Page1 gives you:

  blah, blah
  this is page 1


Viewing Page2 gives you:

  blah, blah
  this is page 1
  this is page 2


Is that what you wanted?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: How to test just a panel using apache wicket?

2011-11-26 Thread Igor Vaynberg
tester.startpanel(panel)?

-igor

On Sat, Nov 26, 2011 at 3:57 PM, kamiseq  wrote:
> the javadoc of ITesterPanelSource says Depreced since no longer needed in
> 1.5.3
>
> can you give examples?
>
> pozdrawiam
> Paweł Kamiński
>
> kami...@gmail.com
> pkaminski@gmail.com
> __
>

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



Newbie Questions: Getting Plain HTML

2011-11-26 Thread Em
Hello list,

I am absolutely new to Apache Wicket (and new to writing
java-web-frontends instead of web-services) and not sure whether it is
right for my needs.

I got some questions regarding the rendering process.
For template sharing between client and server it would be great if I
can get a wicket-tag-free template-version at processing time.

The idea:
My Wicket-template looks like:

  

  $userNameTitle
  $lastLoginTitle



  $userName
  $lastLogin

  


When I am interested in the user's section, I want to do the following
(in pseudo-code):

myUserView.getTemplate();
//output is completely freed of Wicket-specific stuff:
  
$userName
$lastLogin
  


However I am even happy with this output:
  


  
NOTE: The inner wicket:id's were left. Maybe I have to call their
content seperately (and then getting their content together with the
corresponding placeholders).

What is the main idea behind that?
A collegue of mine comes from the PHP-corner. They were able to share
the template between server and backend, so that a client-side
JS-template-engine rendered the same HTML as the server's
template-engine (PHP).
On AJAX-requests they were saving a lot of traffic and ressources, since
they just needed to serialize their PHP-models to JSON and respond them
to the client.
Their JavaScript developers did not need to know about the PHP-backend.
Using Apache Wicket, I want to achieve the same with a Java-backend.

Another thing:
Using PHP and a placeholder-like template-engine that supports basic
logic (if, else, loops) their designers did not need to know about the
PHP-classes that are responsible for creating the placeholders as long
as they worked correctly.
So a designer without knowledge about the backend's language was able to
work on a template. He was able to give even and uneven rows in a table
different colours right from the template's logic.
Is this possible with Apache Wicket, too?

Any other suggestions, opinions, advices? :)

Regards,
Em

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



Re: How to test just a panel using apache wicket?

2011-11-26 Thread kamiseq
the javadoc of ITesterPanelSource says Depreced since no longer needed in
1.5.3

can you give examples?

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


Re: How to test just a panel using apache wicket?

2011-11-26 Thread kamiseq
for me this does not works either in 1.5.3 as inner test page has no markup

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__
>
>
>


Howto override markup

2011-11-26 Thread Stan.
Hallo, please advice.
I have BasePage, Page1 and Page2. Page2 extends Page1, Page1 extends
BasePage. When is Page1 opened, his markup is placed into BasePage instead
. But doesn't work identically for Page2. How can I do this?
Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Howto-override-markup-tp4111284p4111284.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: duplicate form - js modal window

2011-11-26 Thread nazeem
Hi 

[RESUBMITTING AS I HAD TO EDIT]

I have a simple form, which works well when embedded in any page. The same
content when opened as js popup using javascript the content is duplicated
and shown as popup. That means i have two forms in page with the same id,
fields, button etc. The java script duplicates the content and shows in
modal dialog.

As a result the original form in page works whereas the one shown in popup
does not work as expected. 
The form in popup when tried to submit, shows the following in Ajax debug
message.

Ajax POST stopped because of precondition check,
url:?x=LSivuEhoy*0lYZYdkl28r0Tv03L6AnM-uQ1oeRJYX32lx*dhp5v980O2uGjT4de84YNs5nAmYtdaKZrrBJmc65k*0OsItSe57YMJJG8zmSeufYendFBylCR5*40t33QaHq2GavzsnRnN8VKmP04s19B2rKuYIvFi4heVbshvWHrlGfbP*hP2p8NELqZP2550

How do I overcome this ? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/duplicate-form-js-modal-window-tp4110289p4110295.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



duplicate form - js modal window

2011-11-26 Thread nazeem
Hi 

I have a simple form, which works well when embedded in any page. The same
content when opened as js popup using javascript the content is duplicated
and shown as popup. That means i have two forms in page with the same id,
fields, button etc. The java script duplicates the content and shows in
modal dialog.

How do I overcome this ? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/duplicate-form-js-modal-window-tp4110289p4110289.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: repeated PageExpired error

2011-11-26 Thread nazeem
Not able to reproduce in quick start. will try and update ASAP

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/repeated-PageExpired-error-tp4106667p4110276.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: AjaxRequestTarget on page open

2011-11-26 Thread Paul Szulc
Ok, I got the working solution

add(new AbstractAjaxTimerBehavior(Duration.seconds(1)) {

@Override
protected void onTimer(AjaxRequestTarget target) {
System.out.println("---> ajax");
stop();
}
});

On Sat, Nov 26, 2011 at 11:50 AM, Paul Szulc  wrote:

> This is going to be a lame question :) but I need help with this one.
>
> I have DialogWindow (from visural-wicket library) that can be opened using
> AjaxRequestTarget, below example that opens that dialog when ajax link is
> clicked
>
> add(new IndicatingAjaxLink("addCostUp") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> addCostDialog.open(target);
> }
> });
>
> Is there a way to open that dialog when page is opened? You know, someone
> is entering a page and dialog pops out? To open that dialog I need
> AjaxRequestTarget. Is there a way to make page request ajax call just right
> after the page was loaded?
>
> Paul Szulc
>



-- 
Best regards,
Paul Szulc

http://www.paulszulc.com


AjaxRequestTarget on page open

2011-11-26 Thread Paul Szulc
This is going to be a lame question :) but I need help with this one.

I have DialogWindow (from visural-wicket library) that can be opened using
AjaxRequestTarget, below example that opens that dialog when ajax link is
clicked

add(new IndicatingAjaxLink("addCostUp") {
@Override
public void onClick(AjaxRequestTarget target) {
addCostDialog.open(target);
}
});

Is there a way to open that dialog when page is opened? You know, someone
is entering a page and dialog pops out? To open that dialog I need
AjaxRequestTarget. Is there a way to make page request ajax call just right
after the page was loaded?

Paul Szulc