Re: Close ModalWindow from an applet in it

2010-06-20 Thread stevenson lee

i also tried to take a look at the getCloseJavaScript method
   /**
 * @return javascript that closes current modal window
 */
private static String getCloseJavacript() {
return "var win;\n" //
+ "try {\n"
+ " win = window.parent.Wicket.Window;\n"
+ "} catch (ignore) {\n"
+ "}\n"
+ "if (typeof(win) == \"undefined\" ||
typeof(win.current) == \"undefined\") {\n"
+ "  try {\n"
+ " win = window.Wicket.Window;\n"
+ "  } catch (ignore) {\n"
+ "  }\n"
+ "}\n"
+ "if (typeof(win) != \"undefined\" &&
typeof(win.current) != \"undefined\") {\n"
+ " window.parent.setTimeout(function() {\n"
+ " win.current.close();\n" + " }, 
0);\n" + "}";
}
But I'm not sure how to use this. I tried making a function from it. but i
don't think its made to be used that way. The extra braces at the end " + "
}, 0);\n" + "}"; confuses me even more.

Can anyone help?
Best regards,
Stevenson Lee
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Close-ModalWindow-from-an-applet-in-it-tp2262125p2262145.html
Sent from the Wicket - User 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



Close ModalWindow from an applet in it

2010-06-20 Thread stevenson lee

Hi,
I have an applet within a modal window. I use the applet to access devices
(namely printers) and it is embedded in modal window. I need to close the
modal window after ther printing process...
Is there a way to do this?
I tried triggering a click on the close button in the javascript:
function doCloseWindow(windowId) {
$("#" + windowId + " w_close").trigger('click');
}

but it doesnt seem to do anything. By the way, I got the windowId using
getMarkUpId() of my modal window component. I am using a panel as the
content for the modal window so I pass the markupId as a constructor and add
it to the modal window as a parameter so i could access it from the applet.
the value i get for the markupId is "printerAppletModala"; I'm not sure if
this is the Id that I should get.

Any help would be greatly appreciated,

Best Regards,

stevenson
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Close-ModalWindow-from-an-applet-in-it-tp2262125p2262125.html
Sent from the Wicket - User 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: InMethod Grid

2010-06-20 Thread Jeremy Thomerson
It is ASL 2, but the Apache license is *not* required for WicketStuff.

Jeremy Thomerson
-- sent from my smartphone - please excuse formatting and spelling errors

On Jun 20, 2010 12:10 PM, "Douglas Ferguson" 
wrote:

Looks like it is Apache 2.0, which I'd be willing to guess would be required
for something to show up on wicketstuff.

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/inmethod-grid-parent/pom.xml


D/


On Jun 20, 2010, at 8:41 AM, Avraham Rosenzweig wrote:

> Hello All,
>
> I've been looking at th...
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


Re: InMethod Grid

2010-06-20 Thread Douglas Ferguson
Looks like it is Apache 2.0, which I'd be willing to guess would be required 
for something to show up on wicketstuff.

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/inmethod-grid-parent/pom.xml


D/

On Jun 20, 2010, at 8:41 AM, Avraham Rosenzweig wrote:

> Hello All,
> 
>   I've been looking at the InMethod Grid (from wicketstuff) for use in one
> of my projects, but I can't find out under what license it is distributed.
>   Does someone know something about it? A URL for the license info/text
> would be nice.
> 
>   And if we are already talking about it, I would be happy if anyone have a
> suggestion about a Wicket Library that provides a Data Table with support
> for column resizing, sort, pagination, and scrolling inside the table like
> InMethod We are open for suggestions, either open source or commercial.
> 
> Thanks,
>Avraham
> 
> 
> -- 
> []'s
> Avraham Rosenzweig
> avrah...@gmail.com


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



Re: [Wicketstuff / Inmethod-Grid] A handful of patches

2010-06-20 Thread Douglas Ferguson
After digging through the js i realized that if columns at the beginning of the 
table are fixed if they are no moveable.
i.e. you can't move stuff in front of them. 

D/

On Jun 12, 2010, at 3:12 AM, Douglas Ferguson wrote:

> Thanks.
> 
> Another question for you...
> 
> I have a few columns that I want to be fixed at the beginning of the table.
> There is a "setReorderable(false);" which will prevent you from being able to 
> drag it around, but there is nothing to prevent you from moving another 
> column in front of the "fixed" one.
> 
> I think I'll have to update the js to get the behavior. Let me know if I'm 
> missing something.
> 
> D/
> 
> 
> On Jun 9, 2010, at 5:06 AM, Charles Deal wrote:
> 
>> I believe there is an object called GridSortState on the DataGrid.  Using
>> that object, you can set the default sort for the grid.  One of our grids do
>> this, but I don't have the code in front of me.
>> 
>> On Wed, Jun 9, 2010 at 1:04 AM, Douglas Ferguson >> wrote:
>> 
>>> Thanks!
>>> 
>>> I just got data grid going. It is very cool!
>>> 
>>> Do you know if there is a way to set a default sort?
>>> 
>>> D/
>>> 
>>> On Jun 8, 2010, at 3:26 PM, Charles Deal wrote:
>>> 
 I use Eclipse and the Subversive SVN plugin.  I did a checkout into a new
 Project of
 
>>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/inmethod-grid-parent
 
 After I made my changes I used the Create Patch option within Eclipse to
 generate the patches that I supplied.  If using a similar setup, you
>>> should
 be able to use the Eclipse Apply Patch feature to update the source again
>>> or
 use your own preferred method.
 
 On Tue, Jun 8, 2010 at 1:55 PM, Douglas Ferguson <
>>> doug...@douglasferguson.us
> wrote:
 
> What's the url you used to pull from svn? I.E. What branch, etc..
> 
> D/
> 
> On Jun 8, 2010, at 12:49 PM, Charles Deal wrote:
> 
>> The patches are based upon the latest in svn (as of 07JUN2010).  I
>>> pulled
> a
>> fresh copy of the source and then applied my changes back against it.
>>> I
>> don't think the svn codebase has changed all that much in the 1.4
>>> branch,
> so
>> I didn't experience any conflicts applying my patches.
>> 
>> 
>> On Tue, Jun 8, 2010 at 1:17 PM, Douglas Ferguson <
> doug...@douglasferguson.us
>>> wrote:
>> 
>>> What version of inmethod are these patches based from?
>>> 
>>> I't looks like 1.4.1 is quite old and 1.4.2 is still in "SNAPSHOT"
>>> 
>>> 
>>> http://wicketstuff.org/maven/repository/org/wicketstuff/inmethod-grid/
>>> 
>>> 
>>> 
>>> 
>>> On Jun 7, 2010, at 10:48 AM, Charles Deal wrote:
>>> 
 We've been using the grid for quite some time now and have
>>> accumulated
> a
>>> few changes to the codebase.  I'd like to submit them for other users
>>> to
>>> review and discuss, in the hopes that they will make it into the
> wicketstuff
>>> codebase in the future.  The following are brief descriptions of the
>>> attached files.
 
 inmethodgrid-script.patch
 This patch simply adds a resize event to the grid.  We noticed that
> when
>>> the browser was resized, the grid wouldn't resize until the user
> attempted
>>> to scroll.
 
 inmethodgrid-columns.patch
 Some small changes to facilitate more code reuse.
 
 inmethodgrid-form.patch
 Move the header and toolbars into the form.  This allows the header
>>> to
>>> determine the form automatically so that, for example, when sorting a
> grid,
>>> the behavior can submit the form to retain any transient changes to
>>> the
>>> grid.
 
 inmethodgrid-gridbehavior.patch
 Refactor the AjaxFormSubmitBahvior implementation into its own class
>>> to
>>> be used by custom behaviors.  Altered the code to use the new class.
 
 inmethodgrid-insert.patch
 Add support for adding rows to the grid.
 
 As I said, my team have been successfully using (almost all of) these
>>> patches since at least June 2008.  The script patch is the only one
>>> that
> is
>>> a recent change.  I'd appreciate some feedback and if no objections
>>> are
>>> made, I'd like to get these patches into the scm.
 
>>> 
>>> 
>>> -
>>> 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
> 
> 
>>> 
>>> 
>>> --

SV: Liferay portlet parameters in 1.4.8

2010-06-20 Thread Wilhelmsen Tor Iver
> We are trying to create parametrized portlet URLs to a maximized
> "stand-alone" portlet, and run into an issue where the constructor to
> the Page is invoked twice. But the second time, the query parameters
> are gone. Why does it create the view page twice? Or is it Liferay
> "magic" going on?

Since we are the only people in the world doing Wicket portlets, I found the 
solution was to use p_p_url_type=0&p_p_lifecycle=1, i.e. a render URL in the 
action phase.

- Tor Iver

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



InMethod Grid

2010-06-20 Thread Avraham Rosenzweig
Hello All,

   I've been looking at the InMethod Grid (from wicketstuff) for use in one
of my projects, but I can't find out under what license it is distributed.
   Does someone know something about it? A URL for the license info/text
would be nice.

   And if we are already talking about it, I would be happy if anyone have a
suggestion about a Wicket Library that provides a Data Table with support
for column resizing, sort, pagination, and scrolling inside the table like
InMethod We are open for suggestions, either open source or commercial.

Thanks,
Avraham


-- 
[]'s
Avraham Rosenzweig
avrah...@gmail.com


Re: ResourceStreamLocator and mvn resource:resource copying resources in the right directory

2010-06-20 Thread bht
Hi Erik,

I know the problem. It is a JavaScript problem, where the browser has
to construct an absolute URL from the relative URL that is in the HTML
fragment. The question is relative to what context this URL has to be
constructed in the browser - relative to the source of the fragment,
to some iframe or to the source of the page it is inserted into.

I am not arguing with you that you have found a good solution to the
problem.

But if you wanted to solve the problem at the root of it, you would
code the relative URLs at the server, and make them absolute at the
client side. The conversion is quite trivial. I did this for a
JavaScript based e-commerce app some time ago. This will always work
because the browser cannot reqest relative URLs anyway.

Regarding Wicket's inability to do this out of the box, I am once
again disappointed. This is so basic it blows my mind. While Wicket is
very flexible in many areas, in some areas it forces special use cases
as "best practice" on site develpers who then don't have any choices.

RelativePathPrefixHandler just breaks things by making a stupid
assumption about paths. I wish I could replace it dynamically.

If I start making alternative suggesions, then I am hearing catchy
words like "best practice" "community consensus" , "begginner" and "we
like to do it this way". That never convinces anyone because there is
no such thing as a community consensus, and especially not one that
agrees on a special use case.

I would say that putting HTML pages alongside Java source files is a
special use case for component deployment. It is ridiculous to call
this Wicket best practice for site development. Once you explore
benefits eg  better separation of concerns of the more general cases,
you run into trouble only because the original designers did not
consider them enough. A framework might originate from special use
cases but it should at some stage address general cases with higher
priority not as never ending afterthoughts. These things should be
pluggable.

Regards,

Bernard


On Sat, 19 Jun 2010 20:43:12 +0200, you wrote:

>Hi Bernard,
>
>We are using absolute URLs in one application (http://tipspot.com) that 
>does not use the wicket ajax library, only javascript (based on jquery) 
>written by the frontend developer. One of the things we do there is 
>filling popups through ajax requests. As most of that information is 
>completely stateless, we use a wicket page to produce the html 
>fragments. The URL depth and path of the original page (containing the 
>popup), and the page that is pasted into the popup, almost never 
>matches. This is a problem for linking to other pages. I found it easy 
>to make this problem go away by making all URLs absolute.
>
>I did not look at RelativePathPrefixHandler as I was unaware of its 
>existence. I am also not certain that any relative schema would be able 
>to solve the problem cleanly/easily. Secondly having absolute paths is a 
>non-issue for this application.
>
>Regards,
> Erik.
>
>
>Op 19-06-10 20:27, b...@actrix.gen.nz wrote:
>> Thanks Erik.
>>
>> Why are you using absolute URLS?
>>
>> Are you using absolute URLs to support editing in the web directory,
>> with a directory structure the same as the java package structure,
>> without breaking images?
>>
>> Then it would look like you have found a different solution for the
>> same problem. Interesting. Both solutions require only small changes.
>> Have you tried to patch RelativePathPrefixHandler? With that change,
>> you would no longer be restricted to absolute paths.
>>
>>
>> Regards,
>>
>> Bernard
>>
>>
>> On Sat, 19 Jun 2010 14:15:44 +0200, you wrote:
>>
>>
>>> Hi,
>>>
>>> https://issues.apache.org/jira/browse/WICKET-1974 describes a way to
>>> make all URLs absolute.
>>>
>>> Unfortunately the patch attached to the issue is still not applied so
>>> you'll have to build wicket yourself.
>>>
>>> Regards,
>>>  Erik.
>>>
>>>
>>> Op 18-06-10 21:56, b...@actrix.gen.nz schreef:
>>>  
 Hi Fernando,

 obviously quite a few including yourself are separating markup from
 Java packages to make it accessable to HTML developers.

 How do you cope with the fact that Wicket markup, when rendered in any
 folder without flattening the package structure, gets broken images?

 That is what I am trying to address with

 "Cannot substitute RelativePathPrefixHandler"
 https://issues.apache.org/jira/browse/WICKET-2881

 The three lines of Java code in RelativePathPrefixHandler are solving
 this problem.

 int lastIndex = attrValue.lastIndexOf("../");
 if (lastIndex>= 0){
   attrValue = attrValue.substring(lastIndex + 3);
 }

 Regards,
 Bernard



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


---

my wicket application log so many error about :unable to find component with ..."

2010-06-20 Thread 新希望软件 -- 俞宏伟
wicket version:1.4.9

my wicket application log file has so many error about "unable to find
component... it could be that the component is inside a repeater make your
component return false in getStatelessHint()",

06-20 17:46:51.188[   RequestCycle.java:1521:ERROR] unable to find
component with path brandTabs:panel:dvBrands:6:toBrand2 on stateless page
[Page class = wm.wicket.pages.site.SiteHomePage, id = 0, version = 0] it
could be that the component is inside a repeater make your component return
false in getStatelessHint()
org.apache.wicket.WicketRuntimeException: unable to find component with path
brandTabs:panel:dvBrands:6:toBrand2 on stateless page [Page class =
wm.wicket.pages.site.SiteHomePage, id = 0, version = 0] it could be that the
component is inside a repeater make your component return false in
getStatelessHint()
at
org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:148)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)
at
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
at
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
at
org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)


i search the forum about the error, Some people recommend using
wicket-devutils module check the error, but I do not know how to use the
wicket-devutils to detect such errors.