Re: MarkupResourceStream and classloading

2008-06-24 Thread Igor Vaynberg
welo.googlecode.com should do it i believe

-igor

On Tue, Jun 24, 2008 at 3:48 PM, David Leangen <[EMAIL PROTECTED]> wrote:
>
>> > nick, have you tried asking on pax wicket mailing list? those guys use
>> > wicket with osgi all the time. perhaps they have a clean solution.
>
> We have had numerous issues with this. We have a working solution, but IMO
> not a "clean" one. Actually, "opinion" is probably too strong a word, since
> I have not yet been able to fully investigate the issue. However, my feeling
> is that it will be impossible to find a "clean" or "ideal" solution in the
> OSGi world given the way Wicket classloading works, as you described in your
> original post. It would be nice if somebody from the OSGi world could sit
> down and redesign the serialization stuff with the Wicket team, but I doubt
> that will happen, since OSGi is only used by a small number of Wicket users.
>
>
>> Alternatively, may take a look at OsgiClassResolver.java
>> in the welo project which is hosted at google code.
>> OsgiClassResolver.java is an implementation (improvement needed)
>> of IClassResolver to resolve classes that are stored in osgi bundles.
>
> I tried googling this, but did not fine a "welo project". Can you provide us
> with a link?
>
>
> Cheers,
> David
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PackagedTextTemplate does not load resource from application resource stream locator?

2008-06-24 Thread Ritz123

Hi,

I am trying to use PackagedTextTemplate to load the template, but seems like
its not looking for the resource in the application registered resource
stream locator. I get resource not found exception.

HeaderContributor.forCss and forJavascript has worked fine and has found
resource in the folders for application stream location without any issues.


-- 
View this message in context: 
http://www.nabble.com/PackagedTextTemplate-does-not-load-resource-from-application-resource-stream-locator--tp18103510p18103510.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Style implementation for Round Cornered Tabbed Panels

2008-06-24 Thread Matthew Young
The wicket tab panel example does exactly this

http://www.wicket-library.com/wicket-examples/ajax/tabbed-panel.1

It uses the sliding door technique describe here:

http://www.alistapart.com/articles/slidingdoors/

On Tue, Jun 24, 2008 at 5:02 PM, Brill Pappin <[EMAIL PROTECTED]> wrote:

> I've seen this done pretty much how you describe (in fact I think there is
> a demo inthe wicket examples) That use two images (left and right).
> the left one is narrow, just enough to contain the rounded corners, the
> right side however is extra long; long enough to fit pretty much any text
> you put in.
>
> As the tab expands, the right side move to the right and simply clips to
> the left as needed.
>
>
> - Brill Pappin
>
>
>
> On 24-Jun-08, at 6:01 PM, Francisco Diaz Trepat - gmail wrote:
>
>  Hi all,
>>
>> I need to make each tab on an AjaxTabbedPanel have round corners. No big
>> deal so far:
>>
>> *div.tabpanel div.tab-row li* {
>>   background:url("my-round-corner-tab-background.png") no-repeat left top;
>> }
>>
>> But what if I want to have a "resizable" round cornered tab. Therefore if
>> i
>> have a tab title "hi" and another "good bye and have a wonderful
>> weekend!!!"
>> I wouldn't need to have two different background images: one for small
>> normal titles and another background for huge horrible ones.
>>
>> I believe the technique is to have the two corners edges (left and right)
>> and have the middle space with the same colored background.
>>
>> so, any ideas on how, and if I could implement that without touching so
>> much
>> the AjaxTabbedPanel implementation (extending).
>>
>> I think I might be able to put the left corner background image on the
>> *div.tabpanel
>> div.tab-row li a *and the right one on the *div.tabpanel div.tab-row li a
>> span
>>
>> *This would be, uggly even if I could do it.
>>
>> So, any better way of doing this without having to extend the current
>> AjaxTabbedPanel?
>>
>> thanks,
>> f(t)
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: AjaxLink in a DataView causes WicketRuntimeException due to component tree getting of outofsync

2008-06-24 Thread mfs

Let me add a couple of things here, 

1) Page-Versioning has not been turned off.
2) Using HybridURLCodingStrategy to render the page.

Opinions please..




mfs wrote:
> 
> Hi Guys, 
> 
> I am facing a problem with the usage of AjaxLink within a DataView. The
> dataview is contained in a container since the DataView is updated on
> ajaxform.submit. The AjaxLink is on each Item of the DataView, which opens
> up a modal window (with a panel as the content) with further details of
> each item listed in the DV.
> 
> Everything works fine, unless the user tries to open up the same Page
> (containing the above components) in another window/tab, which apparently
> results in the wicket component tree getting out of sync with the actual
> DOM, and hence clicking the ajaxlink on the first window/tab results in
> the following exception...(must be obvious but just for info, if i do a
> refresh of the same page in the first tab/window, the ajaxlink would work
> fine) 
> 
> org.apache.wicket.WicketRuntimeException: component
> certificateDataViewContainer:certificateList:2:certificateSummaryLink not
> found on page company.wicket.product.page.CertificateSearchPage[id = 0],
> listener interface = [RequestListenerInterface name=IBehaviorListener,
> method=public abstract void
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:416)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461)
> at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
> at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)
> at
> com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
> at
> com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
> at
> com.evermind.server.http.HttpRequestHandler.handleNotFound(HttpRequestHandler.java:1041)
> at
> com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:911)
> at
> com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
> at
> com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
> at
> com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
> at
> oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
> at
> com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java
> 
> 
> Waiting for followup..
> 
> Thanks in advance
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AjaxLink-in-a-DataView-causes-WicketRuntimeException-due-to-component-tree-getting-of-outofsync-tp18099619p18102712.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket CMS

2008-06-24 Thread james yong

I'll put up the doc and demo by this week or so. Thanks. :-)
-- 
View this message in context: 
http://www.nabble.com/Wicket-CMS-tp18092129p18102616.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Style implementation for Round Cornered Tabbed Panels

2008-06-24 Thread Brill Pappin
I've seen this done pretty much how you describe (in fact I think  
there is a demo inthe wicket examples) That use two images (left and  
right).
the left one is narrow, just enough to contain the rounded corners,  
the right side however is extra long; long enough to fit pretty much  
any text you put in.


As the tab expands, the right side move to the right and simply clips  
to the left as needed.



- Brill Pappin


On 24-Jun-08, at 6:01 PM, Francisco Diaz Trepat - gmail wrote:


Hi all,

I need to make each tab on an AjaxTabbedPanel have round corners. No  
big

deal so far:

*div.tabpanel div.tab-row li* {
   background:url("my-round-corner-tab-background.png") no-repeat  
left top;

}

But what if I want to have a "resizable" round cornered tab.  
Therefore if i
have a tab title "hi" and another "good bye and have a wonderful  
weekend!!!"

I wouldn't need to have two different background images: one for small
normal titles and another background for huge horrible ones.

I believe the technique is to have the two corners edges (left and  
right)

and have the middle space with the same colored background.

so, any ideas on how, and if I could implement that without touching  
so much

the AjaxTabbedPanel implementation (extending).

I think I might be able to put the left corner background image on the
*div.tabpanel
div.tab-row li a *and the right one on the *div.tabpanel div.tab-row  
li a

span

*This would be, uggly even if I could do it.

So, any better way of doing this without having to extend the current
AjaxTabbedPanel?

thanks,
f(t)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Output streams from external servlet

2008-06-24 Thread krisNog

Hello everyone! 

I have a question regarding external servlets. I have a panel that I would
like to stream content into from an external servlet. The overridden
onRender method I'm using for the Panel is shown below where "/whatever" is
the servlet that is outputting some arbitrary HTML that I would like
rendered in my wicket panel. I know this isn't the "proper" way of doing
things but I have no control over the external servlet and need to
incorporate its output into my wicket panel...

My problem the code below dispatches to the servlet and the servlet
begins streaming out of sequence from the wicket panel. So the html from the
servlet starts streaming then the wicket page starts streaming and the
servlet html isn't within my wicket panel and then I start getting errors
(shown after the onRender method)... 

Please let me know if I'm not being clear enough I'd be happy to elaborate!

protected void onRender(MarkupStream markupStream) {

ServletWebRequest servletWebRequest = (ServletWebRequest) 
getRequest();
HttpServletRequest request = 
servletWebRequest.getHttpServletRequest();

WebResponse webResponse = (WebResponse) getResponse();
HttpServletResponse response = webResponse.getHttpServletResponse();

RequestDispatcher dispatcher =
request.getRequestDispatcher("/whatever");
try {
dispatcher.include(request, response);
response.flushBuffer();

} catch (ServletException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}


Error stack trace:

ERROR - WicketFilter   - closing the buffer error
java.lang.IllegalStateException: getWriter can't be used after
getOutputStream was invoked
at
org.apache.jetspeed.aggregator.impl.HttpBufferedResponse.getWriter(HttpBufferedResponse.java:68)
at
javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
at 
org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:355)
at
org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:73)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:391)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
at
org.apache.jetspeed.dispatcher.JetspeedRequestDispatcher.include(JetspeedRequestDispatcher.java:73)
at
org.apache.wicket.protocol.http.portlet.WicketPortlet.processRequest(WicketPortlet.java:519)
at
org.apache.wicket.protocol.http.portlet.WicketPortlet.doView(WicketPortlet.java:416)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
at
org.apache.jetspeed.factory.JetspeedPortletInstance.render(JetspeedPortletInstance.java:103)
at
org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:277)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
at
org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:273)
at
org.apache.jetspeed.container.invoker.ServletPortletInvoker.render(ServletPortletInvoker.java:140)
at
org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:119)
at
org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPortlet(JetspeedPortletContainerWrapper.java:121)
at
org.apache.jetspeed.aggregator.impl.RenderingJobImpl.execute(RenderingJobImpl.java:271)
at
org.apache.j

RE: MarkupResourceStream and classloading

2008-06-24 Thread David Leangen

> > nick, have you tried asking on pax wicket mailing list? those guys use
> > wicket with osgi all the time. perhaps they have a clean solution.

We have had numerous issues with this. We have a working solution, but IMO
not a "clean" one. Actually, "opinion" is probably too strong a word, since
I have not yet been able to fully investigate the issue. However, my feeling
is that it will be impossible to find a "clean" or "ideal" solution in the
OSGi world given the way Wicket classloading works, as you described in your
original post. It would be nice if somebody from the OSGi world could sit
down and redesign the serialization stuff with the Wicket team, but I doubt
that will happen, since OSGi is only used by a small number of Wicket users.


> Alternatively, may take a look at OsgiClassResolver.java
> in the welo project which is hosted at google code.
> OsgiClassResolver.java is an implementation (improvement needed)
> of IClassResolver to resolve classes that are stored in osgi bundles.

I tried googling this, but did not fine a "welo project". Can you provide us
with a link?


Cheers,
David


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: generics

2008-06-24 Thread Martijn Dashorst
Unfortunately I get a build error (not the aforementioned compile
error, something different) so I'm not able to build tonight.

martijn

On Tue, Jun 24, 2008 at 5:23 PM, Martijn Dashorst
<[EMAIL PROTECTED]> wrote:
> I can try to do so later this evening (after I've done my duties for
> Wicket in Action)
>
> Martijn
>
> On Tue, Jun 24, 2008 at 5:21 PM, Brill Pappin <[EMAIL PROTECTED]> wrote:
>> I personally don't mind changes that cause me migration pain if they
>> actually make it better. I'm looking forward to trying it out.
>> Would it be possible to deploy the snapshots some place so I don't have to
>> go through the build pain?
>>
>> - Brill Pappin
>>
>> On 24-Jun-08, at 1:12 AM, Igor Vaynberg wrote:
>>
>>> development of the 1.4 branch has been quiet lately, this is because
>>> the core team has been busy working on an alternative way of
>>> generifiing the framework. an early result of that effort can be found
>>> here [1]. The key difference in [1] is that we have decoupled the
>>> component from the type of the model.
>>>
>>> here is the list of major differences:
>>>
>>> (1) only components that use their model have a generic type
>>> (components you are likely to call getmodel/getmodelobject on as a
>>> user). so far these are link,form,formcomponent
>>> subclasses,listview,listitem,(other repeaters will follow soon). this
>>> allows for typesafety where it makes sense, and eliminates a ton of
>>> noise from code. we will generify others upon request if a good
>>> usecase is provided and we think it is widely applicable.
>>>
>>> (2) non-generified components do not have IModel get/setModel and T
>>> get/setModelObject, instead they have IModelget/setDefaultModel and
>>> Object get/setDefaultModelObject. this clearly expresses that the
>>> default component model is not tied to the type of component. this is
>>> a bit of a pain from the code migration point of view, but we think is
>>> worth the effort. generifyed components are free to implement the old
>>> IModel get/setModel, etc, but have to keep the unsafe cast inside.
>>> see ListItem for an example.
>>>
>>> basically we feel this is a much cleaner way then what is 1.4m2. this
>>> is a call for confirmation/discussion from our user base. do try to
>>> port a small project or a part of a larger project you are working on
>>> to the [1] branch to see how the new api feels. if we do like this
>>> more the new branch will be merged into what will be 1.4m3.
>>>
>>> [1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics
>>>
>>> -igor
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.3 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Style implementation for Round Cornered Tabbed Panels

2008-06-24 Thread Francisco Diaz Trepat - gmail
Hi all,

I need to make each tab on an AjaxTabbedPanel have round corners. No big
deal so far:

*div.tabpanel div.tab-row li* {
background:url("my-round-corner-tab-background.png") no-repeat left top;
}

But what if I want to have a "resizable" round cornered tab. Therefore if i
have a tab title "hi" and another "good bye and have a wonderful weekend!!!"
I wouldn't need to have two different background images: one for small
normal titles and another background for huge horrible ones.

I believe the technique is to have the two corners edges (left and right)
and have the middle space with the same colored background.

so, any ideas on how, and if I could implement that without touching so much
the AjaxTabbedPanel implementation (extending).

I think I might be able to put the left corner background image on the
*div.tabpanel
div.tab-row li a *and the right one on the *div.tabpanel div.tab-row li a
span

*This would be, uggly even if I could do it.

So, any better way of doing this without having to extend the current
AjaxTabbedPanel?

thanks,
f(t)


Re: Client side validation

2008-06-24 Thread Igor Vaynberg
yes

-igor

On Tue, Jun 24, 2008 at 2:38 PM, Manuel Corrales
<[EMAIL PROTECTED]> wrote:
> Ok, great. I dont fully get what is the issue with the look and feel? Do you
> mean the way that errors are displayed? (popups, colored inputs, lists)
>
> Manuel.
>
> On Tue, Jun 24, 2008 at 6:07 PM, Igor Vaynberg <[EMAIL PROTECTED]>
> wrote:
>
>> the reason we have not done this is that client side validation is
>> limited. also a lot of applications want a consistent look and feel
>> for javascript validation, which is not possible via a framework. what
>> we are going to do in 1.5 is allow ivalidator to also implement
>> ibehavior, this will allow a clean way of spitting out the javascript
>> from a validator, which is where it belongs.
>>
>> for now we have a half-way solution which uses ajax and has the
>> advantages of having the same look and feel and being able to validate
>> server-side validation rules that cannot be validated on client alone.
>>
>> -igor
>>
>> On Tue, Jun 24, 2008 at 1:17 PM, Manuel Corrales
>> <[EMAIL PROTECTED]> wrote:
>> > Hi, i dont want to be flamed by this post, i have read on some places
>> some
>> > not very polite things about wicket vs taperstry. I think that all
>> > frameworks have pro and cons. Here is the thing, i was using Tapestry 5
>> for
>> > a while, and now i am developing with wicket. One thing i liked about T5
>> was
>> > the "magic" on the client side validation without the need to write
>> > javascript, and it worked pretty good. I really do not have the time now,
>> > but it would be great to accomplish something like this:
>> >
>> > RequiredTextField tf = new
>> > tf.enableClientSideValidation();
>> >
>> > my approach would be to borrow the T5 code to generate the required
>> > javascript.
>> >
>> > Is this idea worth the time?
>> >
>> > Best regards.
>> >
>> > Manuel.
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Client side validation

2008-06-24 Thread Manuel Corrales
Ok, great. I dont fully get what is the issue with the look and feel? Do you
mean the way that errors are displayed? (popups, colored inputs, lists)

Manuel.

On Tue, Jun 24, 2008 at 6:07 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> the reason we have not done this is that client side validation is
> limited. also a lot of applications want a consistent look and feel
> for javascript validation, which is not possible via a framework. what
> we are going to do in 1.5 is allow ivalidator to also implement
> ibehavior, this will allow a clean way of spitting out the javascript
> from a validator, which is where it belongs.
>
> for now we have a half-way solution which uses ajax and has the
> advantages of having the same look and feel and being able to validate
> server-side validation rules that cannot be validated on client alone.
>
> -igor
>
> On Tue, Jun 24, 2008 at 1:17 PM, Manuel Corrales
> <[EMAIL PROTECTED]> wrote:
> > Hi, i dont want to be flamed by this post, i have read on some places
> some
> > not very polite things about wicket vs taperstry. I think that all
> > frameworks have pro and cons. Here is the thing, i was using Tapestry 5
> for
> > a while, and now i am developing with wicket. One thing i liked about T5
> was
> > the "magic" on the client side validation without the need to write
> > javascript, and it worked pretty good. I really do not have the time now,
> > but it would be great to accomplish something like this:
> >
> > RequiredTextField tf = new
> > tf.enableClientSideValidation();
> >
> > my approach would be to borrow the T5 code to generate the required
> > javascript.
> >
> > Is this idea worth the time?
> >
> > Best regards.
> >
> > Manuel.
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Client side validation

2008-06-24 Thread Igor Vaynberg
the reason we have not done this is that client side validation is
limited. also a lot of applications want a consistent look and feel
for javascript validation, which is not possible via a framework. what
we are going to do in 1.5 is allow ivalidator to also implement
ibehavior, this will allow a clean way of spitting out the javascript
from a validator, which is where it belongs.

for now we have a half-way solution which uses ajax and has the
advantages of having the same look and feel and being able to validate
server-side validation rules that cannot be validated on client alone.

-igor

On Tue, Jun 24, 2008 at 1:17 PM, Manuel Corrales
<[EMAIL PROTECTED]> wrote:
> Hi, i dont want to be flamed by this post, i have read on some places some
> not very polite things about wicket vs taperstry. I think that all
> frameworks have pro and cons. Here is the thing, i was using Tapestry 5 for
> a while, and now i am developing with wicket. One thing i liked about T5 was
> the "magic" on the client side validation without the need to write
> javascript, and it worked pretty good. I really do not have the time now,
> but it would be great to accomplish something like this:
>
> RequiredTextField tf = new
> tf.enableClientSideValidation();
>
> my approach would be to borrow the T5 code to generate the required
> javascript.
>
> Is this idea worth the time?
>
> Best regards.
>
> Manuel.
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating ListView via AJAX

2008-06-24 Thread Igor Vaynberg
is it that the listview doesnt refresh or that your
getGroupMemberships() returns stale data? why dont you set up a
breakpoint and see what its doing

-igor

On Tue, Jun 24, 2008 at 1:08 PM, Ryan O'Hara
<[EMAIL PROTECTED]> wrote:
> Thanks for the quick response, Igor.  Unfortunately, the ListView is still
> not updating after making those changes.  Any other ideas?
>
> Thanks again,
> Ryan
>
> On Jun 24, 2008, at 3:46 PM, Igor Vaynberg wrote:
>
>> protected void populateItem(final ListItem item) {
>>  GroupMembership groupMembership = (GroupMembership)
>> item.getModelObject();
>>  item.add(new Label("group", new PropertyModel(item.getmodel(), "group"));
>>  item.add(new CheckBox("member", new PropertyModel(item.getmodel(),
>> "selected")));
>> }
>>
>> -igor
>>
>> On Tue, Jun 24, 2008 at 10:28 AM, Ryan O'Hara
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Also, tried using a LoadableDetachableModel in the ListView:
>>>
>>> ListView groupMemberRows = new ListView("groupMemberRow", new
>>> LoadableDetachableModel(){
>>>   protected Object load(){
>>>   return getGroupMemberships();
>>>   }
>>>   }) {
>>>   protected void populateItem(final ListItem item) {
>>>   GroupMembership groupMembership = (GroupMembership)
>>> item.getModelObject();
>>>   item.add(new Label("group", groupMembership.getGroup()));
>>>   item.add(new CheckBox("member", new
>>> PropertyModel(groupMembership, "selected")));
>>>   }
>>>   };
>>>
>>> Still no luck.
>>>
>>> Ryan
>>>
>>> On Jun 24, 2008, at 1:21 PM, Ryan O'Hara wrote:
>>>
 I'm trying to update a ListView via AJAX.  I've looked over a bunch of
 examples in the archives, but I'm still having some trouble.  I'm trying
 to
 wrap the ListView with a WebMarkupContainer and then update that
 WebMarkupContainer.  I also created a GroupMembership object, which is
 passed into the ListView.  When the form is submitted, the
 List is populated fine, it's just not rendering.  Below
 is
 the Java and HTML.  Any help would be greatly appreciated.  Thanks!

 -Ryan

 Java:

   groupManager = new WebMarkupContainer("groupManager");
   groupManager.setOutputMarkupId(true);
   form.add(groupManager);

   AjaxSubmitLink submit = new AjaxSubmitLink("submit") {
   public void onSubmit(AjaxRequestTarget target, Form form) {
   try {
   setGroupMemberships();
   target.addComponent(groupManager);
   } catch (Exception e) {
   error("Unable to get groups for user " + email + ".");
   }
   target.addComponent(feedbackPanel);
   }
   };
   form.add(submit);

   ListView groupMemberRows = new ListView("groupMemberRow",
 getGroupMemberships()) {
   protected void populateItem(final ListItem item) {
   GroupMembership groupMembership = (GroupMembership)
 item.getModelObject();
   item.add(new Label("group", groupMembership.getGroup()));
   item.add(new CheckBox("member", new
 PropertyModel(groupMembership, "selected")));
   }
   };
   groupManager.add(groupMemberRows);

 public void setGroupMemberships() {
   groupMemberships.clear();
   List userGroups = groupQuery.getGroupsByUser(getEmail());
   List allGroups = groupQuery.getGroups("*");
   GroupMembership groupMembership;
   for (String group : allGroups) {
   groupMembership = new GroupMembership();
   if (userGroups.contains(group)) {
   groupMembership.setGroup(group);
   groupMembership.setSelected(true);
   } else {
   groupMembership.setGroup(group);
   groupMembership.setSelected(false);
   }
   groupMemberships.add(groupMembership);
   }
   }

   public List getGroupMemberships() {
   return groupMemberships;
   }


 HTML:

   
 
   
   Group
   Member
   
   
   
   
   
   
   
   >>> class="formButtonAlignedRight">Save
   
   
   
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For

AjaxLink in a DataView causes WicketRuntimeException due to component tree getting of outofsync

2008-06-24 Thread mfs

Hi Guys, 

I am facing a problem with the usage of AjaxLink within a DataView. The
dataview is contained in a container since the DataView is updated on
ajaxform.submit. The AjaxLink is on each Item of the DataView, which opens
up a modal window (with a panel as the content) with further details of each
item listed in the DV.

Everything works fine, unless the user tries to open up the same Page
(containing the above components) in another window/tab, which apparently
results in the wicket component tree getting out of sync with the actual
DOM, and hence clicking the ajaxlink on the first window/tab results in the
following exception...(must be obvious but just for info, if i do a refresh
of the same page in the first tab/window, the ajaxlink would work fine) 

org.apache.wicket.WicketRuntimeException: component
certificateDataViewContainer:certificateList:2:certificateSummaryLink not
found on page company.wicket.product.page.CertificateSearchPage[id = 0],
listener interface = [RequestListenerInterface name=IBehaviorListener,
method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:416)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)
at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at
com.evermind.server.http.HttpRequestHandler.handleNotFound(HttpRequestHandler.java:1041)
at
com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:911)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java


Waiting for followup..

Thanks in advance

-- 
View this message in context: 
http://www.nabble.com/AjaxLink-in-a-DataView-causes-WicketRuntimeException-due-to-component-tree-getting-of-outofsync-tp18099619p18099619.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Client side validation

2008-06-24 Thread Manuel Corrales
Hi, i dont want to be flamed by this post, i have read on some places some
not very polite things about wicket vs taperstry. I think that all
frameworks have pro and cons. Here is the thing, i was using Tapestry 5 for
a while, and now i am developing with wicket. One thing i liked about T5 was
the "magic" on the client side validation without the need to write
javascript, and it worked pretty good. I really do not have the time now,
but it would be great to accomplish something like this:

RequiredTextField tf = new
tf.enableClientSideValidation();

my approach would be to borrow the T5 code to generate the required
javascript.

Is this idea worth the time?

Best regards.

Manuel.


Re: Updating ListView via AJAX

2008-06-24 Thread Ryan O'Hara
Thanks for the quick response, Igor.  Unfortunately, the ListView is  
still not updating after making those changes.  Any other ideas?


Thanks again,
Ryan

On Jun 24, 2008, at 3:46 PM, Igor Vaynberg wrote:


protected void populateItem(final ListItem item) {
  GroupMembership groupMembership = (GroupMembership)  
item.getModelObject();
  item.add(new Label("group", new PropertyModel(item.getmodel(),  
"group"));

  item.add(new CheckBox("member", new PropertyModel(item.getmodel(),
"selected")));
}

-igor

On Tue, Jun 24, 2008 at 10:28 AM, Ryan O'Hara
<[EMAIL PROTECTED]> wrote:

Also, tried using a LoadableDetachableModel in the ListView:

ListView groupMemberRows = new ListView("groupMemberRow", new
LoadableDetachableModel(){
   protected Object load(){
   return getGroupMemberships();
   }
   }) {
   protected void populateItem(final ListItem item) {
   GroupMembership groupMembership = (GroupMembership)
item.getModelObject();
   item.add(new Label("group", groupMembership.getGroup 
()));

   item.add(new CheckBox("member", new
PropertyModel(groupMembership, "selected")));
   }
   };

Still no luck.

Ryan

On Jun 24, 2008, at 1:21 PM, Ryan O'Hara wrote:

I'm trying to update a ListView via AJAX.  I've looked over a  
bunch of
examples in the archives, but I'm still having some trouble.  I'm  
trying to

wrap the ListView with a WebMarkupContainer and then update that
WebMarkupContainer.  I also created a GroupMembership object,  
which is

passed into the ListView.  When the form is submitted, the
List is populated fine, it's just not  
rendering.  Below is

the Java and HTML.  Any help would be greatly appreciated.  Thanks!

-Ryan

Java:

   groupManager = new WebMarkupContainer("groupManager");
   groupManager.setOutputMarkupId(true);
   form.add(groupManager);

   AjaxSubmitLink submit = new AjaxSubmitLink("submit") {
   public void onSubmit(AjaxRequestTarget target, Form  
form) {

   try {
   setGroupMemberships();
   target.addComponent(groupManager);
   } catch (Exception e) {
   error("Unable to get groups for user " + email  
+ ".");

   }
   target.addComponent(feedbackPanel);
   }
   };
   form.add(submit);

   ListView groupMemberRows = new ListView("groupMemberRow",
getGroupMemberships()) {
   protected void populateItem(final ListItem item) {
   GroupMembership groupMembership = (GroupMembership)
item.getModelObject();
   item.add(new Label("group",  
groupMembership.getGroup()));

   item.add(new CheckBox("member", new
PropertyModel(groupMembership, "selected")));
   }
   };
   groupManager.add(groupMemberRows);

public void setGroupMemberships() {
   groupMemberships.clear();
   List userGroups = groupQuery.getGroupsByUser 
(getEmail());

   List allGroups = groupQuery.getGroups("*");
   GroupMembership groupMembership;
   for (String group : allGroups) {
   groupMembership = new GroupMembership();
   if (userGroups.contains(group)) {
   groupMembership.setGroup(group);
   groupMembership.setSelected(true);
   } else {
   groupMembership.setGroup(group);
   groupMembership.setSelected(false);
   }
   groupMemberships.add(groupMembership);
   }
   }

   public List getGroupMemberships() {
   return groupMemberships;
   }


HTML:

   

   
   Group
   Member
   
   
   
   
   
   
   
   Save
   
   
   





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket CMS

2008-06-24 Thread Rodolfo Hansen
Yeah, we are interested in working out a CMS based on wicket too...
haven't had much time for it just yet. but its a must do for us...

On Tue, Jun 24, 2008 at 11:46 AM, Thomas Mäder <[EMAIL PROTECTED]>
wrote:

> It might spark interest if you add a bit of documentation and a live demo.
> Not everyone has the time to read through your code.
>
> Thomas
>
> On Tue, Jun 24, 2008 at 4:21 PM, james yong <[EMAIL PROTECTED]> wrote:
>
> >
> > Hi,
> >
> > Is there anyone who would like to pool efforts for a wicket-based cms?
> >
> > Currently, I have a prototype verson at http://code.google.com/p/welo/,
> > but
> > I would like to put efforts into a better one (not necessary mine).
> >
> > Regards,
> > James
> > --
> > View this message in context:
> > http://www.nabble.com/Wicket-CMS-tp18092129p18092129.html
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


Re: DropDownChoice setting other DropDownChoice using AJAX results in null at submit

2008-06-24 Thread Timo Rantalaiho
On Tue, 24 Jun 2008, Giuliano Caliari wrote:
> As you can see I am new to wicket and I'm trying to evaluate it for my 
> projects.

Then it's a good idea to checkout the code of
wicket-examples of 1.3 

  
http://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/

alongside your project, and look at the linked
DropDownChoices example

  http://www.wicketstuff.org/wicket13/ajax/choice.0

from there. Sure it's handy to see the live examples but
it's a lot better to browse the source code in your own IDE,
and you can start the examples there as well.

You can then start by modding the example to do something
like what you want.

Also, be sure to have Wicket source code attached to your
IDE.

> > BTW, what are these methods here for?
> 
> These 2 are there for spring to inject the bean 
> "@SpringBean(name="armyServices")"
 
@SpringBean works "standalone", there's no need to provide 
a setter for your the bean dependency:

  http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach

> The real problem is that whenever chosenArmy
> DropDownChoice is changed through the AJAX code,
> stwMatchPrefs.setChosenArmy receives null when the form is
> submitted.

Unfortunately I still cannot pinpoint the exact problem. 
Removing the PropertyModel and doing the interaction more 
via specified models might make the problem more apparent. 

Good luck :)

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating ListView via AJAX

2008-06-24 Thread Igor Vaynberg
protected void populateItem(final ListItem item) {
  GroupMembership groupMembership = (GroupMembership) item.getModelObject();
  item.add(new Label("group", new PropertyModel(item.getmodel(), "group"));
  item.add(new CheckBox("member", new PropertyModel(item.getmodel(),
"selected")));
}

-igor

On Tue, Jun 24, 2008 at 10:28 AM, Ryan O'Hara
<[EMAIL PROTECTED]> wrote:
> Also, tried using a LoadableDetachableModel in the ListView:
>
> ListView groupMemberRows = new ListView("groupMemberRow", new
> LoadableDetachableModel(){
>protected Object load(){
>return getGroupMemberships();
>}
>}) {
>protected void populateItem(final ListItem item) {
>GroupMembership groupMembership = (GroupMembership)
> item.getModelObject();
>item.add(new Label("group", groupMembership.getGroup()));
>item.add(new CheckBox("member", new
> PropertyModel(groupMembership, "selected")));
>}
>};
>
> Still no luck.
>
> Ryan
>
> On Jun 24, 2008, at 1:21 PM, Ryan O'Hara wrote:
>
>> I'm trying to update a ListView via AJAX.  I've looked over a bunch of
>> examples in the archives, but I'm still having some trouble.  I'm trying to
>> wrap the ListView with a WebMarkupContainer and then update that
>> WebMarkupContainer.  I also created a GroupMembership object, which is
>> passed into the ListView.  When the form is submitted, the
>> List is populated fine, it's just not rendering.  Below is
>> the Java and HTML.  Any help would be greatly appreciated.  Thanks!
>>
>> -Ryan
>>
>> Java:
>>
>>groupManager = new WebMarkupContainer("groupManager");
>>groupManager.setOutputMarkupId(true);
>>form.add(groupManager);
>>
>>AjaxSubmitLink submit = new AjaxSubmitLink("submit") {
>>public void onSubmit(AjaxRequestTarget target, Form form) {
>>try {
>>setGroupMemberships();
>>target.addComponent(groupManager);
>>} catch (Exception e) {
>>error("Unable to get groups for user " + email + ".");
>>}
>>target.addComponent(feedbackPanel);
>>}
>>};
>>form.add(submit);
>>
>>ListView groupMemberRows = new ListView("groupMemberRow",
>> getGroupMemberships()) {
>>protected void populateItem(final ListItem item) {
>>GroupMembership groupMembership = (GroupMembership)
>> item.getModelObject();
>>item.add(new Label("group", groupMembership.getGroup()));
>>item.add(new CheckBox("member", new
>> PropertyModel(groupMembership, "selected")));
>>}
>>};
>>groupManager.add(groupMemberRows);
>>
>> public void setGroupMemberships() {
>>groupMemberships.clear();
>>List userGroups = groupQuery.getGroupsByUser(getEmail());
>>List allGroups = groupQuery.getGroups("*");
>>GroupMembership groupMembership;
>>for (String group : allGroups) {
>>groupMembership = new GroupMembership();
>>if (userGroups.contains(group)) {
>>groupMembership.setGroup(group);
>>groupMembership.setSelected(true);
>>} else {
>>groupMembership.setGroup(group);
>>groupMembership.setSelected(false);
>>}
>>groupMemberships.add(groupMembership);
>>}
>>}
>>
>>public List getGroupMemberships() {
>>return groupMemberships;
>>}
>>
>>
>> HTML:
>>
>>
>> 
>>
>>Group
>>Member
>>
>>
>>
>>
>>
>>
>>
>>> class="formButtonAlignedRight">Save
>>
>>
>>
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PWC4011

2008-06-24 Thread David Nedrow
Running GlassFish v2ur2 within NetBeans, I get a large number of the  
following messages from my application...


PWC4011: Unable to set request character encoding to UTF-8 from  
context /FilterRequest, because request parameters have already been  
read, or ServletRequest.getReader() has already been called


A new message is generated for each new page generated (via Wicket  
with Spring injection).


Any pointers on what I need to do to make the application server  
happy? I have to admit, this appears to be cosmetic, but as I've noted  
on the list before, I hate not clearing warnings.


-David Nedrow

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing default form button via Ajax

2008-06-24 Thread Igor Vaynberg
i would take what is now AjaxFormSubmitBehavior and rip out the bits
that actually process the form, and then use that instead of
ajaxformcomponentupdatingbehavior

-igor

On Tue, Jun 24, 2008 at 11:03 AM, n0_fixed_ab0de
<[EMAIL PROTECTED]> wrote:
>
> Got a problem and don't know what I'm doin and cannot think of a way to solve
> it.
>
> I have a form within a wizard step. The 'next' button is disabled and
> enabled via an ajax call when certain form data is changed. The page is
> first rendered without an active 'next' button and so it is not the default.
> When I press Enter, after enabling the 'next' button, something else (ie
> performs 'previous' submit) or nothing happens.
>
> Tried the following...
>
>serviceType.add(new AjaxFormComponentUpdatingBehavior("onchange") {
>protected void onUpdate(AjaxRequestTarget target) {
>..
>setComplete(true); // WizardStep should now display 'next'
> button
>
>NextButton next = (NextButton) buttonBar.get("next");
>Form form = (Form) get("form");
>form.setDefaultButton(next);
>target.addComponent(form);
>target.addComponent(next);
>}
>}
>
> This wipes all form data (which I understand but don't know how to
> circumvent easily apart from adding the  other components again which sucks)
> but in some cases it weirdly allows Enter to fire the 'next' submit
> sometimes if another ajax request occurs between the above event and submit.
>
> Can anyone tell me if I'm on the right track or doing something crazy or if
> there is a better way to approach it? Or should I go back to basics ;)
>
> Cheers,
> Russell
> --
> View this message in context: 
> http://www.nabble.com/Changing-default-form-button-via-Ajax-tp18096567p18096567.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: generics

2008-06-24 Thread Martin Funk

Igor Vaynberg wrote:

should compile now, there maybe be some failing tests, but mvn clean
install -Dmaven.test.skip=true works for sure
  


thnx, it compiles now

mf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: generics

2008-06-24 Thread Martin Funk

Igor Vaynberg wrote:

should compile now, there maybe be some failing tests, but mvn clean
install -Dmaven.test.skip=true works for sure
  


thnx, it compiles now

mf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to create a cacheable image resource for a image file?

2008-06-24 Thread Justin Morgan - Logic Sector

Thanks for the suggestion Jeremy.

Here is the solution I eventually settled on, in case anyone is  
searching the mail archives on the same keywords I used.


My solution basically checks to see if a shared image resource has  
been mounted, and if not, mounts it.  Thereafter, each time the page  
is reloaded, the mounted shared image resource is used.  The URLs of  
my images wind up looking like "resources/images/ 
myUniqueImageName.jpg" (which allows the browser to cache  
myUniqueImageName.jpg).  My particular works because my images all  
have unique names (if the images didn't have unique names I'd have to  
put in some scoping in the SharedResource).


Anyhoo, this is the solution...Something similar to this was added  
within the constructor of my page.


LsApplication app = LsApplication.get();
SharedResources sharedResources = app.getSharedResources();
IImageService imageService = ...injected by Spring...
String imageName = imageService.getImageName(...);   // e.g.  
"myUniqueImageName.jpg"
if (sharedResources.get(LsApplication.class, imageName, null,  
null, false) == null) {

Resource resource = new DynamicImageResource() {
@Override
protected byte[] getImageData() {
return imageService.saveImageInTmpAndGetBytes(...);
}
};
sharedResources.putClassAlias(LsApplication.class, "images");
sharedResources.add(LsApplication.class, imageName, null,  
null, resource);

app.mountSharedResource(imageName, imageName);
}
add(new Image("image", new ResourceReference(LsApplication.class,  
imageName)));


- Justin


On Jun 23, 2008, at 7:05 PM, Jeremy Thomerson wrote:


I'm pretty sure you'll find an answer in the archives.  For instance,
there's a bunch of suggestions here:

http://www.nabble.com/Image-from-resource-outside-tomcat-container-to17276444.html#a17276444

--
Jeremy Thomerson
http://www.wickettraining.com

On Mon, Jun 23, 2008 at 7:04 PM, Justin Morgan - Logic Sector <
[EMAIL PROTECTED]> wrote:

In my web app there are a bunch of static image files that live  
outside the
WAR in various places on the host's file system (also outside the  
purview of
the httpd server too).  To serve up these images within my Wicket  
app, I've
been reading their bytes via a File object and returning those  
bytes to an
Image via a DynamicImageResource.  As usual, the Image is added to  
the page

in the page's constructor.

This works great except for one problem...

Each time the user reloads the page, the HTML  gets a new "src"
attribute because a new DynamicImageResource is created each time  
the page
is instantiated.  Thus, the browser can't cache the image.  This is  
bad

because I want the image to be cached.

My question is:  How can I provide a non-changing URL for the image
resource so the image is cacheable?

Many thanks for any help.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






Changing default form button via Ajax

2008-06-24 Thread n0_fixed_ab0de

Got a problem and don't know what I'm doin and cannot think of a way to solve
it.

I have a form within a wizard step. The 'next' button is disabled and
enabled via an ajax call when certain form data is changed. The page is
first rendered without an active 'next' button and so it is not the default.
When I press Enter, after enabling the 'next' button, something else (ie
performs 'previous' submit) or nothing happens.

Tried the following...

serviceType.add(new AjaxFormComponentUpdatingBehavior("onchange") {
protected void onUpdate(AjaxRequestTarget target) {
..
setComplete(true); // WizardStep should now display 'next'
button

NextButton next = (NextButton) buttonBar.get("next");
Form form = (Form) get("form");
form.setDefaultButton(next);
target.addComponent(form);
target.addComponent(next);
}
}

This wipes all form data (which I understand but don't know how to
circumvent easily apart from adding the  other components again which sucks)
but in some cases it weirdly allows Enter to fire the 'next' submit
sometimes if another ajax request occurs between the above event and submit.

Can anyone tell me if I'm on the right track or doing something crazy or if
there is a better way to approach it? Or should I go back to basics ;)

Cheers,
Russell
-- 
View this message in context: 
http://www.nabble.com/Changing-default-form-button-via-Ajax-tp18096567p18096567.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating ListView via AJAX

2008-06-24 Thread Ryan O'Hara

Also, tried using a LoadableDetachableModel in the ListView:

ListView groupMemberRows = new ListView("groupMemberRow", new  
LoadableDetachableModel(){

protected Object load(){
return getGroupMemberships();
}
}) {
protected void populateItem(final ListItem item) {
GroupMembership groupMembership = (GroupMembership)  
item.getModelObject();
item.add(new Label("group", groupMembership.getGroup 
()));
item.add(new CheckBox("member", new PropertyModel 
(groupMembership, "selected")));

}
};

Still no luck.

Ryan

On Jun 24, 2008, at 1:21 PM, Ryan O'Hara wrote:

I'm trying to update a ListView via AJAX.  I've looked over a bunch  
of examples in the archives, but I'm still having some trouble.   
I'm trying to wrap the ListView with a WebMarkupContainer and then  
update that WebMarkupContainer.  I also created a GroupMembership  
object, which is passed into the ListView.  When the form is  
submitted, the List is populated fine, it's just  
not rendering.  Below is the Java and HTML.  Any help would be  
greatly appreciated.  Thanks!


-Ryan

Java:

groupManager = new WebMarkupContainer("groupManager");
groupManager.setOutputMarkupId(true);
form.add(groupManager);

AjaxSubmitLink submit = new AjaxSubmitLink("submit") {
public void onSubmit(AjaxRequestTarget target, Form  
form) {

try {
setGroupMemberships();
target.addComponent(groupManager);
} catch (Exception e) {
error("Unable to get groups for user " + email  
+ ".");

}
target.addComponent(feedbackPanel);
}
};
form.add(submit);

ListView groupMemberRows = new ListView("groupMemberRow",  
getGroupMemberships()) {

protected void populateItem(final ListItem item) {
GroupMembership groupMembership = (GroupMembership)  
item.getModelObject();
item.add(new Label("group", groupMembership.getGroup 
()));
item.add(new CheckBox("member", new PropertyModel 
(groupMembership, "selected")));

}
};
groupManager.add(groupMemberRows);

public void setGroupMemberships() {
groupMemberships.clear();
List userGroups = groupQuery.getGroupsByUser 
(getEmail());

List allGroups = groupQuery.getGroups("*");
GroupMembership groupMembership;
for (String group : allGroups) {
groupMembership = new GroupMembership();
if (userGroups.contains(group)) {
groupMembership.setGroup(group);
groupMembership.setSelected(true);
} else {
groupMembership.setGroup(group);
groupMembership.setSelected(false);
}
groupMemberships.add(groupMembership);
}
}

public List getGroupMemberships() {
return groupMemberships;
}


HTML:




Group
Member







class="formButtonAlignedRight">Save








Updating ListView via AJAX

2008-06-24 Thread Ryan O'Hara
I'm trying to update a ListView via AJAX.  I've looked over a bunch  
of examples in the archives, but I'm still having some trouble.  I'm  
trying to wrap the ListView with a WebMarkupContainer and then update  
that WebMarkupContainer.  I also created a GroupMembership object,  
which is passed into the ListView.  When the form is submitted, the  
List is populated fine, it's just not rendering.   
Below is the Java and HTML.  Any help would be greatly appreciated.   
Thanks!


-Ryan

Java:

groupManager = new WebMarkupContainer("groupManager");
groupManager.setOutputMarkupId(true);
form.add(groupManager);

AjaxSubmitLink submit = new AjaxSubmitLink("submit") {
public void onSubmit(AjaxRequestTarget target, Form form) {
try {
setGroupMemberships();
target.addComponent(groupManager);
} catch (Exception e) {
error("Unable to get groups for user " + email +  
".");

}
target.addComponent(feedbackPanel);
}
};
form.add(submit);

ListView groupMemberRows = new ListView("groupMemberRow",  
getGroupMemberships()) {

protected void populateItem(final ListItem item) {
GroupMembership groupMembership = (GroupMembership)  
item.getModelObject();
item.add(new Label("group", groupMembership.getGroup 
()));
item.add(new CheckBox("member", new PropertyModel 
(groupMembership, "selected")));

}
};
groupManager.add(groupMemberRows);

public void setGroupMemberships() {
groupMemberships.clear();
List userGroups = groupQuery.getGroupsByUser(getEmail 
());

List allGroups = groupQuery.getGroups("*");
GroupMembership groupMembership;
for (String group : allGroups) {
groupMembership = new GroupMembership();
if (userGroups.contains(group)) {
groupMembership.setGroup(group);
groupMembership.setSelected(true);
} else {
groupMembership.setGroup(group);
groupMembership.setSelected(false);
}
groupMemberships.add(groupMembership);
}
}

public List getGroupMemberships() {
return groupMemberships;
}


HTML:




Group
Member







class="formButtonAlignedRight">Save





Re: generics

2008-06-24 Thread Igor Vaynberg
should compile now, there maybe be some failing tests, but mvn clean
install -Dmaven.test.skip=true works for sure

-igor

On Tue, Jun 24, 2008 at 7:41 AM, Martin Funk <[EMAIL PROTECTED]> wrote:
>
>> basically we feel this is a much cleaner way then what is 1.4m2. this
>> is a call for confirmation/discussion from our user base. do try to
>> port a small project or a part of a larger project you are working on
>> to the [1] branch to see how the new api feels. if we do like this
>> more the new branch will be merged into what will be 1.4m3.
>>
>> [1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics
>>
>>
>
> am I the only one running into this:
>
> mvn clean install
> [...]
> [INFO]
> 
> [INFO] Building Wicket
> [INFO]task-segment: [clean, install]
> [INFO]
> 
> [INFO] [clean:clean]
> [INFO] Deleting directory /home/fnk64/tmp/generics/wicket/target
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] Compiling 748 source files to
> /home/fnk64/tmp/generics/wicket/target/classes
> [INFO]
> 
> [ERROR] BUILD FAILURE
> [INFO]
> 
> [INFO] Compilation failure
> /home/fnk64/tmp/generics/wicket/src/main/java/org/apache/wicket/markup/html/list/ListItem.java:[90,42]
> type parameters of T cannot be determined; no unique maximal instance
> exists for type variable T with upper bounds T,java.lang.Object
>
>
>
> /home/fnk64/tmp/generics/wicket/src/main/java/org/apache/wicket/markup/html/list/ListItem.java:[90,42]
> type parameters of T cannot be determined; no unique maximal instance
> exists for type variable T with upper bounds T,java.lang.Object
> [...]
>
> though eclipse compiler doesn't complain
>
> I'm running: javac -version
> javac 1.5.0_15
>
> uname -a
> Linux fnk64-desktop 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008
> i686 GNU/Linux
>
> on a current Kubuntu 8/04
>
> mf
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trying to use spring with wicket

2008-06-24 Thread Igor Vaynberg
i think this maven archetype might be what you are looking for

http://www.wicketstuff.org/teamcity/viewType.html?buildTypeId=bt17

-igor

On Tue, Jun 24, 2008 at 8:29 AM, Piller Sébastien <[EMAIL PROTECTED]> wrote:
> Hello guys,
>
> I'm trying to get Wicket use Spring & Hibernate correctly. I don't know
> Spring very well, so I probably made some great errors.
>
> I have some question for the beginning:
>
> - I saw a "SpringWebApplication" in wicket. Does my app must extends this
> class or is it possible to use spring & an AuthenticatedWebApplication?
> - Is it possible to use spring with filters or do I need to use servlets?
> - Does anybody have a quickstart project that runs with Spring 2.5,
> Hibernate 3.2 and Wicket 1.3.1?
>
>
> Thanks you
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: default data table and navigation toolbar

2008-06-24 Thread Igor Vaynberg
roll your own datatable subclass instead of the default one, and
override isvisible on the navigation label to work how you want it to.

-igor

On Tue, Jun 24, 2008 at 5:07 AM, Karen Schaper
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a question about the navigation toolbar on my DefaultDataTable
>
> The navigation toolbar for example will display "Showing 1 to 50 of 234.
>
> If the total is 50 or less nothing is displayed but I need the total to at
> least display.  The user needs to know how many rows are in the table.
>
> Thanks
>
> Karen
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: are checkboxes broken WAS: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?

2008-06-24 Thread Thomas Mäder
Can you reproduce this in a quickstart? Considering nobody had a pertinent
ide the last time, it might be easier.

Thomas

On Tue, Jun 24, 2008 at 4:12 PM, Kirk Israel <[EMAIL PROTECTED]> wrote:

> OK, to summarize what came previously:
> we had a "palette" control (two parallel listboxes, with push buttons
> in between for moving items from one list to the other), and tried to
> have a checkbox that would "select all" - that part worked fine, but
> for some reason we couldn't get it so using the buttons to remove
> items from the right list would also cause the "select all" checkbox
> to be unchecked. We punted, and used a "select all" link that didn't
> need to be visually updated.
>
> But now we're seeing some kind of related problem... in this form we
> have a big CheckGroup -- (previously we had trouble getting the
> contents of the CheckGroup to update when they weren't DHTML-visible,
> so we redraw the whole panel the checkboxes are on). Individual
> subsets of the checkboxes in the overall checkgroup have their own
> "select all" and "clear" links, along with a written summary of what
> is selected inside that checkgroup.
>
> Now, when someone clicks the push button in the pallet control, the
> "select all" links for the checkgroup subsets seem to be updating the
> model (since we see the written summary labels update") but the
> checkboxes don't check! -- until you click one of the checkboxes in
> ANY of the check group subsets, then the select all links can update
> the checkboxes as well.
>
> By using labels w/ timestamps, it seems clear that everything is being
> redrawn. And even if all the internal logic for the palette control
> pushbutton is removed, it's just a AjaxFallbackButton with
> setDefaultFormProcessing(false) that does nothing, the select all
> links can no longer make the checkboxes show the correct state of
> their entry in the cjeckgroup, even as they're redrawn. (Until one is
> clicked, at which point the connection is restored)
>
> So what is going on here?  Does this symptom seem to point to
> something we're doing wrong, or is there some kind of generalized
> checkbox updating issue? (since this is KIND of like the previous
> problem)
>
> This is Wicket 1.3.3...
>
>
>
> On Tue, May 27, 2008 at 9:15 AM, Kirk Israel <[EMAIL PROTECTED]> wrote:
> > The Model was a HashMap.
> > When the page was first loaded, only "true" values were loaded into
> > it, i.e. there were no keys or values for checkboxes that weren't
> > supposed to be checked.
> > Later, it didn't matter if we added in an explicit false value for a
> > key, or removing the key, neither were enough to get the checkbox to
> > read that its value had changed.
> >
> > On Sun, May 25, 2008 at 6:00 AM, Thomas Mäder <[EMAIL PROTECTED]>
> wrote:
> >> What value are you returning from the model? In CheckBox.java, I find
> this:
> >>
> >>
> >>final String value = getValue();
> >>if (value != null)
> >>{
> >>try
> >>{
> >>if (Strings.isTrue(value))
> >>{
> >>tag.put("checked", "checked");
> >>}
> >>
> >> And Strings.isTrue() only accepts a bunch of well known values (plus
> null)
> >>
> >> Thomas
> >>
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: help with RadioGroup in Table

2008-06-24 Thread Thomas Mäder
> new Radio( "select", new PropertyModel( model, "selected" ))

you're setting the model of the Radio to the "selected" property of whatever
is in the row model. What is in the row model? Have you tried just passing
in the row model?

Thomas

On Tue, Jun 24, 2008 at 1:59 PM, jnorris <[EMAIL PROTECTED]> wrote:

>
> This problem is a real show-stopper for me so I really need some help if
> anyone has done something similiar.  I added
> AjaxFormChoiceComponentUpdatingBehavior to the RadioGroup as mentioned in
> another post and it hits onUpdate every time a radio button is selected.
> However, I can't figure out 1) how to get the selected row item's data
> object from the table and 2) what component to add to the AjaxRequestTarget
> (tried the radio group but it throws an exception).
>
> BTW, I gave a prezo to my group a couple of weeks ago and there was some
> real interest in migrating to wicket in place of our bloated legacy system,
> providing I can finish off this proof of concept that I'm working on.
>  There
> is also some pressure here to do a complete re-design in asp.net so I'm
> really hoping to provide an alternative to doing that.  If I can't get the
> radio group in the table working soon I'll have to abandon the wicket
> approach.  So, any hints, help, url's to examples, etc. will be greatly
> appreciated.
>
> Thanks,
> Jim
> --
> View this message in context:
> http://www.nabble.com/help-with-RadioGroup-in-Table-tp18036005p18089479.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: generics

2008-06-24 Thread Zappaterrini, Larry
I'm getting the same thing.

-Original Message-
From: Martin Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2008 10:42 AM
To: users@wicket.apache.org
Subject: Re: generics


> basically we feel this is a much cleaner way then what is 1.4m2. this
> is a call for confirmation/discussion from our user base. do try to
> port a small project or a part of a larger project you are working on
> to the [1] branch to see how the new api feels. if we do like this
> more the new branch will be merged into what will be 1.4m3.
>
> [1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics
>
>   
am I the only one running into this:

mvn clean install
[...]
[INFO] 

[INFO] Building Wicket
[INFO]task-segment: [clean, install]
[INFO] 

[INFO] [clean:clean]
[INFO] Deleting directory /home/fnk64/tmp/generics/wicket/target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 748 source files to 
/home/fnk64/tmp/generics/wicket/target/classes
[INFO] 

[ERROR] BUILD FAILURE
[INFO] 

[INFO] Compilation failure
/home/fnk64/tmp/generics/wicket/src/main/java/org/apache/wicket/markup/h
tml/list/ListItem.java:[90,42] 
type parameters of T cannot be determined; no unique maximal instance

exists for type variable T with upper bounds T,java.lang.Object



/home/fnk64/tmp/generics/wicket/src/main/java/org/apache/wicket/markup/h
tml/list/ListItem.java:[90,42] 
type parameters of T cannot be determined; no unique maximal instance

exists for type variable T with upper bounds T,java.lang.Object
[...]

though eclipse compiler doesn't complain

I'm running: javac -version
javac 1.5.0_15

 uname -a
Linux fnk64-desktop 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 
2008 i686 GNU/Linux

on a current Kubuntu 8/04

mf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__

The information contained in this message is proprietary and/or confidential. 
If you are not the 
intended recipient, please: (i) delete the message and all copies; (ii) do not 
disclose, 
distribute or use the message in any manner; and (iii) notify the sender 
immediately. In addition, 
please be aware that any message addressed to our domain is subject to 
archiving and review by 
persons other than the intended recipient. Thank you.
_

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket CMS

2008-06-24 Thread Thomas Mäder
It might spark interest if you add a bit of documentation and a live demo.
Not everyone has the time to read through your code.

Thomas

On Tue, Jun 24, 2008 at 4:21 PM, james yong <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> Is there anyone who would like to pool efforts for a wicket-based cms?
>
> Currently, I have a prototype verson at http://code.google.com/p/welo/,
> but
> I would like to put efforts into a better one (not necessary mine).
>
> Regards,
> James
> --
> View this message in context:
> http://www.nabble.com/Wicket-CMS-tp18092129p18092129.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Trying to use spring with wicket

2008-06-24 Thread Piller Sébastien

Hello guys,

I'm trying to get Wicket use Spring & Hibernate correctly. I don't know 
Spring very well, so I probably made some great errors.


I have some question for the beginning:

- I saw a "SpringWebApplication" in wicket. Does my app must extends 
this class or is it possible to use spring & an AuthenticatedWebApplication?

- Is it possible to use spring with filters or do I need to use servlets?
- Does anybody have a quickstart project that runs with Spring 2.5, 
Hibernate 3.2 and Wicket 1.3.1?



Thanks you

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: generics

2008-06-24 Thread Martijn Dashorst
I can try to do so later this evening (after I've done my duties for
Wicket in Action)

Martijn

On Tue, Jun 24, 2008 at 5:21 PM, Brill Pappin <[EMAIL PROTECTED]> wrote:
> I personally don't mind changes that cause me migration pain if they
> actually make it better. I'm looking forward to trying it out.
> Would it be possible to deploy the snapshots some place so I don't have to
> go through the build pain?
>
> - Brill Pappin
>
> On 24-Jun-08, at 1:12 AM, Igor Vaynberg wrote:
>
>> development of the 1.4 branch has been quiet lately, this is because
>> the core team has been busy working on an alternative way of
>> generifiing the framework. an early result of that effort can be found
>> here [1]. The key difference in [1] is that we have decoupled the
>> component from the type of the model.
>>
>> here is the list of major differences:
>>
>> (1) only components that use their model have a generic type
>> (components you are likely to call getmodel/getmodelobject on as a
>> user). so far these are link,form,formcomponent
>> subclasses,listview,listitem,(other repeaters will follow soon). this
>> allows for typesafety where it makes sense, and eliminates a ton of
>> noise from code. we will generify others upon request if a good
>> usecase is provided and we think it is widely applicable.
>>
>> (2) non-generified components do not have IModel get/setModel and T
>> get/setModelObject, instead they have IModelget/setDefaultModel and
>> Object get/setDefaultModelObject. this clearly expresses that the
>> default component model is not tied to the type of component. this is
>> a bit of a pain from the code migration point of view, but we think is
>> worth the effort. generifyed components are free to implement the old
>> IModel get/setModel, etc, but have to keep the unsafe cast inside.
>> see ListItem for an example.
>>
>> basically we feel this is a much cleaner way then what is 1.4m2. this
>> is a call for confirmation/discussion from our user base. do try to
>> port a small project or a part of a larger project you are working on
>> to the [1] branch to see how the new api feels. if we do like this
>> more the new branch will be merged into what will be 1.4m3.
>>
>> [1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics
>>
>> -igor
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: generics

2008-06-24 Thread Brill Pappin
I personally don't mind changes that cause me migration pain if they  
actually make it better. I'm looking forward to trying it out.
Would it be possible to deploy the snapshots some place so I don't  
have to go through the build pain?


- Brill Pappin

On 24-Jun-08, at 1:12 AM, Igor Vaynberg wrote:


development of the 1.4 branch has been quiet lately, this is because
the core team has been busy working on an alternative way of
generifiing the framework. an early result of that effort can be found
here [1]. The key difference in [1] is that we have decoupled the
component from the type of the model.

here is the list of major differences:

(1) only components that use their model have a generic type
(components you are likely to call getmodel/getmodelobject on as a
user). so far these are link,form,formcomponent
subclasses,listview,listitem,(other repeaters will follow soon). this
allows for typesafety where it makes sense, and eliminates a ton of
noise from code. we will generify others upon request if a good
usecase is provided and we think it is widely applicable.

(2) non-generified components do not have IModel get/setModel and T
get/setModelObject, instead they have IModelget/setDefaultModel and
Object get/setDefaultModelObject. this clearly expresses that the
default component model is not tied to the type of component. this is
a bit of a pain from the code migration point of view, but we think is
worth the effort. generifyed components are free to implement the old
IModel get/setModel, etc, but have to keep the unsafe cast inside.
see ListItem for an example.

basically we feel this is a much cleaner way then what is 1.4m2. this
is a call for confirmation/discussion from our user base. do try to
port a small project or a part of a larger project you are working on
to the [1] branch to see how the new api feels. if we do like this
more the new branch will be merged into what will be 1.4m3.

[1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics

-igor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AjaxFormSubmitBehavior detection in form Submit

2008-06-24 Thread Bertrand DATAS
 Hi all,
I have a little question : Is it possible to find which
AjaxFormSubmitBehavior is executed with findSubmittingButton() for example
or something like that ??


Re: howto query which domain?

2008-06-24 Thread Nino Saturnino Martinez Vazquez Wael
Hehe, thanks for your response I sent it to the wrong forum, not wicket 
related, too many posts to wicket I guess.. :) It were supposed to goto 
[EMAIL PROTECTED]


Problem are that I use apache2 http server to forward my requests. And I 
want todo "skinning" dependant on domain names, however domain are 
always set to localhost.. If I use preserve host then I get the 
application path appended, which are wrong... I you have any suggestion 
please say, currently im investigating the possibility of adding a 
header dependent on domain.. When I get a solution I can post it here, 
although off topic..


Michael Sparer wrote:

I triggered it in the doFilter method of a filter, however you surely know
how to get the request from inside a wicket component ;-)

For me, it went like that:

public void doFilter(final ServletRequest request, final ServletResponse
response, final FilterChain chain) throws IOException, ServletException {

final Request req = (Request) request;

final HttpFields fields = 
req.getConnection().getRequestFields();
final String hostField = fields.getStringField("Host"); // that's the field


hope that helps

Michael



Nino.Martinez wrote:
  
Hi I have a vhost which has several serveraliases, how can I check for 
which one is being triggered?


Something like this:

if serveralias="myalias" then{
   RequestHeadder add domain "myalias"
}

I've tried location, but it does not seem to be the thing..

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
Michael Sparer
http://talk-on-tech.blogspot.com
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help with RadioGroup in Table

2008-06-24 Thread Igor Vaynberg
create a quickstart and post it somewhere. its hard for anyone to wave
their dead chicken in front of the screen.

-igor

On Tue, Jun 24, 2008 at 4:59 AM, jnorris <[EMAIL PROTECTED]> wrote:
>
> This problem is a real show-stopper for me so I really need some help if
> anyone has done something similiar.  I added
> AjaxFormChoiceComponentUpdatingBehavior to the RadioGroup as mentioned in
> another post and it hits onUpdate every time a radio button is selected.
> However, I can't figure out 1) how to get the selected row item's data
> object from the table and 2) what component to add to the AjaxRequestTarget
> (tried the radio group but it throws an exception).
>
> BTW, I gave a prezo to my group a couple of weeks ago and there was some
> real interest in migrating to wicket in place of our bloated legacy system,
> providing I can finish off this proof of concept that I'm working on.  There
> is also some pressure here to do a complete re-design in asp.net so I'm
> really hoping to provide an alternative to doing that.  If I can't get the
> radio group in the table working soon I'll have to abandon the wicket
> approach.  So, any hints, help, url's to examples, etc. will be greatly
> appreciated.
>
> Thanks,
> Jim
> --
> View this message in context: 
> http://www.nabble.com/help-with-RadioGroup-in-Table-tp18036005p18089479.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: generics

2008-06-24 Thread Martin Funk



basically we feel this is a much cleaner way then what is 1.4m2. this
is a call for confirmation/discussion from our user base. do try to
port a small project or a part of a larger project you are working on
to the [1] branch to see how the new api feels. if we do like this
more the new branch will be merged into what will be 1.4m3.

[1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics

  

am I the only one running into this:

mvn clean install
[...]
[INFO] 


[INFO] Building Wicket
[INFO]task-segment: [clean, install]
[INFO] 


[INFO] [clean:clean]
[INFO] Deleting directory /home/fnk64/tmp/generics/wicket/target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 748 source files to 
/home/fnk64/tmp/generics/wicket/target/classes
[INFO] 


[ERROR] BUILD FAILURE
[INFO] 


[INFO] Compilation failure
/home/fnk64/tmp/generics/wicket/src/main/java/org/apache/wicket/markup/html/list/ListItem.java:[90,42] 
type parameters of T cannot be determined; no unique maximal instance 
exists for type variable T with upper bounds T,java.lang.Object




/home/fnk64/tmp/generics/wicket/src/main/java/org/apache/wicket/markup/html/list/ListItem.java:[90,42] 
type parameters of T cannot be determined; no unique maximal instance 
exists for type variable T with upper bounds T,java.lang.Object

[...]

though eclipse compiler doesn't complain

I'm running: javac -version
javac 1.5.0_15

uname -a
Linux fnk64-desktop 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 
2008 i686 GNU/Linux


on a current Kubuntu 8/04

mf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DataTable-like component for open-ended data sets

2008-06-24 Thread Igor Vaynberg
simply return Integer.MAX_SIZE from dataprovider.size(), and subclass
the dataprovider and hide the gotoend link.

-igor

On Tue, Jun 24, 2008 at 2:29 AM, Jan Stette <[EMAIL PROTECTED]> wrote:
> The application I'm working on needs several instances of a
> DataTable/GridView-like component where the size of the underlying dataset
> is is not known.  It's basically very expensive to retrieve the whole data
> set to find out how many items are in it, so I'd like to just iterate
> through the data set page by page.  The IDataProvider interface used by
> GridView provides the size() method, so I'd like to provide a data provider
> without this method.  And then in the grid component, leave out the "go to
> end" functionality and the display of the number of pages.  In every other
> respect it's the same as DataTable.
>
> It wouldn't be too hard to write one myself of course, but I'm wondering if
> such a thing exists already?
>
> Regards,
> Jan
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket CMS

2008-06-24 Thread james yong

Hi,

Is there anyone who would like to pool efforts for a wicket-based cms?

Currently, I have a prototype verson at http://code.google.com/p/welo/, but
I would like to put efforts into a better one (not necessary mine).

Regards,
James
-- 
View this message in context: 
http://www.nabble.com/Wicket-CMS-tp18092129p18092129.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



are checkboxes broken WAS: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?

2008-06-24 Thread Kirk Israel
OK, to summarize what came previously:
we had a "palette" control (two parallel listboxes, with push buttons
in between for moving items from one list to the other), and tried to
have a checkbox that would "select all" - that part worked fine, but
for some reason we couldn't get it so using the buttons to remove
items from the right list would also cause the "select all" checkbox
to be unchecked. We punted, and used a "select all" link that didn't
need to be visually updated.

But now we're seeing some kind of related problem... in this form we
have a big CheckGroup -- (previously we had trouble getting the
contents of the CheckGroup to update when they weren't DHTML-visible,
so we redraw the whole panel the checkboxes are on). Individual
subsets of the checkboxes in the overall checkgroup have their own
"select all" and "clear" links, along with a written summary of what
is selected inside that checkgroup.

Now, when someone clicks the push button in the pallet control, the
"select all" links for the checkgroup subsets seem to be updating the
model (since we see the written summary labels update") but the
checkboxes don't check! -- until you click one of the checkboxes in
ANY of the check group subsets, then the select all links can update
the checkboxes as well.

By using labels w/ timestamps, it seems clear that everything is being
redrawn. And even if all the internal logic for the palette control
pushbutton is removed, it's just a AjaxFallbackButton with
setDefaultFormProcessing(false) that does nothing, the select all
links can no longer make the checkboxes show the correct state of
their entry in the cjeckgroup, even as they're redrawn. (Until one is
clicked, at which point the connection is restored)

So what is going on here?  Does this symptom seem to point to
something we're doing wrong, or is there some kind of generalized
checkbox updating issue? (since this is KIND of like the previous
problem)

This is Wicket 1.3.3...



On Tue, May 27, 2008 at 9:15 AM, Kirk Israel <[EMAIL PROTECTED]> wrote:
> The Model was a HashMap.
> When the page was first loaded, only "true" values were loaded into
> it, i.e. there were no keys or values for checkboxes that weren't
> supposed to be checked.
> Later, it didn't matter if we added in an explicit false value for a
> key, or removing the key, neither were enough to get the checkbox to
> read that its value had changed.
>
> On Sun, May 25, 2008 at 6:00 AM, Thomas Mäder <[EMAIL PROTECTED]> wrote:
>> What value are you returning from the model? In CheckBox.java, I find this:
>>
>>
>>final String value = getValue();
>>if (value != null)
>>{
>>try
>>{
>>if (Strings.isTrue(value))
>>{
>>tag.put("checked", "checked");
>>}
>>
>> And Strings.isTrue() only accepts a bunch of well known values (plus null)
>>
>> Thomas
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DropDownChoice setting other DropDownChoice using AJAX results in null at submit

2008-06-24 Thread Giuliano Caliari
Hello Timo, thanks for the quick reply.

As you can see I am new to wicket and I'm trying to evaluate it for my projects.
The code I sent in the first email was a bit confusing because I have been 
trying a lot of things to solve my problem.

I have read the wiki page, but I didn't fully understand.
After that I googled for examples and what you saw was my very own wicket 
Frankenstein Monster.

I'll try to explain what happened.


> >IModel armyChoices = new AbstractReadOnlyModel()
> >{
> >public Object getObject()
> >{
> >List armys = new ArrayList();
> >armys.add(stwData.getArmyByCategory(StwMapCategory.SMALL));
> >armys.add(stwData.getArmyByCategory(StwMapCategory.MEDIUM));
> >armys.add(stwData.getArmyByCategory(StwMapCategory.LARGE));
> >
> > stwMatchPrefs.setChosenArmy(stwData.getArmyByCategory(stwMatchPrefs.getMapCategory()));
> >return armys;
> >}
> >};
> 
> This seems like a strange side effect -- whenever a component
> with armyChoices as its model is rendered,
> stwMatchPrefs.setChosenArmy() is called. Because this is the model
> of the chosenArmy DropDownChoice, whenever the DropDownChoice is
> rendered, this getObject() method is evaluated.


this "stwMatchPrefs.setChosenArmy()" call was not supposed to be here. This was 
another attempt at fixing the problem.



> mapCategory.add(new AjaxFormComponentUpdatingBehavior("onchange")
> {
> protected void onUpdate(AjaxRequestTarget target)
> {
> 
> stwMatchPrefs.setChosenArmy(stwData.getArmyByCategory(stwMatchPrefs.getMapCategory()));
> chosenArmy.setModelObject(stwMatchPrefs.getChosenArmy());
> target.addComponent(chosenArmy);
> }
> });

Here, the "chosenArmy.setModelObject" was also me trying to fix the code.

> BTW, what are these methods here for?

These 2 are there for spring to inject the bean 
"@SpringBean(name="armyServices")"
Also, I have removed the CompoundPropertyModel.

The real problem is that whenever chosenArmy DropDownChoice is changed through 
the AJAX code, stwMatchPrefs.setChosenArmy receives null when the form is 
submitted.
I thought that maybe I had to set the value of "chosenArmy" or "stwMatchPrefs" 
in some place I had not set, so I tried to set these 2 everywhere in the code.
Here's how I should have sent the code in the first email.
It still gives me "null" on submit, after AJAX changes the chosenArmy 
DropDownChoice. 



public class StwFrontPage extends BasePage {
public ArmyServices armyServices;
StwData stwData;
StwMatchPrefs stwMatchPrefs;

public StwFrontPage() {
stwMatchPrefs = new StwMatchPrefs();
Form stwPrefsForm = new StwPrefForm("StwPrefsForm");
add(stwPrefsForm);

stwMatchPrefs.setMapCategory(StwMapCategory.SMALL);
DropDownChoice mapCategory = new DropDownChoice("mapCategory", new 
PropertyModel(stwMatchPrefs, "mapCategory"), StwMapCategory.getList());

stwPrefsForm.add(mapCategory);

IChoiceRenderer armyChoicesRenderer = new IChoiceRenderer()
{
public Object getDisplayValue(Object o) {
return ((Army)o).getName();
}

public String getIdValue(Object o, int i) {
return Integer.toString(i);
}
};

stwData = AbismoWicketWebSession.get().getNewAbismoUser().getStwData();
if(stwData == null){
stwData = new StwData();
}
if(!stwData.isInitialized()){
stwData.init(AbismoWicketWebSession.get().getNewAbismoUser(),
armyServices.getBasicArmy(StwMapCategory.SMALL),
armyServices.getBasicArmy(StwMapCategory.MEDIUM),
armyServices.getBasicArmy(StwMapCategory.LARGE)
);
}
IModel armyChoices = new AbstractReadOnlyModel()
{
public Object getObject()
{
List  armys = new ArrayList  ();
armys.add(stwData.getArmyByCategory(StwMapCategory.SMALL));
armys.add(stwData.getArmyByCategory(StwMapCategory.MEDIUM));
armys.add(stwData.getArmyByCategory(StwMapCategory.LARGE));
return armys;
}
};


stwMatchPrefs.setChosenArmy(stwData.getArmyByCategory(StwMapCategory.SMALL));
final DropDownChoice chosenArmy = new DropDownChoice("chosenArmy", new 
PropertyModel(stwMatchPrefs, "chosenArmy"), armyChoices, armyChoicesRenderer );
chosenArmy.setOutputMarkupId(true);
stwPrefsForm.add(chosenArmy);

mapCategory.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
protected void onUpdate(AjaxRequestTarget target)
{

stwMatchPrefs.setChosenArmy(stwData.getArmyBy

Re: Wicket-Security: What is the easiest way to switch user's principal behind the scenes?

2008-06-24 Thread Sergey Podatelev
Thanks a lot, I'll give it a try.

On Tue, Jun 24, 2008 at 5:54 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote:

> First login with the second context, then log off with the first
> context. swarm will invalidate the session after the last subject has
> logged off. which is what is happening in your case.
> The easiest is to use different logincontexts classes for this but you
> should also be able to use the level parameter you can pass to the
> constructor.
>
> Maurice
>
> On Tue, Jun 24, 2008 at 3:48 PM, Sergey Podatelev
> <[EMAIL PROTECTED]> wrote:
> > Thanks Maurice, this is exactly what I've done so far.
> > But for some reason, session is reset.
> >
> > I'm using Acegi, and my LoginContext looks very similar to the one
> provided
> > in the example of Swarm/Acegi integration.
> > Since Authentication object containing user credentials, kept in Acegi's
> > SecurityContext is being destroyed, I save it and pass to the login
> context.
> >
> > Here's what I do:
> >
> > ReauthPage.java:
> > ...
> > Authentication authentication =
> > SecurityContextHolder.getContext().getAuthentication();
> > UsernamePasswordAuthenticationToken token =
> > (UsernamePasswordAuthenticationToken) authentication;
> >
> > ((WaspSession) getSession()).logoff(MyLoginContext());
> > ((WaspSession) getSession()).login(MyLoginContext(token));
> >
> > setResponsePage(SomePage.java);
> >
> > At this point everything seems to be okay, no exceptions are thrown that
> > would be in case of unsuccessful authentication from LoginPage.
> > However, once SomePage.java is instantiated, the newSession() method of
> > MyApplication is called, thus logging user out.
> >
> > Any clues on why could that happen?
> >
> >
> >
> > On Tue, Jun 24, 2008 at 5:32 PM, Maurice Marrink <[EMAIL PROTECTED]>
> wrote:
> >
> >> By default a logincontext only allows a single login, this can be
> >> changed by a constructor flag.
> >> To switch principals simply login a second time with the new context
> >> and logoff with the old context.
> >> the session will be preserved.
> >>
> >> Maurice
> >>
> >> On Tue, Jun 24, 2008 at 2:14 PM, Sergey Podatelev
> >> <[EMAIL PROTECTED]> wrote:
> >> > Hello,
> >> >
> >> > I'm wondering, how can I remove current Principals/Subject stored in
> >> > LoginContext and put another Subject/Principle without making user
> >> re-login
> >> > and without invalidation session (if that's even possible)?
> >> > Just a brief description would be enough (:
> >> >
> >> > --
> >> > sp
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > sp
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
sp


Re: Wicket-Security: What is the easiest way to switch user's principal behind the scenes?

2008-06-24 Thread Maurice Marrink
First login with the second context, then log off with the first
context. swarm will invalidate the session after the last subject has
logged off. which is what is happening in your case.
The easiest is to use different logincontexts classes for this but you
should also be able to use the level parameter you can pass to the
constructor.

Maurice

On Tue, Jun 24, 2008 at 3:48 PM, Sergey Podatelev
<[EMAIL PROTECTED]> wrote:
> Thanks Maurice, this is exactly what I've done so far.
> But for some reason, session is reset.
>
> I'm using Acegi, and my LoginContext looks very similar to the one provided
> in the example of Swarm/Acegi integration.
> Since Authentication object containing user credentials, kept in Acegi's
> SecurityContext is being destroyed, I save it and pass to the login context.
>
> Here's what I do:
>
> ReauthPage.java:
> ...
> Authentication authentication =
> SecurityContextHolder.getContext().getAuthentication();
> UsernamePasswordAuthenticationToken token =
> (UsernamePasswordAuthenticationToken) authentication;
>
> ((WaspSession) getSession()).logoff(MyLoginContext());
> ((WaspSession) getSession()).login(MyLoginContext(token));
>
> setResponsePage(SomePage.java);
>
> At this point everything seems to be okay, no exceptions are thrown that
> would be in case of unsuccessful authentication from LoginPage.
> However, once SomePage.java is instantiated, the newSession() method of
> MyApplication is called, thus logging user out.
>
> Any clues on why could that happen?
>
>
>
> On Tue, Jun 24, 2008 at 5:32 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
>
>> By default a logincontext only allows a single login, this can be
>> changed by a constructor flag.
>> To switch principals simply login a second time with the new context
>> and logoff with the old context.
>> the session will be preserved.
>>
>> Maurice
>>
>> On Tue, Jun 24, 2008 at 2:14 PM, Sergey Podatelev
>> <[EMAIL PROTECTED]> wrote:
>> > Hello,
>> >
>> > I'm wondering, how can I remove current Principals/Subject stored in
>> > LoginContext and put another Subject/Principle without making user
>> re-login
>> > and without invalidation session (if that's even possible)?
>> > Just a brief description would be enough (:
>> >
>> > --
>> > sp
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> sp
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket-Security: What is the easiest way to switch user's principal behind the scenes?

2008-06-24 Thread Sergey Podatelev
Thanks Maurice, this is exactly what I've done so far.
But for some reason, session is reset.

I'm using Acegi, and my LoginContext looks very similar to the one provided
in the example of Swarm/Acegi integration.
Since Authentication object containing user credentials, kept in Acegi's
SecurityContext is being destroyed, I save it and pass to the login context.

Here's what I do:

ReauthPage.java:
...
Authentication authentication =
SecurityContextHolder.getContext().getAuthentication();
UsernamePasswordAuthenticationToken token =
(UsernamePasswordAuthenticationToken) authentication;

((WaspSession) getSession()).logoff(MyLoginContext());
((WaspSession) getSession()).login(MyLoginContext(token));

setResponsePage(SomePage.java);

At this point everything seems to be okay, no exceptions are thrown that
would be in case of unsuccessful authentication from LoginPage.
However, once SomePage.java is instantiated, the newSession() method of
MyApplication is called, thus logging user out.

Any clues on why could that happen?



On Tue, Jun 24, 2008 at 5:32 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote:

> By default a logincontext only allows a single login, this can be
> changed by a constructor flag.
> To switch principals simply login a second time with the new context
> and logoff with the old context.
> the session will be preserved.
>
> Maurice
>
> On Tue, Jun 24, 2008 at 2:14 PM, Sergey Podatelev
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I'm wondering, how can I remove current Principals/Subject stored in
> > LoginContext and put another Subject/Principle without making user
> re-login
> > and without invalidation session (if that's even possible)?
> > Just a brief description would be enough (:
> >
> > --
> > sp
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
sp


Re: Wicket-Security: What is the easiest way to switch user's principal behind the scenes?

2008-06-24 Thread Maurice Marrink
By default a logincontext only allows a single login, this can be
changed by a constructor flag.
To switch principals simply login a second time with the new context
and logoff with the old context.
the session will be preserved.

Maurice

On Tue, Jun 24, 2008 at 2:14 PM, Sergey Podatelev
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm wondering, how can I remove current Principals/Subject stored in
> LoginContext and put another Subject/Principle without making user re-login
> and without invalidation session (if that's even possible)?
> Just a brief description would be enough (:
>
> --
> sp
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: howto query which domain?

2008-06-24 Thread Michael Sparer


I triggered it in the doFilter method of a filter, however you surely know
how to get the request from inside a wicket component ;-)

For me, it went like that:

public void doFilter(final ServletRequest request, final ServletResponse
response, final FilterChain chain) throws IOException, ServletException {

final Request req = (Request) request;

final HttpFields fields = 
req.getConnection().getRequestFields();
final String hostField = fields.getStringField("Host"); // that's the field


hope that helps

Michael



Nino.Martinez wrote:
> 
> Hi I have a vhost which has several serveraliases, how can I check for 
> which one is being triggered?
> 
> Something like this:
> 
> if serveralias="myalias" then{
>RequestHeadder add domain "myalias"
> }
> 
> I've tried location, but it does not seem to be the thing..
> 
> -- 
> -Wicket for love
> 
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/howto-query-which-domain--tp18075564p18089774.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket-Security: What is the easiest way to switch user's principal behind the scenes?

2008-06-24 Thread Sergey Podatelev
Hello,

I'm wondering, how can I remove current Principals/Subject stored in
LoginContext and put another Subject/Principle without making user re-login
and without invalidation session (if that's even possible)?
Just a brief description would be enough (:

-- 
sp


Re: Google friendly urls

2008-06-24 Thread Michael Sparer

I started a wiki-page about SEO last month, maybe it helps you optimising
your page. and of course feel free to add your findings.

http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html

regards, 
Michael

Mathias P.W Nilsson wrote:
> 
> Hi!
> 
> I'm trying to get my wicket urls to work with google spiders. Right now I
> have the ?wicket:interface=:1 and I was just wondering.
> 
> Do I have to use PageParameters to get urls like ?Brand=34 
> 
> I now pass objects to a pages constructor. Thanks
> 
> Like
> 
> List filters = new LinkedList();
> filters.add( new StoreFilter( 1 ) );
> filters.add( new BalanceFilter( 1 ) );
> filters.add( new BrandFilter( 34 ) );
> 
> 
> setResponsePage( new ItemPage( filters ) ) ;
> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Google-friendly-urls-tp18079064p18089675.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



default data table and navigation toolbar

2008-06-24 Thread Karen Schaper
Hi,

I have a question about the navigation toolbar on my DefaultDataTable

The navigation toolbar for example will display "Showing 1 to 50 of 234.

If the total is 50 or less nothing is displayed but I need the total to at
least display.  The user needs to know how many rows are in the table.

Thanks

Karen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help with RadioGroup in Table

2008-06-24 Thread jnorris

This problem is a real show-stopper for me so I really need some help if
anyone has done something similiar.  I added
AjaxFormChoiceComponentUpdatingBehavior to the RadioGroup as mentioned in
another post and it hits onUpdate every time a radio button is selected. 
However, I can't figure out 1) how to get the selected row item's data
object from the table and 2) what component to add to the AjaxRequestTarget
(tried the radio group but it throws an exception).

BTW, I gave a prezo to my group a couple of weeks ago and there was some
real interest in migrating to wicket in place of our bloated legacy system,
providing I can finish off this proof of concept that I'm working on.  There
is also some pressure here to do a complete re-design in asp.net so I'm
really hoping to provide an alternative to doing that.  If I can't get the
radio group in the table working soon I'll have to abandon the wicket
approach.  So, any hints, help, url's to examples, etc. will be greatly
appreciated.

Thanks,
Jim
-- 
View this message in context: 
http://www.nabble.com/help-with-RadioGroup-in-Table-tp18036005p18089479.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebPage markup error with latest trunk

2008-06-24 Thread Jan Kriesten


hi sven,


Did somebody create a jira issue already?


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

best regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebPage markup error with latest trunk

2008-06-24 Thread svenmeier

Did somebody create a jira issue already?

I'm experiencing the same log statement since upgrading to 1.3.4.

Perhaps the fix for Wicket-1636 is the reason why the header check was never
performed previously?

I have  and  in my page's markup.

Sven


igor.vaynberg wrote:
> 
> quickstart and jira please
> 
> -igor
> 
> On Mon, May 26, 2008 at 10:54 AM, Jan Kriesten
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi Igor,
>>
>>> are you sure the markup of the child page that you are trying to
>>> render is inside wicket:extend tags?
>>
>> yes, I am. And also the application didn't show this behavior before with
>> trunk from two days ago...
>>
>>> what happens if you remove the transparent resolver, does the error go
>>> away?
>>
>> Yep, when I remove it, the error is gone.
>>
>> --- Jan.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/WebPage-markup-error-with-latest-trunk-tp17467363p18087509.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DataTable-like component for open-ended data sets

2008-06-24 Thread Jan Stette
The application I'm working on needs several instances of a
DataTable/GridView-like component where the size of the underlying dataset
is is not known.  It's basically very expensive to retrieve the whole data
set to find out how many items are in it, so I'd like to just iterate
through the data set page by page.  The IDataProvider interface used by
GridView provides the size() method, so I'd like to provide a data provider
without this method.  And then in the grid component, leave out the "go to
end" functionality and the display of the number of pages.  In every other
respect it's the same as DataTable.

It wouldn't be too hard to write one myself of course, but I'm wondering if
such a thing exists already?

Regards,
Jan


Re: DefaultAbstractTree or BaseTree?

2008-06-24 Thread jWeekend

Kaspar,

If you find class diagrams useful take a look at the "
http://www.jweekend.com/dev/ArticlesPage/ Wicket Trees - Class Diagram " and
let us know if these are interesting - I think we have a few more
Wicket-internals UML diagrams (mainly class and sequence diagrams, and
probably a couple of state-machines) we could dig up and make available (if
they are not out of date yet).

Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 



hbf wrote:
> 
> I've read at
> 
>   
> http://markmail.org/message/3247g6jj2kvclmaw?q=list:org.apache.wicket.users+DefaultAbstractTree
> 
> that DefaultAbstractTree will be deprecated in the future. Is this
> still the plan?
> 
> I am using it to get a tree with folder icons, which none of the
> core subclasses of BaseTree does directly.
> 
> Thanks,
> Kaspar
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DefaultAbstractTree-or-BaseTree--tp18025217p18085546.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PageableListView and Detachable Models

2008-06-24 Thread Matthew Young
>implement your own List interface

Just in case if anyone not aware of, you only need to implement the size()
and get(int index) methods of the List interface, everything else can just
be unsupported.

On Mon, Jun 23, 2008 at 2:21 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> well, thats part of the problem with listview :)
>
> see idataprovider and dataview
>
> if you do want to use listview then you have to implement your own
> List interface that loads windows of data at a time depending on which
> get(index) is used.
>
> -igor
>
> On Mon, Jun 23, 2008 at 2:16 PM, Jürgen Lind <[EMAIL PROTECTED]>
> wrote:
> > Ok, but since I pass the model into the constructor of the listview, how
> > is the model informed which part of the data to load? Is there a method
> > that I have been missing?
> >
> > J.
> >
> > Igor Vaynberg wrote:
> >>
> >> the model can be aware that it is used by the listview. the separation
> >> here is that the listview is unaware of where or how its list is
> >> built.
> >>
> >> for database stuff i prefer using dataview, it has database semantics
> >> more closely built into it.
> >>
> >> -igor
> >>
> >> On Mon, Jun 23, 2008 at 1:55 PM, Jürgen Lind <[EMAIL PROTECTED]>
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I am still a bit confused about one thing in the remark below: how can
> >>> the model of the list view return the required items? Should not the
> >>> model
> >>> be unaware that it is used by a list view?
> >>>
> >>> J.
> >>>
> > in that case store the list of ids in your resultset as
> > a property of the page. the model of the listview can then retrieve
> > the subset of this list (based on the current page and number of
> items
> > needed) and do a select from foo where id in ( subset of id list )
> > query to retrieve the current window of data.
> >>>
> >>> --
> >>> Dr. Jürgen Lind
> >>> iteratec GmbHFon: +49 (0)89 614551-44
> >>> Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
> >>> 82008 Unterhaching   Web: www.iteratec.de
> >>>
> >>> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
> >>> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf
> Menzel
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> > --
> > Mit freundlichen Grüßen,
> >
> > Jürgen Lind
> >
> > --
> > Dr. Jürgen Lind
> > iteratec GmbHFon: +49 (0)89 614551-44
> > Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
> > 82008 Unterhaching   Web: www.iteratec.de
> >
> > Sitz und Registergericht der iteratec GmbH: München HRB 113 519
> > Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Antwort: Re: Including wicket in JSPs?

2008-06-24 Thread Daniel Frisk
Perhaps you can use object as a drop in replacement of iframe? I  
haven't tested it in different web browsers so no guarantees from me :-)


http://java.net"; type="text/html">

// Daniel Frisk
jalbum.net


On 2008-06-24, at 08:37, [EMAIL PROTECTED] wrote:


Hi Jim,

thank you for your suggestion, but we use XHTML 1.0 Strict, so we  
can't

use IFrames.

Jan

jnorris <[EMAIL PROTECTED]> schrieb am 23.06.2008 18:26:27:



Hi Jan,

I have a legacy home-grown jsp application where I'm showing wicket

pages in
the content area using an inframe tag.  Initially I had a problem  
that

turned out to be caused by not using the closing tag for the iframe.

Here's

an example that works in IE6/7:


  
 iframe{ float:left; height:500px; width:100%; display:block;
frameborder:0;}
  



  
  
  http://someserver/WicketDemoPage?someparm=somevalue";
frameborder="0">
  
  


This technique works for me with bookmarkable pages, so in the above

case

the following would be put in the init() method of the Application

class:

mountBookmarkablePage( "/WicketDemoPage", WicketDemoPage.class );

HTH,
Jim


Jan.Koops wrote:


Hello !

We are using a JSP-based content management system for navigation,

page

layout etc.
Now we're evaluating Wicket as our "application" framework: A Wicket
application should appear in the center of the JSP based layout and
navigation.
Has somebody already included a wicket page via jsp:include or other

ways?
It seems to me a Page would be the wrong Wicket component to  
include,

since no body or header should be rendered.

Best regards
Jan



--
View this message in context: http://www.nabble.com/Including-
wicket-in-JSPs--tp18071635p18072855.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]