Re: Session.attach

2010-10-20 Thread Jeremy Thomerson
>
> Added: https://issues.apache.org/jira/browse/WICKET-3125
>

And now completed (for 1.5-M3)


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


Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin

Jeremy. 

Thanks a lot.

It is nice to have a hand when you need it.

Appreciate, 
Andrei.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004897.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: setEnabled based on Model

2010-10-20 Thread James Carman
Make sure you detach the model in case nobody else is doing it.

On Wed, Oct 20, 2010 at 9:01 PM, Jeremy Thomerson
 wrote:
> On Wed, Oct 20, 2010 at 7:57 PM, Andrei Razin  wrote:
>
>>
>> Sorry, I didn't clarify the reason for Reflection.
>>
>> I created the generic LinkDataColumn, and the link inside does not know
>> about the tipe of class passed into.
>> The page (or form) supplied the Model for the column and the Name like the
>> "isEditEnabled" property.
>> So, inside the LinkColumn i cannot get the property directly and it will be
>> much nicer to use PropertyModel.
>>
>> Regards,
>> Andrei.
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004867.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> So, just override isVisible and setVisible to take the IModel
>
> class LinkDataColumn extends Foo {
>
> private IModel visibility;
>
> isVisible() {
> // do null check
> return visibility.getModelObject();
> }
>
> setVisible(IModel vis) {
> visibility = vis;
> }
> }
>
> Done and done.
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>

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



Re: setEnabled based on Model

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 7:57 PM, Andrei Razin  wrote:

>
> Sorry, I didn't clarify the reason for Reflection.
>
> I created the generic LinkDataColumn, and the link inside does not know
> about the tipe of class passed into.
> The page (or form) supplied the Model for the column and the Name like the
> "isEditEnabled" property.
> So, inside the LinkColumn i cannot get the property directly and it will be
> much nicer to use PropertyModel.
>
> Regards,
> Andrei.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004867.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
So, just override isVisible and setVisible to take the IModel

class LinkDataColumn extends Foo {

private IModel visibility;

isVisible() {
// do null check
return visibility.getModelObject();
}

setVisible(IModel vis) {
visibility = vis;
}
}

Done and done.

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


Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin

Sorry, I didn't clarify the reason for Reflection.

I created the generic LinkDataColumn, and the link inside does not know
about the tipe of class passed into.
The page (or form) supplied the Model for the column and the Name like the
"isEditEnabled" property.
So, inside the LinkColumn i cannot get the property directly and it will be
much nicer to use PropertyModel.

Regards, 
Andrei.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004867.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin

Thanks a lot for the advice.
I just implemented it - works.
I am still on version 1.4.7, so, couldn't use onConfigure.
anyway, here is the code:

@Override
public boolean isEnabled(){


Object obj = model.getObject();
return Boolean.parseBoolean(BeanUtils.getProperty(obj,
enabledPropertyName));
.

}


I had to use reflections (Apache commons BeanUtils).
I am Happy with this, but may be, for the future the setters may take the
PropertyModel as an argument. It will be more consistent and nicer (or I may
be wrong).

So, it may be something like:

element.setEnabled(new PropertyModel(iModel, "enabled"));


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004864.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Long running task with download

2010-10-20 Thread Martin Zardecki

Yeah, I close the modal window first and this works on Safari but still gives
the message on Firefox.

Go figure.

Thanks again.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Long-running-task-with-download-tp3003232p3004771.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Session.attach

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 4:39 PM, Igor Vaynberg wrote:

> we started doing that in 1.5. egg see
> RequestCycle#register(detachCallback). add an rfe for something like
> irequestlistener { onbegin()/onend()}
>
> -igor
>
> On Wed, Oct 20, 2010 at 2:31 PM, James Carman
>  wrote:
> > Is there any chance, since we can break the API a bit, that we can try
> > to introduce a more "listenery" method for stuff like this, rather
> > than overriding methods?  Developing frameworks for Wicket is
> > difficult because in order to use these "hooks" you have to have your
> > custom code installed (such as a request cycle, session, etc.).  What
> > if other frameworks want to do the same thing?  They can't live in the
> > same webapp.  It would be great if we could just register a listener
> > for these kinds of things.
> >
>

Added: https://issues.apache.org/jira/browse/WICKET-3125

James / Igor: any other
places you can think of off the top of your head where this pattern would be
useful?


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


Re: TextField submit via Ajax

2010-10-20 Thread Altuğ Bilgin Altıntaş
Hi Martin;

It works thanks; but my condition needs "onkeydown" anyway  now i am posting
the complete solution for others

Code goal : user enters some char in textfield and press enter, and data
comes via ajax.

final TextField txtMy= new TextField("txtMy", new Model(""))
;
txtMy.add(new AjaxFormComponentUpdatingBehavior("onkeydown") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
//...
}

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
private static final long serialVersionUID = 1L;

@Override
public CharSequence decorateScript(CharSequence script)
{
return "if(wicketKeyCode(event) == 13){" + script +
" return false;}";
}
};
}
;
});

Altug.

2010/10/19 Martin Grigorov 

> 1. you need AjaxFormSubmitBehavior("onkeyup")
> 2. you'll have to add AjaxCallDecorator to it do fire only when the key is
> ENTER, i.e. event.keyCode === 13
>
> 2010/10/19 Altuğ Bilgin Altıntaş 
>
> > Hi;
> >
> > How can i submit a form via Ajax when user hit the enter key on a
> TextField
> > ?
> >
> > I did below but it doesn't work.
> >
> > myTextField.add(new AjaxFormComponentUpdatingBehavior("onsubmit") {
> >@Override
> >protected void onUpdate(AjaxRequestTarget target) {
> >   //...
> >
> >}
> >
> >  });
> >
> > Thanks.
> >
>


Re: Session.attach

2010-10-20 Thread Igor Vaynberg
we started doing that in 1.5. egg see
RequestCycle#register(detachCallback). add an rfe for something like
irequestlistener { onbegin()/onend()}

-igor

On Wed, Oct 20, 2010 at 2:31 PM, James Carman
 wrote:
> Is there any chance, since we can break the API a bit, that we can try
> to introduce a more "listenery" method for stuff like this, rather
> than overriding methods?  Developing frameworks for Wicket is
> difficult because in order to use these "hooks" you have to have your
> custom code installed (such as a request cycle, session, etc.).  What
> if other frameworks want to do the same thing?  They can't live in the
> same webapp.  It would be great if we could just register a listener
> for these kinds of things.
>
> On Wed, Oct 20, 2010 at 2:45 PM, Jeremy Thomerson
>  wrote:
>> On Wed, Oct 20, 2010 at 1:44 PM, jowen.gsb  wrote:
>>
>>>
>>> Since Session.attach() is deprecated, where would the best place be to put
>>> code instead? The current use case is to check that a user has not been
>>> deleted/disabled between request cycles.
>>>
>>>        /**
>>>         * Any attach logic for session subclasses. Called when a session is
>>> set
>>> for the thread.
>>>         *
>>>         * @deprecated will not be available in 1.5+
>>>         */
>>>       �...@deprecated
>>>        protected void attach()
>>>        {
>>>        }
>>>
>>> --
>>> View this message in context:
>>> http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004389.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>> RequestCycle#onBeginRequest?
>>
>> --
>> Jeremy Thomerson
>> http://wickettraining.com
>> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Session.attach

2010-10-20 Thread James Carman
Is there any chance, since we can break the API a bit, that we can try
to introduce a more "listenery" method for stuff like this, rather
than overriding methods?  Developing frameworks for Wicket is
difficult because in order to use these "hooks" you have to have your
custom code installed (such as a request cycle, session, etc.).  What
if other frameworks want to do the same thing?  They can't live in the
same webapp.  It would be great if we could just register a listener
for these kinds of things.

On Wed, Oct 20, 2010 at 2:45 PM, Jeremy Thomerson
 wrote:
> On Wed, Oct 20, 2010 at 1:44 PM, jowen.gsb  wrote:
>
>>
>> Since Session.attach() is deprecated, where would the best place be to put
>> code instead? The current use case is to check that a user has not been
>> deleted/disabled between request cycles.
>>
>>        /**
>>         * Any attach logic for session subclasses. Called when a session is
>> set
>> for the thread.
>>         *
>>         * @deprecated will not be available in 1.5+
>>         */
>>       �...@deprecated
>>        protected void attach()
>>        {
>>        }
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004389.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> RequestCycle#onBeginRequest?
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>

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



Re: wicket 1.4.12 cannot cast to org.apache.wicket.protocol.http.WebApplication

2010-10-20 Thread cablepuff

Thanks anyways, i found out my problem has nothing to do with wicket at all
but rather my tomcat class loader and other related stuff. 

I had to move slf4j , log4j jar file out of standard webapp during
deployment and put them in tomcat/lib folder. 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-1-4-12-cannot-cast-to-org-apache-wicket-protocol-http-WebApplication-tp2965438p3004617.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Unicode data on the clipboard - not a supported DataFlavor

2010-10-20 Thread James Carman
How are you expecting a web user to get stuff onto the server clipboard?

On Wed, Oct 20, 2010 at 2:18 PM, duncan787  wrote:
>
> My Wicket app needs to read the plain-text contents of the clipboard, but
> Transferable.getTransferDataFlavors() is returning empty.
>
> The really weird thing is that when I run the Wicket app in DEBUG mode, a
> valid DataFlavor is returned and everything works!  Here is a pared down
> source code listing:
>
> Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
> Transferable contents = clipboard.getContents(null);
> int count = contents.getTransferDataFlavors().length;
>
> count is 0 in DEBUG mode and is > 0 in non-DEBUG mode (I tried it in
> Wicket's  DEVELOPMENT and DEPLOYMENT modes, both fail).
>
> Thoughts?
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Unicode-data-on-the-clipboard-not-a-supported-DataFlavor-tp3004359p3004359.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



updating header scripts by ajax

2010-10-20 Thread fachhoch

I have a table which has panel  in each row  I am adding to each panel 
CometdBehavior  which adds lots  of scripts in the page header,this table
also has ajax pagination,so when I move to the second page the table data is
refreshed so each new panel which gets created for each row also gets the
CometdBehavior  which means new scripts , and this  new scripts  should
replace the old scripts in header , but this is not happening and my cometd
application is failing ,please tell me   how to update the scripts in
header?  


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/updating-header-scripts-by-ajax-tp3004483p3004483.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Session.attach

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 1:44 PM, jowen.gsb  wrote:

>
> Since Session.attach() is deprecated, where would the best place be to put
> code instead? The current use case is to check that a user has not been
> deleted/disabled between request cycles.
>
>/**
> * Any attach logic for session subclasses. Called when a session is
> set
> for the thread.
> *
> * @deprecated will not be available in 1.5+
> */
>@Deprecated
>protected void attach()
>{
>}
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004389.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
RequestCycle#onBeginRequest?

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


Session.attach

2010-10-20 Thread jowen.gsb

Since Session.attach() is deprecated, where would the best place be to put
code instead? The current use case is to check that a user has not been
deleted/disabled between request cycles.

/**
 * Any attach logic for session subclasses. Called when a session is set
for the thread.
 * 
 * @deprecated will not be available in 1.5+
 */
@Deprecated
protected void attach()
{
}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004389.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Unicode data on the clipboard - not a supported DataFlavor

2010-10-20 Thread duncan787

My Wicket app needs to read the plain-text contents of the clipboard, but
Transferable.getTransferDataFlavors() is returning empty.

The really weird thing is that when I run the Wicket app in DEBUG mode, a
valid DataFlavor is returned and everything works!  Here is a pared down
source code listing:

Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable contents = clipboard.getContents(null);
int count = contents.getTransferDataFlavors().length;

count is 0 in DEBUG mode and is > 0 in non-DEBUG mode (I tried it in
Wicket's  DEVELOPMENT and DEPLOYMENT modes, both fail).

Thoughts?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unicode-data-on-the-clipboard-not-a-supported-DataFlavor-tp3004359p3004359.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin

Thanks a lot
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004356.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: wicket push (comentd) and ajaxlazyloadingpanel

2010-10-20 Thread fachhoch

my case I have a table with ajax pagination , this is in a page.

each row in table has a panel to  which  I added comet  behaviour.

now when user clicks on second page I refresh this table showing the new set
of records .

Now if some  user sends  a message to a component which was in page one   I
am getting component not found exception, invalid url exception .


WicketMessage: org.apache.wicket.WicketRuntimeException: component
dataTableContainer:form:dataTable:dataTable:body:rows:16:cells:5:cell:programsContainer:programs:1:programContainer:status
not found on page gov.hhs.acf.web.pages.common.inbox.InboxPage[id = 2],
listener interface = [RequestListenerInterface
name=IActivePageBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
Root cause:
org.apache.wicket.WicketRuntimeException: component
dataTableContainer:form:dataTable:dataTable:body:rows:16:cells:5:cell:programsContainer:programs:1:programContainer:status
not found on page gov.hhs.acf.web.pages.common.inbox.InboxPage[id = 2],
listener interface = [RequestListenerInterface
name=IActivePageBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
 at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
 at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
 at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
 at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
 at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
 at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
 at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
 at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
 at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
 at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
 at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
 at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
 at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
 at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
 at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
 at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
 at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
 at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Complete stack:
org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: component
dataTableContainer:form:dataTable:dataTable:body:rows:16:cells:5:cell:programsContainer:programs:1:programContainer:status
not found on page gov.hhs.acf.web.pages.common.inbox.InboxPage[id = 2],
listener interface = [RequestListenerInterface
name=IActivePageBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-push-comentd-and-ajaxlazyloadingpanel-tp3002727p3004355.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
F

Re: Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 12:54 PM, Arjun Dhar  wrote:

> @Jeremy : my bad then.
>
> I've never seen the id's come on their own unless I do setmarkupId(true)
>

As Igor pitched in, yes, it will only change *if* you (or something else
like any ajax behavior) calls setOutputMarkupId(true)... which the original
poster obviously must be if he's seeing his ID change.

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


Re: Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread Arjun Dhar

@Jeremy : my bad then. 

I've never seen the id's come on their own unless I do setmarkupId(true)  or
add it by SimpleAttributeModifier() or tag.put("id", ...) in
onComponent(Tag). I guess i need to check it out again.

thanks.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-JavaScript-to-check-a-field-by-id-when-Wicket-will-change-the-id-tp3004266p3004324.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: setEnabled based on Model

2010-10-20 Thread Igor Vaynberg
or better yet, override onconfigure() and call setvisible/enabled from there

-igor

On Wed, Oct 20, 2010 at 10:04 AM, Jeremy Thomerson
 wrote:
> On Wed, Oct 20, 2010 at 12:00 PM, Andrei Razin wrote:
>
>>
>> Sorry for the Type:
>>
>> I meant:
>> My problem is: "setEnabled" does not take iModel as argumet.
>> I'd like to do something like setEnabled(new PropertyModel(doc,
>> "canDelete")
>>
>
> override isVisible instead:
>
> @Override
> public boolean isVisible() {
>  return getModelObject().canDelete();
> }
>
> remember that if you reference doc directly in your isVisible method, it
> will be serialized, so it's better to give the component a
> loadabledetachablemodel and reference it through the model object as shown
> (depending on what doc is - I'm assuming you won't want it serialized, but
> you may not care depending on where this is).
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>

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



Re: Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread Igor Vaynberg
only if you or something else calls setoutputmarkupid(true)

-igor

On Wed, Oct 20, 2010 at 10:30 AM, Jeremy Thomerson
 wrote:
> On Wed, Oct 20, 2010 at 12:26 PM, Arjun Dhar  wrote:
>
>> In my opinion; wicket doesn't mess with the "id" attribute till you tell it
>> to. There are multiple means to change the id. but by default the id is not
>> touched.
>>
>> Note: wicket:id is not the same as "id" of the HTML DOM element. So if you
>> define an "id" in the markup it should stick.
>>
>> As per your quote::
>> "because if the field is controlled by Wicket, the id will change. " -- You
>> can choose what attributes are controlled by wicket. its not like an all or
>> nothing scenario.
>>
>
> Actually, Wicket really does change your markup ID by default.  Try adding a
> field to the page like 'new Label("name", someModel)' and you will end up
> with  or something like that, depending on
> other components on the page, if it's in a repeater, etc.
>
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>

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



Re: Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 12:26 PM, Arjun Dhar  wrote:

> In my opinion; wicket doesn't mess with the "id" attribute till you tell it
> to. There are multiple means to change the id. but by default the id is not
> touched.
>
> Note: wicket:id is not the same as "id" of the HTML DOM element. So if you
> define an "id" in the markup it should stick.
>
> As per your quote::
> "because if the field is controlled by Wicket, the id will change. " -- You
> can choose what attributes are controlled by wicket. its not like an all or
> nothing scenario.
>

Actually, Wicket really does change your markup ID by default.  Try adding a
field to the page like 'new Label("name", someModel)' and you will end up
with  or something like that, depending on
other components on the page, if it's in a repeater, etc.


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


Re: Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread Arjun Dhar

In my opinion; wicket doesn't mess with the "id" attribute till you tell it
to. There are multiple means to change the id. but by default the id is not
touched.

Note: wicket:id is not the same as "id" of the HTML DOM element. So if you
define an "id" in the markup it should stick.

As per your quote::
"because if the field is controlled by Wicket, the id will change. " -- You
can choose what attributes are controlled by wicket. its not like an all or
nothing scenario.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-JavaScript-to-check-a-field-by-id-when-Wicket-will-change-the-id-tp3004266p3004281.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Long running task with download

2010-10-20 Thread Ernesto Reinaldo Barreiro
try closing the modal window first: this is the source of the navigate
away message (I guess),

Ernesto

On Wed, Oct 20, 2010 at 5:18 PM, Martin Zardecki  wrote:
>
> I had the whole zip + download working from a simple link but building the
> zip file could take a while and without feedback the user might try
> refreshing the screen or something stupid which is why I wanted to have a
> progress status update.
>
> Using that AjaxDownload behavior fixed my issue and it works now, I guess I
> needed to create another request/response for the download to workI
> couldn't just start the download inside an AjaxButton.onSubmit method.
>
> The only downside is on some browsers it asks "Are you sure you want to
> navigate away from this page" due to the redirect in the AjaxDownload
> behavior.
>
> Thanks.
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Long-running-task-with-download-tp3003232p3004093.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 12:14 PM, drf  wrote:

>
> In our application, we want to do the following:
> 1) Keep a hidden field in a form with a specified id
> 2) At a certain point in the app,  change the value of the field (or hide
> it
> completely using setVisible(false)).
> 3) In the onClick javascript event of a link,  check either the existence
> of
> the field or it's value using document.getElementById().
>
> This way, we can determine whether or not to bring up a dialog box.
>
> But how?
> 1) We cannot use the id to get the hidden field, because if the field is
> controlled by Wicket, the id will change.
> 2) If the hidden field is not controlled by Wicket, we cannot change
> anything about it (like say setVisible(), or changing it's class attribute
> using AttributeModifier).
>
> What is the best way to do this?
>
>
Call setMarkupId("foo") on it.  Or, even better, is to include your JS as a
behavior that uses the markup ID generated by Wicket.  i.e:

hiddenField.add(new AbstractBehavior() {
  onRenderHead(IHeaderResponse resp) {
resp.addOnDomReadyJavaScript("some-script");
  }
});

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


Using JavaScript to check a field by id, when Wicket will change the id

2010-10-20 Thread drf

In our application, we want to do the following:
1) Keep a hidden field in a form with a specified id
2) At a certain point in the app,  change the value of the field (or hide it
completely using setVisible(false)).
3) In the onClick javascript event of a link,  check either the existence of
the field or it's value using document.getElementById(). 

This way, we can determine whether or not to bring up a dialog box.

But how? 
1) We cannot use the id to get the hidden field, because if the field is
controlled by Wicket, the id will change.
2) If the hidden field is not controlled by Wicket, we cannot change
anything about it (like say setVisible(), or changing it's class attribute
using AttributeModifier).

What is the best way to do this?

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-JavaScript-to-check-a-field-by-id-when-Wicket-will-change-the-id-tp3004266p3004266.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: setEnabled based on Model

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 12:00 PM, Andrei Razin wrote:

>
> Sorry for the Type:
>
> I meant:
> My problem is: "setEnabled" does not take iModel as argumet.
> I'd like to do something like setEnabled(new PropertyModel(doc,
> "canDelete")
>

override isVisible instead:

@Override
public boolean isVisible() {
  return getModelObject().canDelete();
}

remember that if you reference doc directly in your isVisible method, it
will be serialized, so it's better to give the component a
loadabledetachablemodel and reference it through the model object as shown
(depending on what doc is - I'm assuming you won't want it serialized, but
you may not care depending on where this is).

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


Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin

Sorry for the Type:

I meant:
My problem is: "setEnabled" does not take iModel as argumet. 
I'd like to do something like setEnabled(new PropertyModel(doc, "canDelete")
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004245.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: SSL Links and buttons

2010-10-20 Thread Igor Vaynberg
look at the requests and make sure that the httpsrequestcycleprocessor
is not doing a secure->unsecure redirect which would lose the form
values.

-igor

On Wed, Oct 20, 2010 at 12:05 AM, sonxurxo  wrote:
>
> Hi Igor, thank you for your response.
>
> I tried what you pointed. The action URL in the form is correctly replaced,
> since I can see it with Firebug. And even Wicket receives the request when
> pressing the submit button, but it fails on validating required fields: it
> does not receive the values, neither with theFormField.getInput() (returns
> "") nor theFormField.getDefaultModelObjectAsString() (returns null).
> Just in case it matters, I'm trying it both with Jetty (http port:9090,
> https port:8443) and with Tomcat (http port:80 -with mod_jk, https
> port:443), so I modified the onComponentTag method you post and my
> SecureForm class now looks like:
>
>
> public class SecureForm extends Form {
>
>        public SecureForm(String id) {
>                super(id);
>        }
>
>       �...@override
>        protected void onComponentTag(ComponentTag tag) {
>                super.onComponentTag(tag);
>                String action = tag.getAttribute("action");
>                action = RequestUtils.toAbsolutePath(action);
>                action = "https" + action.substring(4);
>                action = action.replace(MyApplication.get().getHttpPort(),
>                                MyApplication.get().getHttpsPort());
>                tag.put("action", action);
>        }
> }
>
>
> but that modification doesn't seem to be a problem since the action URL
> looks OK in both cases (the port number is well replaced). Debugging with
> Firebug I can see that the field values are correctly sent by POST.
> More possible important info: the form is included in a Page that is NOT
> annotated with @RequireHttps.
>
> Am I missing something? Any ideas? Thank you in advance.
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/SSL-Links-and-buttons-tp3001634p3003364.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Mount a page to root path in wicket 1.5

2010-10-20 Thread Jeremy Thomerson
>
> > By default, if you go to /, it will redirect you to wherever the class
> > returned by getHomePage() is otherwise mounted.  I think he wants to
> > maintain the / in the address bar.  Also, a bookmarkable link to your
> home
> > page class wouldn't actually link to /, but to the otherwise mounted url.
> >
>
> I also find it strange to redirect to
> /wicket/bookmarkable/com.example.MyPage after request to '/'.
> The other day we discussed it in irc with Igor and that's why we made
> possible to mount at '/'.
> In the commit message I also added an idea: remove HomePageMapper and in
> App#internalInit() always do mountPage("/", getHomePage())
> This way '/' is always '/'.
> If the user still wants to mount '/' to something else than
> App#getHomePage() then she can always add another mapper which:
>  * will be asked first because added later mapper are asked before the
> older ones with the same compat score
>  * may have a higher compat score
>
> WDYT?
>

I think that's a great idea, as long as it is easy (like you say it is) to
override that mount with a single line.

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


Re: Long running task with download

2010-10-20 Thread Martin Zardecki

I had the whole zip + download working from a simple link but building the
zip file could take a while and without feedback the user might try
refreshing the screen or something stupid which is why I wanted to have a
progress status update.

Using that AjaxDownload behavior fixed my issue and it works now, I guess I
needed to create another request/response for the download to workI
couldn't just start the download inside an AjaxButton.onSubmit method.

The only downside is on some browsers it asks "Are you sure you want to
navigate away from this page" due to the redirect in the AjaxDownload
behavior.

Thanks.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Long-running-task-with-download-tp3003232p3004093.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Mount a page to root path in wicket 1.5

2010-10-20 Thread Martin Grigorov
On Wed, Oct 20, 2010 at 5:00 PM, Jeremy Thomerson  wrote:

> On Wed, Oct 20, 2010 at 6:41 AM, James Carman  >wrote:
>
> > Shouldn't "/" always go to the home page?  Why should we have to map
> that?
> >
> >
> By default, if you go to /, it will redirect you to wherever the class
> returned by getHomePage() is otherwise mounted.  I think he wants to
> maintain the / in the address bar.  Also, a bookmarkable link to your home
> page class wouldn't actually link to /, but to the otherwise mounted url.
>

I also find it strange to redirect to
/wicket/bookmarkable/com.example.MyPage after request to '/'.
The other day we discussed it in irc with Igor and that's why we made
possible to mount at '/'.
In the commit message I also added an idea: remove HomePageMapper and in
App#internalInit() always do mountPage("/", getHomePage())
This way '/' is always '/'.
If the user still wants to mount '/' to something else than
App#getHomePage() then she can always add another mapper which:
  * will be asked first because added later mapper are asked before the
older ones with the same compat score
  * may have a higher compat score

WDYT?

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


Re: Mount a page to root path in wicket 1.5

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 6:41 AM, James Carman wrote:

> Shouldn't "/" always go to the home page?  Why should we have to map that?
>
>
By default, if you go to /, it will redirect you to wherever the class
returned by getHomePage() is otherwise mounted.  I think he wants to
maintain the / in the address bar.  Also, a bookmarkable link to your home
page class wouldn't actually link to /, but to the otherwise mounted url.

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


Re: _extend48 - ring any bells?

2010-10-20 Thread Jeremy Thomerson
On Wed, Oct 20, 2010 at 5:12 AM, Wayne W wrote:

> Hi Jeremy,
>
> > That is the id for the wicket extend tag in your markup
>
> This might be a stupid question - but can I tell where in the page
> this might be causing the problem from the _extend38? Is that the 38th
> extend for example?
> Any hints on how I can track this down?
>
>
Show us the java code for the two panels that you sent HTML for.

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


Re: SSL Links and buttons

2010-10-20 Thread sonxurxo

Thank you Melinda for your response,

I didn't try that because, even when querystring (and therefore GET
parameters are too) is secured with SSL, there are some reasons that point
that it's a bad idea (look at the first answer at
http://stackoverflow.com/questions/323200/is-a-https-query-string-secure).
Thank you anyway :)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SSL-Links-and-buttons-tp3001634p3003805.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: SSL Links and buttons

2010-10-20 Thread Melinda Dweer
Can you try using




E.M.D

On Wed, Oct 20, 2010 at 9:05 AM, sonxurxo  wrote:

>
> Hi Igor, thank you for your response.
>
> I tried what you pointed. The action URL in the form is correctly replaced,
> since I can see it with Firebug. And even Wicket receives the request when
> pressing the submit button, but it fails on validating required fields: it
> does not receive the values, neither with theFormField.getInput() (returns
> "") nor theFormField.getDefaultModelObjectAsString() (returns null).
> Just in case it matters, I'm trying it both with Jetty (http port:9090,
> https port:8443) and with Tomcat (http port:80 -with mod_jk, https
> port:443), so I modified the onComponentTag method you post and my
> SecureForm class now looks like:
>
>
> public class SecureForm extends Form {
>
>public SecureForm(String id) {
>super(id);
>}
>
>@Override
>protected void onComponentTag(ComponentTag tag) {
>super.onComponentTag(tag);
>String action = tag.getAttribute("action");
>action = RequestUtils.toAbsolutePath(action);
>action = "https" + action.substring(4);
>action = action.replace(MyApplication.get().getHttpPort(),
>MyApplication.get().getHttpsPort());
>tag.put("action", action);
>}
> }
>
>
> but that modification doesn't seem to be a problem since the action URL
> looks OK in both cases (the port number is well replaced). Debugging with
> Firebug I can see that the field values are correctly sent by POST.
> More possible important info: the form is included in a Page that is NOT
> annotated with @RequireHttps.
>
> Am I missing something? Any ideas? Thank you in advance.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/SSL-Links-and-buttons-tp3001634p3003364.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Confirmation dialog

2010-10-20 Thread drf

Do not know what my mistake is in the previous example, but this works:
return "if (test) {if (!confirm('TEXT')) return false;}" + script;
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Confirmation-dialog-tp1844404p3003762.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Mount a page to root path in wicket 1.5

2010-10-20 Thread Martin Grigorov
You don't have to map it.
HomePageMapper is pre-installed for you and it will handle '/'.
Now it is possible to register custom mapper to handle '/' and use whichever
Page you want.

Before the commit I mentioned in my previous email it wasn't possible to
mount anything at '/'.

On Wed, Oct 20, 2010 at 1:41 PM, James Carman wrote:

> Shouldn't "/" always go to the home page?  Why should we have to map that?
>
> On Wed, Oct 20, 2010 at 3:05 AM, Martin Grigorov 
> wrote:
> > Since 2 days it is possible to do: MyApp#init() { mountPage("/",
> > MyPage.class)}
> >
> > As I said you need latest trunk for that.
> >
> > Otherwise, you'll need to create your own custom mapper for that. Note:
> It
> > needs to have higher compatibilityScore than the default.
> >
> > On Wed, Oct 20, 2010 at 8:47 AM, Alex Objelean  >wrote:
> >
> >>
> >> So you suggest to create something like CustomHomeMapper in order to be
> >> able
> >> to mount a page to root?
> >> If it is true, shouldn't it be possible to have this feature out of the
> >> box?
> >> --
> >> View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003344.html
> >> Sent from the Users forum mailing list archive at Nabble.com.
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Confirmation dialog

2010-10-20 Thread drf

I am having a problem when using IAjaxDecorator as described.
In the predecorate method, I have:

return "if(test-variable) return confirm('text');" + script;

The confirm button appears, but even on clicking 'OK', it looks as if false
is getting returned every time, because the code in
onClick(AjaxRequestTarget) is not getting called.

Perhaps there is something wrong with my basic synatx, because normal
processing does not continue even after the following:
return "if (1==1) {return true;} else {return true;}" + script;

Help is truly appreciated !!!


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Confirmation-dialog-tp1844404p3003697.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Mount a page to root path in wicket 1.5

2010-10-20 Thread James Carman
Shouldn't "/" always go to the home page?  Why should we have to map that?

On Wed, Oct 20, 2010 at 3:05 AM, Martin Grigorov  wrote:
> Since 2 days it is possible to do: MyApp#init() { mountPage("/",
> MyPage.class)}
>
> As I said you need latest trunk for that.
>
> Otherwise, you'll need to create your own custom mapper for that. Note: It
> needs to have higher compatibilityScore than the default.
>
> On Wed, Oct 20, 2010 at 8:47 AM, Alex Objelean wrote:
>
>>
>> So you suggest to create something like CustomHomeMapper in order to be
>> able
>> to mount a page to root?
>> If it is true, shouldn't it be possible to have this feature out of the
>> box?
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003344.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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



Re: _extend48 - ring any bells?

2010-10-20 Thread Wayne W
Hi Jeremy,

> That is the id for the wicket extend tag in your markup

This might be a stupid question - but can I tell where in the page
this might be causing the problem from the _extend38? Is that the 38th
extend for example?
Any hints on how I can track this down?

thanks


On Tue, Oct 19, 2010 at 7:47 PM, Jeremy Thomerson
 wrote:
> That is the id for the wicket extend tag in your markup
>
> Jeremy Thomerson
> http://wickettraining.com
> -- sent from my "smart" phone, so please excuse spelling, formatting, or
> compiler errors
>
> On Oct 19, 2010 12:46 PM, "Wayne W"  wrote:
>
> Hi,
>
> I've got a problem in production whereby our application home page
> throws a :Unable to find component with id 'mainPanel' in
> [MarkupContainer [Component id = _extend48]]
>
> This only happens once or twice a week. We don't have any components
> named '_extend48' or similar anywhere in the code. Whats odd is that
> this page renders 99% of the time fine, but for the life of me I
> cannot understand how this can happen.
>
> Is the component id given a red herring? Any ideas on how I can find
> out what causes this?
>
> thanks
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: http://dev.jqueryui.com/ticket/5722#comment:3

2010-10-20 Thread Ernesto Reinaldo Barreiro
Stefan,

I have tested it with jquery 1.4.3 and 1.8.5 and work for me too. It
might be really true that they fixed this at UI level: I had no
problems with using sortables that are somehow similar to
dragabble/dropables. It might be good to test core 1.4.2 and 1.8.5 and
see if this works: that would mean they really fixed this on 1.8.5.

Thanks and regards,

Ernesto


On Wed, Oct 20, 2010 at 9:25 AM, Stefan Lindner  wrote:
> I was in doubt when I read this because I fixed the problem in jQuery 
> 1.4.2.core and not in the UI part. But in addition to ui 1.8.5 there is a new 
> core version 1.4.3. I checked both oft them together and it seems to be fixed!
> I will install a new Version of jWicket in the next few days so that everyone 
> may test it in his own project.
>
> Stefan
>
> -Ursprüngliche Nachricht-
> Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
> Gesendet: Mittwoch, 20. Oktober 2010 06:33
> An: Stefan Lindner
> Betreff: http://dev.jqueryui.com/ticket/5722#comment:3
>
> Stefan,
>
> Can you confirm this? Will do the same with wiQuery.
>
> Cheers,
>
> Ernesto
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



RE: http://dev.jqueryui.com/ticket/5722#comment:3

2010-10-20 Thread Stefan Lindner
I was in doubt when I read this because I fixed the problem in jQuery 
1.4.2.core and not in the UI part. But in addition to ui 1.8.5 there is a new 
core version 1.4.3. I checked both oft them together and it seems to be fixed!
I will install a new Version of jWicket in the next few days so that everyone 
may test it in his own project.

Stefan

-Ursprüngliche Nachricht-
Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Gesendet: Mittwoch, 20. Oktober 2010 06:33
An: Stefan Lindner
Betreff: http://dev.jqueryui.com/ticket/5722#comment:3

Stefan,

Can you confirm this? Will do the same with wiQuery.

Cheers,

Ernesto

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



Re: Sending data to a wicket form through a POST from an external site

2010-10-20 Thread Martin Makundi
Make normal stateless form and look what are the ids in the html and
then you can send same parameters via post from external site. There
is really nothing special about it.

**
Martin

2010/10/20 ali :
>
> Hi Martin,
>
> Can you please come up with any example?
>
> Thanks
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Sending-data-to-a-wicket-form-through-a-POST-from-an-external-site-tp110p3003371.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Sending data to a wicket form through a POST from an external site

2010-10-20 Thread ali

Hi Martin,

Can you please come up with any example?

Thanks
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Sending-data-to-a-wicket-form-through-a-POST-from-an-external-site-tp110p3003371.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Mount a page to root path in wicket 1.5

2010-10-20 Thread Alex Objelean

Good to know, thanks!
When a new milestone will be available?

Thanks!
Alex

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003369.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: SSL Links and buttons

2010-10-20 Thread sonxurxo

Hi Igor, thank you for your response.

I tried what you pointed. The action URL in the form is correctly replaced,
since I can see it with Firebug. And even Wicket receives the request when
pressing the submit button, but it fails on validating required fields: it
does not receive the values, neither with theFormField.getInput() (returns
"") nor theFormField.getDefaultModelObjectAsString() (returns null).
Just in case it matters, I'm trying it both with Jetty (http port:9090,
https port:8443) and with Tomcat (http port:80 -with mod_jk, https
port:443), so I modified the onComponentTag method you post and my
SecureForm class now looks like:


public class SecureForm extends Form {

public SecureForm(String id) {
super(id);
}

@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
String action = tag.getAttribute("action");
action = RequestUtils.toAbsolutePath(action);
action = "https" + action.substring(4);
action = action.replace(MyApplication.get().getHttpPort(), 
MyApplication.get().getHttpsPort());
tag.put("action", action);
}
}


but that modification doesn't seem to be a problem since the action URL
looks OK in both cases (the port number is well replaced). Debugging with
Firebug I can see that the field values are correctly sent by POST.
More possible important info: the form is included in a Page that is NOT
annotated with @RequireHttps.

Am I missing something? Any ideas? Thank you in advance.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SSL-Links-and-buttons-tp3001634p3003364.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Mount a page to root path in wicket 1.5

2010-10-20 Thread Martin Grigorov
Since 2 days it is possible to do: MyApp#init() { mountPage("/",
MyPage.class)}

As I said you need latest trunk for that.

Otherwise, you'll need to create your own custom mapper for that. Note: It
needs to have higher compatibilityScore than the default.

On Wed, Oct 20, 2010 at 8:47 AM, Alex Objelean wrote:

>
> So you suggest to create something like CustomHomeMapper in order to be
> able
> to mount a page to root?
> If it is true, shouldn't it be possible to have this feature out of the
> box?
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003344.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>