Re: Free wicket from component hierarchy hell

2010-11-06 Thread Martin Makundi
Hi!

 Please make sure that it passes all current test cases before submitting the
 patch.  Also, it would be good to take the examples that have been given to
 you in this thread and create tests from them that demonstrate that they all
 work.  Particularly important will be demonstrating the security example
 that Igor gave above.

The security example is quite extreme and should be implemented in
traditional way if there is no regression test for it.

 I'm telling you all this in advance, not to be mean, but to help you out.
 In this one thread, you've pulled out more responses from PMC members and
 committers than any thread in recent memory - and all of them agreed that it
 was a bad idea, and not likely to be implemented.  So, if you submit a
 patch, it needs to meet all the above criteria to prove us all wrong.  I'd
 rather tell you that up front than have you submit a half-working patch and
 then get shot down in a blaze of glory.  :)

I am planning to take more of a helper method approach that is not
so invasive:

HierarchyUtils.helpMeAddThisComponentToItsParent(panel, component);

**
Martin


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


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



Re: Free wicket from component hierarchy hell

2010-11-06 Thread Igor Vaynberg
On Fri, Nov 5, 2010 at 11:32 PM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 Hi!

 Please make sure that it passes all current test cases before submitting the
 patch.  Also, it would be good to take the examples that have been given to
 you in this thread and create tests from them that demonstrate that they all
 work.  Particularly important will be demonstrating the security example
 that Igor gave above.

 The security example is quite extreme and should be implemented in
 traditional way if there is no regression test for it.

there is nothing extreme about it, it is a common use of containers
when implementing visibility/security. just the fact that this
forces the traditional approach sounds scarry.

-igor


 I'm telling you all this in advance, not to be mean, but to help you out.
 In this one thread, you've pulled out more responses from PMC members and
 committers than any thread in recent memory - and all of them agreed that it
 was a bad idea, and not likely to be implemented.  So, if you submit a
 patch, it needs to meet all the above criteria to prove us all wrong.  I'd
 rather tell you that up front than have you submit a half-working patch and
 then get shot down in a blaze of glory.  :)

 I am planning to take more of a helper method approach that is not
 so invasive:

 HierarchyUtils.helpMeAddThisComponentToItsParent(panel, component);

 **
 Martin


 --
 Jeremy Thomerson
 http://wickettraining.com
 *Need a CMS for Wicket?  Use Brix! http://brixcms.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: Free wicket from component hierarchy hell

2010-11-06 Thread Martin Makundi
 The security example is quite extreme and should be implemented in
 traditional way if there is no regression test for it.

 there is nothing extreme about it, it is a common use of containers
 when implementing visibility/security. just the fact that this
 forces the traditional approach sounds scarry.

I'm not scared that easily. Private members have a place and purpose.

**
Martin


 -igor


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



Re: navomatic example doesnt´t work

2010-11-06 Thread JayJay

I´m using version 1.4.13

NavomaticApplication.java:

public class NavomaticApplication extends WebApplication
{
/**
 * Constructor.
 */
public NavomaticApplication()
{
}

/**
 * @see org.apache.wicket.Application#getHomePage()
 */
@Override
public Class ? extends Page getHomePage()
{
return Page1.class;
}


}

NavomaticBorder.html:

html xmlns:wicket=http://wicket.apache.org/;
head
titleWicket Examples - navomatic/title
link rel=stylesheet type=text/css href=style.css /
/head
body
wicket:border
p
table height=100%
tr
td height=100% valign=top
div wicket:id=navigationBorderNavigation Links
pwicket:link
 Page1.html Page1 
br /
 Page2.html Page2 
br /
 Page3.html Page3 
/wicket:link/p
/div
/td
td valign=top wicket:body /
/td
/tr
/table
/p
/wicket:border
/body
/html

WicketBorder.java:

public class NavomaticBorder extends Border
{

/**
 * Constructor
 * 
 * @param id
 *The id of this component
 */
public NavomaticBorder(final String id)
{
super(id);
add(new BoxBorder(navigationBorder));
add(new BoxBorder(bodyBorder));
}
}

Page1.html:

html xmlns:wicket=http://wicket.apache.org/;
head
titleWicket Examples - navomatic/title
link rel=stylesheet type=text/css href=style.css/
/head
body

div style = width:250px
centerh3Page 1/h3/center
Welcome to Navomatic.  The navigation links on the left 
will allow you to navigate between three pages.  Notice that 
the current
page 
(Page1) is displayed in the Navigation Links area as 
italicized text, 
while the other pages are displayed as clickable links.  Go 
ahead 
and click the Page2 link now.
/div

/body
/html

Page1.java:

public class Page1 extends WebPage
{
/**
 * Constructor
 */
public Page1()
{
add(new NavomaticBorder(navomaticBorder));
}
}



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3029763.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: Ajax response render as source in the browser

2010-11-06 Thread Wayne W
Hi Igor,

Whats odd is that one guy was getting it on his iPad consistently and
when we asked him to try his desktop he's got the same problem on
Firefox on Mac. We initially though it might have been a browser
issue. We then got another user who got it only once on Chrome on
windows - all in the space of 1 day. We're worried that's it happening
more often but users are not reporting the issue.

Of course we cannot reproduce the issue, but its definitely happening.

So you don;t think the shared resource could effect the threads in any way?

Where can I start looking in the wicket code to understand where ajax
requests are serviced etc? Is there any where/docs I can find to get
started at looking at this? -  at least to complete more my
understanding of how it all works.

thanks
Wayne

On Fri, Nov 5, 2010 at 10:05 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 it may be a content type issue, but it is still weird because the
 response is received by the xml http request object, not the browser
 directly. strange indeed.

 -igor

 On Fri, Nov 5, 2010 at 7:51 AM, Wayne W waynemailingli...@gmail.com wrote:
 Hi,

 has anyone had this issue? We're getting emails from our users that
 sometime when clicking on an ajax link the raw wicket ajax response is
 being rendered on the browser - ie the just see all the html source
 code on the page. Its not any particular page.

 Anyone seen this or has any ideas?


 The only thing we have changed recently was adding a non blocking file
 download using a link and a shared resource which could be related due
 to the Content Type.
 In the configureResponse of the shared resource that we set the
 Content Type for that request. Is there any chance that this is
 somehow polluting the other threads requests?

 public class DownloadFileResourceReference extends ResourceReference {
        public DownloadFileResourceReference() {
                super(DownloadLink.class, );
        }

        private static final long serialVersionUID = 1L;

        public Resource newResource() {

                Resource r =  new Resource() {
                        private static final long serialVersionUID = 1L;

                        public IResourceStream getResourceStream() {

                                        Long id = 
 getParameters().getLong(DownloadLink.DOCID);
                                        // get file

                                        return new FileResourceStream(new 
 File(file.getAbsolutePath()));
                        }


                        protected void configureResponse(Response response) {

                                Long id = 
 getParameters().getLong(DownloadLink.DOCID);

                                // get file

                                ((WebResponse) 
 response).setAttachmentHeader(df.getFileName());

                                String mimeType = 
 ResourceHelper.getContentType(df.getFileName());
                                if (!StringUtils.isEmpty(mimeType)) {
                                        ((WebResponse) 
 response).setContentType(mimeType);
                                }

                        }

                };
                r.setCacheable(false);
                return r;
        }

 }

 -
 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



ModalWindow show only content

2010-11-06 Thread meduolis

Hello, is it possible to show only modal window content without all these
title bar stuff, close button and frames?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-show-only-content-tp3029858p3029858.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: Free wicket from component hierarchy hell

2010-11-06 Thread James Carman
On Sat, Nov 6, 2010 at 2:57 AM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:

 I'm not scared that easily. Private members have a place and purpose.


Yes, please don't make us have to expose our private parts.

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



Re: Free wicket from component hierarchy hell

2010-11-06 Thread Martin Makundi
Hi!

 I'm not scared that easily. Private members have a place and purpose.
 Yes, please don't make us have to expose our private parts.

;) Here's a first attempt with few TODOs, however:


### Eclipse Workspace Patch 1.0
Index: src/main/java/org/apache/wicket/MarkupContainer.java
===
RCS file: /src/main/java/org/apache/wicket/MarkupContainer.java,v
retrieving revision 1.1
diff -u -r1.1 MarkupContainer.java
--- src/main/java/org/apache/wicket/MarkupContainer.java6 Nov 2010
12:17:36 -  1.1
+++ src/main/java/org/apache/wicket/MarkupContainer.java6 Nov 2010
12:18:00 -
@@ -20,8 +20,11 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;

 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupElement;
@@ -112,7 +115,7 @@
   {
 super(id, model);
   }
-
+
   /**
* Adds a child component to this container.
*
@@ -1723,6 +1726,25 @@
 }
 return result;
   }
+
+  private MapString, Component componentIdMapAidedComponent = new
HashMapString, Component();
+
+  public final MarkupContainer addWithAid(final Component... childs)
+  {
+for (Component child : childs)
+{
+  Component duplicateChild =
componentIdMapAidedComponent.put(child.getId(), child);
+
+  if (duplicateChild != null)
+  {
+// Fail-fast
+throw new IllegalArgumentException(exceptionMessage(A child
with id ' +
+child.getId() + ' already exists));
+  }
+}
+
+return this;
+  }

   /**
*
@@ -1732,6 +1754,25 @@
   void onBeforeRenderChildren()
   {
 super.onBeforeRenderChildren();
+
+{
+  // Add also aided children to their right place; all should now
exist in the map
+  for (Component child : new
LinkedListComponent(componentIdMapAidedComponent.values() /** remove
items from componentIdMapAidedComponent as soon as they are matched
*/))
+  {
+/*
+ * TODO Parse markup, find each component's real parent and add it onto
+ * its real parent
+ *
+ * TODO MarkupVisitor must not visit child markup when they have their
+ * own (maybe it's not even possible by default).
+ *
+ * TODO Throw exception if child id is matched multiple times.
+ */
+
+// Finally remove aided component from map
+componentIdMapAidedComponent.remove(child.getId());
+  }
+}

 // We need to copy the children list because the children components can
 // modify the hierarchy in their onBeforeRender.



**
Martin


 -
 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: Free wicket from component hierarchy hell

2010-11-06 Thread Jeremy Thomerson
On Sat, Nov 6, 2010 at 7:20 AM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Hi!

  I'm not scared that easily. Private members have a place and purpose.
  Yes, please don't make us have to expose our private parts.

 ;) Here's a first attempt with few TODOs, however:


All right, let's take a look.


   }
 +
 +  private MapString, Component componentIdMapAidedComponent = new
 HashMapString, Component();


So, you just added a new Map to all markup containers that keeps components
in it?  Why would you do that?  We already have a storage mechanism for
children of a markup container.  And, it takes less memory space than a
Map.  Why do we need two storage containers for children?  Why can't you
call add(foo) and get(fooID)?

+{
 +  // Add also aided children to their right place; all should now
 exist in the map
 +  for (Component child : new
 LinkedListComponent(componentIdMapAidedComponent.values() /** remove
 items from componentIdMapAidedComponent as soon as they are matched
 */))
 +  {
 +/*
 + * TODO Parse markup, find each component's real parent and add it
 onto
 + * its real parent
 + *
 + * TODO MarkupVisitor must not visit child markup when they have
 their
 + * own (maybe it's not even possible by default).
 + *
 + * TODO Throw exception if child id is matched multiple times.
 + */
 +


Oh, so all that's left is to do all the real work?  :)


 +// Finally remove aided component from map
 +componentIdMapAidedComponent.remove(child.getId());
 +  }
 +}


Like I mentioned in my previous response on this thread - you need to come
to us with everything you've got.  It needs to show us:

   - a real working solution
   - something that doesn't break existing stuff (real world apps, and
   passes all existing test cases)
   - test cases for itself and all new functionality
   - proof that it doesn't allow the designers to easily break security
   (like Igor's example)

I'm not trying to be difficult.  I'm simply saying that you have an uphill
battle ahead of you.  Many core committers have already told you that the
idea isn't real good.  Then you come with a patch that simply adds a
bloated second place to store children in all markup containers?  That's not
helping your case.

If you can truly present an elegant solution that solves all of the above,
we can consider it.  But don't bring us noise that is laughably incomplete.
Like Brian said, make a branch (you can fork the git mirror to make this
easier) and start some development.  This is not something that will be done
in an hour.  You're going to have to sink some time into it.  Do yourself
the favor of really working through the solution wholeheartedly.

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


Re: Free wicket from component hierarchy hell

2010-11-06 Thread Martin Makundi
Hi!
 +  private MapString, Component componentIdMapAidedComponent = new
 HashMapString, Component();

 So, you just added a new Map to all markup containers that keeps components
 in it?  Why would you do that?

We need to wait until all components are added so that we can arrange
them into correct hireracy before rendering.

 We already have a storage mechanism for children of a markup container.
 Why do we need two storage containers for children?  Why can't you
 call add(foo) and get(fooID)?

If there is an existing way to accomplish the temporary caching of
components to be added, that mechanism can be used.

Another way to go about this would be to arrange children immediately
whenever addWithAid(component) is called so that they would be in
correct order when render is due.

 Oh, so all that's left is to do all the real work?  :)

True :)

 Like I mentioned in my previous response on this thread - you need to come
 to us with everything you've got.  It needs to show us:

   - a real working solution
   - something that doesn't break existing stuff (real world apps, and
   passes all existing test cases)
   - test cases for itself and all new functionality
   - proof that it doesn't allow the designers to easily break security
   (like Igor's example)

It's gonna take more than 5 min which I spent with the above. I take
in the feedback and work on it.

 Then you come with a patch that simply adds a bloated second place
 to store children in all markup containers?  That's not helping your case.

As I said before, I would need help form wicket internals to
efficiently leverage the existing mechanics.

 If you can truly present an elegant solution that solves all of the above,
 we can consider it. Do yourself the favor of really working through the
 solution wholeheartedly.

We'll do that and keep posting for intermediate feedback ;)

**
Martin


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


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



Re: Free wicket from component hierarchy hell

2010-11-06 Thread samket
 We need to wait until all components are added so that we can arrange
them into correct hireracy before rendering.

May I suggest that components are added with help of a builder object, for 
example:

public MyPanel(String id) {
super(id);
Builder b = new Builder(this); // the Builder gets reference to this MyPanel
b.add(new TextField(name)); // can be child of form which is added later
b.add(new SomeForm(form));
b.build(); // after this line this MyPanel contains the components name and form
}

If MyPanel's super class needs to access the same builder, it can provide a 
constructor for it. In that case b.build() should be only invoked in MyPanel's 
constructor. 

If a developer uses more than one builder in a constructor, he can restrict 
moving of components in markup to some extent:

public MyPanel(String id) {
super(id);
Builder b1 = new Builder(this);
b1.add(new TextField(name)); // in markup, name can't be put under form 
because it's in a different builder
b1.build();
Builder b2 = new Builder(this);
b2.add(new SomeForm(form);
b2.build();
}

Of course this doesn't solve the problem Igor mentioned. For that you'd need 
the old-fashioned way:

public MyPanel(String id) {
super(id);
SomeForm form = new SomeForm(form);
form.add(new TextField(name); // in markup, name can't be moved out from 
form
add(form);
}

Developers would need to mix different approaches for building hierarchies if 
security is an issue. On second thought, I should use a broader term than 
security because there is more than one reason to restrict those pesky 
designers ;)

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



OpenLayer with google map problem

2010-11-06 Thread Mohammed Abufouda
Hi
Hi
I have a web page that contais 2 layers from WMS , with google map.
I have a problem when trying to zoom in or zoomout , when i do that , the
layers positions changed , and when I turn them off then on they come back
again to there correct positions..

Can any one please help me ?

One More Thing : I'm thinking of making an event for zoom , so once the user
uses zoom , a redraw for layers will happen , this is just what i was
thinking of ..

Kind Regards


Re: strange problem with redirect to buffer and URL encoded query string

2010-11-06 Thread Igor Vaynberg
trace the java side to see what is encoding the url. it may be a
number of things, but since its only happennig to you its probably
something in your environment. also what version of wicket are you
running?

-igor

On Fri, Nov 5, 2010 at 8:01 AM, Joe Hudson jhud...@interviewbot.com wrote:
 Hi,

 I am using a AjaxFallbackButton within a form.  In this case the
 response is saved to a buffer in the session and supposed to be
 retrieved in the next page request.

 The problem that I am facing is that the second request is providing
 URL encoded query string and I can't figure out why...  Here is what I
 have tracked down:

 The redirect is set by the listener interface request target:
 boolean issueRedirect = (strategy ==
 IRequestCycleSettings.REDIRECT_TO_RENDER || strategy ==
 IRequestCycleSettings.REDIRECT_TO_BUFFER);
 * I am set to REDIRECT_TO_BUFFER

 In WebApplication.addBufferedResponse, we are properly adding the
 buffered response to the map with the key of wicket:interface=:0

 In the BufferedWebResponse, we are calling
 httpServletResponse.sendRedirect(url) with the value of
 wicket:interface=:0
 * note: the value is URL encoded but even after encoding does not
 change from wicket:interface=:0

 On the next call, the query string retreived in WicketFilter (String
 queryString = servletRequest.getQueryString();) is
 wicket%3Ainterface=%3A0%3A%3A%3A%3A

 This causes the call to webApplication.popBufferedResponse to execute
 with the wrong key which of course finds no buffered response.
 * I have verified at this time that the valid buffered response is
 still there under the key of wicket:interface=:0

 * I do get a response back except that all component error messages do
 not show up because they were rendered to the buffer.


 Can anyone please help me understand what is gong on here?  I have
 tried evaluating this in firebug to see where this strange URL
 encoding is coming from but all I see in Firebug when I look at the
 response is Failed to load source for:
 {context}?wicket:interface=:0:wizard:form::IFormSubmitListener::.  I
 am using Wicket version 1.4.12 on Ubuntu and have tried this in both
 Chrome and FireFox with the same result.

 Any help would be greatly appreciated.  Thanks.

 Joe

 -
 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: Configuration of AbstractCalendar

2010-11-06 Thread Igor Vaynberg
i think its whatever format the yui component expects.

-igor

On Fri, Nov 5, 2010 at 9:25 AM, Jan Ferko julyl...@gmail.com wrote:
 Hi,

 Can anyone tell me what is format of map for
 AbstractCalendar.configureWidgetProperties(Map map) ? For example I want to
 set navigator property to true, but map.put(navigator, true) doesn't work.

 thanks for answer
 Jan


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



Re: Ajax response render as source in the browser

2010-11-06 Thread Igor Vaynberg
see AjaxRequestTarget class, this is where the response is generated
on the serverside

wicket-ajax.js is where it is processed on the client side.

-igor

On Sat, Nov 6, 2010 at 2:49 AM, Wayne W waynemailingli...@gmail.com wrote:
 Hi Igor,

 Whats odd is that one guy was getting it on his iPad consistently and
 when we asked him to try his desktop he's got the same problem on
 Firefox on Mac. We initially though it might have been a browser
 issue. We then got another user who got it only once on Chrome on
 windows - all in the space of 1 day. We're worried that's it happening
 more often but users are not reporting the issue.

 Of course we cannot reproduce the issue, but its definitely happening.

 So you don;t think the shared resource could effect the threads in any way?

 Where can I start looking in the wicket code to understand where ajax
 requests are serviced etc? Is there any where/docs I can find to get
 started at looking at this? -  at least to complete more my
 understanding of how it all works.

 thanks
 Wayne

 On Fri, Nov 5, 2010 at 10:05 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 it may be a content type issue, but it is still weird because the
 response is received by the xml http request object, not the browser
 directly. strange indeed.

 -igor

 On Fri, Nov 5, 2010 at 7:51 AM, Wayne W waynemailingli...@gmail.com wrote:
 Hi,

 has anyone had this issue? We're getting emails from our users that
 sometime when clicking on an ajax link the raw wicket ajax response is
 being rendered on the browser - ie the just see all the html source
 code on the page. Its not any particular page.

 Anyone seen this or has any ideas?


 The only thing we have changed recently was adding a non blocking file
 download using a link and a shared resource which could be related due
 to the Content Type.
 In the configureResponse of the shared resource that we set the
 Content Type for that request. Is there any chance that this is
 somehow polluting the other threads requests?

 public class DownloadFileResourceReference extends ResourceReference {
        public DownloadFileResourceReference() {
                super(DownloadLink.class, );
        }

        private static final long serialVersionUID = 1L;

        public Resource newResource() {

                Resource r =  new Resource() {
                        private static final long serialVersionUID = 1L;

                        public IResourceStream getResourceStream() {

                                        Long id = 
 getParameters().getLong(DownloadLink.DOCID);
                                        // get file

                                        return new FileResourceStream(new 
 File(file.getAbsolutePath()));
                        }


                        protected void configureResponse(Response response) {

                                Long id = 
 getParameters().getLong(DownloadLink.DOCID);

                                // get file

                                ((WebResponse) 
 response).setAttachmentHeader(df.getFileName());

                                String mimeType = 
 ResourceHelper.getContentType(df.getFileName());
                                if (!StringUtils.isEmpty(mimeType)) {
                                        ((WebResponse) 
 response).setContentType(mimeType);
                                }

                        }

                };
                r.setCacheable(false);
                return r;
        }

 }

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



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



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



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



Re: navomatic example doesnt´t work

2010-11-06 Thread Igor Vaynberg
your page markup does not contain a tag with
wicket:id=navomaticBorder, also your border does not contain a tag
with wicket:id=bodyBorder

-igor

On Sat, Nov 6, 2010 at 12:59 AM, JayJay j.vondenbu...@gmail.com wrote:

 I´m using version 1.4.13

 NavomaticApplication.java:

 public class NavomaticApplication extends WebApplication
 {
        /**
         * Constructor.
         */
        public NavomaticApplication()
        {
        }

        /**
         * @see org.apache.wicket.Application#getHomePage()
         */
       �...@override
        public Class ? extends Page getHomePage()
        {
                return Page1.class;
        }


 }

 NavomaticBorder.html:

 html xmlns:wicket=http://wicket.apache.org/;
 head
 titleWicket Examples - navomatic/title
 link rel=stylesheet type=text/css href=style.css /
 /head
 body
 wicket:border
        p
        table height=100%
                tr
                        td height=100% valign=top
                        div wicket:id=navigationBorderNavigation Links
                        pwicket:link
                                 Page1.html Page1
                                br /
                                 Page2.html Page2
                                br /
                                 Page3.html Page3
                        /wicket:link/p
                        /div
                        /td
                        td valign=top wicket:body /
                        /td
                /tr
        /table
        /p
 /wicket:border
 /body
 /html

 WicketBorder.java:

 public class NavomaticBorder extends Border
 {

        /**
         * Constructor
         *
         * @param id
         *            The id of this component
         */
        public NavomaticBorder(final String id)
        {
                super(id);
                add(new BoxBorder(navigationBorder));
                add(new BoxBorder(bodyBorder));
        }
 }

 Page1.html:

 html xmlns:wicket=http://wicket.apache.org/;
 head
    titleWicket Examples - navomatic/title
    link rel=stylesheet type=text/css href=style.css/
 /head
 body

                div style = width:250px
                centerh3Page 1/h3/center
                Welcome to Navomatic.  The navigation links on the left
                will allow you to navigate between three pages.  Notice that 
 the current
 page
                (Page1) is displayed in the Navigation Links area as 
 italicized text,
                while the other pages are displayed as clickable links.  Go 
 ahead
                and click the Page2 link now.
                /div

 /body
 /html

 Page1.java:

 public class Page1 extends WebPage
 {
        /**
         * Constructor
         */
        public Page1()
        {
                add(new NavomaticBorder(navomaticBorder));
        }
 }



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3029763.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: OpenLayer with google map problem

2010-11-06 Thread nino martinez wael
did you see the example project?

2010/11/6 Mohammed Abufouda eng.mfo...@gmail.com

 Hi
 Hi
 I have a web page that contais 2 layers from WMS , with google map.
 I have a problem when trying to zoom in or zoomout , when i do that , the
 layers positions changed , and when I turn them off then on they come back
 again to there correct positions..

 Can any one please help me ?

 One More Thing : I'm thinking of making an event for zoom , so once the
 user
 uses zoom , a redraw for layers will happen , this is just what i was
 thinking of ..

 Kind Regards



Re: ModalWindow show only content

2010-11-06 Thread Igor Vaynberg
You can probably hide all the chrome with css

-igor

On Nov 6, 2010 4:09 AM, meduolis meduol...@gmail.com wrote:


Hello, is it possible to show only modal window content without all these
title bar stuff, close button and frames?
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-show-only-content-tp3029858p3029858.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: Free wicket from component hierarchy hell

2010-11-06 Thread Igor Vaynberg
here is a proper very rough initial implementation:

https://github.com/ivaynberg/wicket/commit/cbe861f4028120993f5d10d575f12c4ca291fdce

now someone has to mature it to the point where it can be properly evaluated.

-igor

On Sat, Nov 6, 2010 at 6:54 AM, samket sam...@gmx.com wrote:
 We need to wait until all components are added so that we can arrange
 them into correct hireracy before rendering.

 May I suggest that components are added with help of a builder object, for 
 example:

 public MyPanel(String id) {
 super(id);
 Builder b = new Builder(this); // the Builder gets reference to this MyPanel
 b.add(new TextField(name)); // can be child of form which is added later
 b.add(new SomeForm(form));
 b.build(); // after this line this MyPanel contains the components name and 
 form
 }

 If MyPanel's super class needs to access the same builder, it can provide a 
 constructor for it. In that case b.build() should be only invoked in 
 MyPanel's constructor.

 If a developer uses more than one builder in a constructor, he can restrict 
 moving of components in markup to some extent:

 public MyPanel(String id) {
 super(id);
 Builder b1 = new Builder(this);
 b1.add(new TextField(name)); // in markup, name can't be put under form 
 because it's in a different builder
 b1.build();
 Builder b2 = new Builder(this);
 b2.add(new SomeForm(form);
 b2.build();
 }

 Of course this doesn't solve the problem Igor mentioned. For that you'd need 
 the old-fashioned way:

 public MyPanel(String id) {
 super(id);
 SomeForm form = new SomeForm(form);
 form.add(new TextField(name); // in markup, name can't be moved out from 
 form
 add(form);
 }

 Developers would need to mix different approaches for building hierarchies if 
 security is an issue. On second thought, I should use a broader term than 
 security because there is more than one reason to restrict those pesky 
 designers ;)

 -
 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



[ANNOUNCE] Release Apache Wicket 1.5-M3

2010-11-06 Thread Jeremy Thomerson
The Wicket team is proud to announce that we have released Apache Wicket
1.5-M3. This is a milestone release on the currently in-development trunk.

To download: http://www.apache.org/dyn/closer.cgi/wicket/1.5-M3
Branch: http://svn.apache.org/repos/asf/wicket/branches/wicket-1.5-M3/
Changelog:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561styleName=Htmlversion=12315329

To use with Maven (the recommended way to use Wicket):

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version1.5-M3/version
/dependency

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