Re: AbstractAjaxBehavior::onRequest never called due to redirect url dropping the callback url

2011-12-12 Thread Martin Grigorov
Hi,

Take a look at
https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/autocomplete-tagit-parent/autocomplete-tagit
This is an integration with TagIt which is an extension of JQuery UI
Autocomplete.

On Mon, Dec 12, 2011 at 1:20 AM, Jeffrey Schwartz
jefftschwa...@gmail.comwrote:

 Summary of problem:  AbstractAjaxBehavior::onRequestMethod not called on
 redirect.

 I am using jQuery UI autocomplete. I cannot get it to work with Wicket
 1.5. The issue appears to be that the original request which includes the
 listener's address is redirected by the server (tried both Glassfish and
 Apache Tomcat) but the redirect url doesn't include the listener's address
 parameter.

 I know my jQuery UI is installed and working correctly because I created a
 simple Servlet app and the servlet is receiving the request without
 redirecting and the request includes the request params as well.

 Here's the code I am using on the server:

 add(aab2 = new AbstractAjaxBehavior() {

 // handle the ajax request
 @Override
 public void onRequest() {
 System.out.println(aab2 ajax request received);

 //RequestCycle requestCycle =
 getComponent().getRequestCycle();
 //Request request = requestCycle.getRequest();
 //IRequestParameters irp = request.getPostParameters();
 //StringValue state = irp.getParameterValue(state);
 //ListString statesLike =
 MockDb.getStatesLike(state.toString());
 //requestCycle.scheduleRequestHandlerAfterCurrent(new
 TextRequestHandler(application/json,UTF-8,convertListToJson(statesLike)));
 }
 });

 add(myScript = new Label(myScript, var callbackUrl = ' +
 aab2.getCallbackUrl() + '));
 myScript.setEscapeModelStrings(false);

 Here's the client side Javascript code:

 $('input.jqueryid_state').autocomplete({source: callbackUrl});

 My dev environment is Mac OS X Lion  Netbeans 7.0.1 if that matters. I am
 using Wicket v1.5.1.

 When running the code the server log never show the message aab2 ajax
 request received and Safari's Web Inspector dev tool reports the
 redirect along with the truncated url and the response to that is that
 Wicket renders the whole page.

 Here's what I see in Safari Web Inspector:




 As can be seen from the above images the original GET request included the
 call back url but the redirect does not.

 Am I doing something wrong and does any one have a suggestion/idea?

 Thanks in advance,
 Jeff




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Spring + MongoDb

2011-12-12 Thread Martin Grigorov
Hi,

Here is the Scala project you mention:
https://github.com/brunoborges/gamboa-project
If Scala confuses you then all you need is to find pure Java example
of Spring-Data-Mongodb and another one that uses Spring
services/repositories from Wicket (e.g. Phonebook example in
wicketstuff).

On Mon, Dec 12, 2011 at 6:18 AM, Jeff Schneller j...@mootus.com wrote:
 Has anyone implemented wicket with spring and mongodb.  I saw there was a 
 project back in June about scala, wicket, spring, and mongodb but the scala 
 portion is a bit confusing.

 Looking for a sample implementation/configuration to get going with.

 Thanks.




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



adding css class to AbstractColumn table header

2011-12-12 Thread lucast
Dear Forum,
I'm using a DefaultDataTable (structure almost identical to  clickable cell
example from chapter 5, Apache Wicket Cookbook).

I want one particular column to have a different css class to the rest.
For that reason, when extending AbstractColumnT, I add the css class to
populateItem method:

public void populateItem(ItemICellPopulatorlt;T cellItem, String
componentId, IModelT rowModel) {
cellItem.add(new SimpleAttributeModifier(class, nameOfCssClass));
...
}


That works fine for each cell but the class is not added to the column
header.
Is there a way to add a class to the column header for AbstractColumn?

Thanks in advance,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-css-class-to-AbstractColumn-table-header-tp4185280p4185280.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



Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
On the production server I received an exception. The problem is that I
cannot reproduce and I coudn't find the cause. 
Probably it must be something with browser setting, but I'm not sure. 
Has anyone an ideea which can be the cause? It says that the component is
not found, but the component is there.
This is some part of stack trace:


org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: component
inputForm:editQuoteContainer:rowPanel:repeater:1:addCombination not found on
page
com.lingo24.orderingsystem.customer.web.wicket.wos.estimator.EditQuoteDetails[id
= 1], 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)
..
..
..Caused by: org.apache.wicket.WicketRuntimeException: component
inputForm:editQuoteContainer:rowPanel:repeater:1:addCombination not found on
page
com.lingo24.orderingsystem.customer.web.wicket.wos.estimator.EditQuoteDetails[id
= 1], listener interface = [RequestListenerInterface
name=IActivePageBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4185488.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: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread Martin Grigorov
Hi,

The problem is that you have a stale link.
Initially you rendered this repeater and then you updated it in the
server side (the items inside have new ids) and you forgot to update
it in at the client side. Then the user clicks such stale link and the
server side cannot find an item with id == 0.

On Mon, Dec 12, 2011 at 11:37 AM, cosmindumy cosmind...@yahoo.com wrote:
 On the production server I received an exception. The problem is that I
 cannot reproduce and I coudn't find the cause.
 Probably it must be something with browser setting, but I'm not sure.
 Has anyone an ideea which can be the cause? It says that the component is
 not found, but the component is there.
 This is some part of stack trace:


 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.WicketRuntimeException: component
 inputForm:editQuoteContainer:rowPanel:repeater:1:addCombination not found on
 page
 com.lingo24.orderingsystem.customer.web.wicket.wos.estimator.EditQuoteDetails[id
 = 1], 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)
 ..
 ..
 ..Caused by: org.apache.wicket.WicketRuntimeException: component
 inputForm:editQuoteContainer:rowPanel:repeater:1:addCombination not found on
 page
 com.lingo24.orderingsystem.customer.web.wicket.wos.estimator.EditQuoteDetails[id
 = 1], listener interface = [RequestListenerInterface
 name=IActivePageBehaviorListener, method=public abstract void
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4185488.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: adding css class to AbstractColumn table header

2011-12-12 Thread Martin Grigorov
Hi,

You need to override
org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn.getHeader(String)
and return the component returned by super.getHeader(id) + your
attributemodifier.

On Mon, Dec 12, 2011 at 10:12 AM, lucast lucastol...@hotmail.com wrote:
 Dear Forum,
 I'm using a DefaultDataTable (structure almost identical to  clickable cell
 example from chapter 5, Apache Wicket Cookbook).

 I want one particular column to have a different css class to the rest.
 For that reason, when extending AbstractColumnT, I add the css class to
 populateItem method:

 public void populateItem(ItemICellPopulatorT cellItem, String
 componentId, IModelT rowModel) {
        cellItem.add(new SimpleAttributeModifier(class, nameOfCssClass));
 ...
 }


 That works fine for each cell but the class is not added to the column
 header.
 Is there a way to add a class to the column header for AbstractColumn?

 Thanks in advance,
 Lucas

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/adding-css-class-to-AbstractColumn-table-header-tp4185280p4185280.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Modal Window construction failure

2011-12-12 Thread Martin Grigorov
Hi,

Many of your pastes didn't make it and we don't see them.
Make sure you don't assign this component to wicket:container and
don't call .setRenderBodyOnly(true) on it.

On Fri, Dec 9, 2011 at 8:09 PM, endoplasmicR endoplasm...@gmail.com wrote:
 Hi, I have recently run into a strange issue with the ModalWindow. The
 ModalWindow contains a page set with the method setPageCreator. And from the
 wicket debug window,
 I see the following lines when constructing the modal window:


 And with a bit of debugging using firebug, I see that the scripts in
 header-contribution tag are added to the header, the script in evaluate tag
 is also added to the page. however, the component tag

 is never added to the document. And later on when I click the default close
 button of the modal window, I see the following in the debug window:
 INFO: Ajax GET stopped because of precondition check,
 url:page?3-1.IBehaviorListener.0-previewWindow
 And with the help of firebug, I see that in this part of the script :
 settings.onCloseButton = function() { var
 wcall=wicketAjaxGet('page?3-1.IBehaviorListener.0-previewWindow',function()
 { }.bind(this),function() { }.bind(this), function() {return
 Wicket.$('id18') != null;}.bind(this));return !wcall;
 the precondition check (Wicket.$('id18') != null) failed because the
 component was never added to the DOM.

 I am wondering if anyone know anything about it. Am I missing some settings
 when creating the page in modal window?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Modal-Window-construction-failure-tp4177837p4177837.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
I'm afraid I didn't understand what exactly do you mean. 
How can I reproduce this in the development machine? This doesn't happened
again. What should I update on client side?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4185720.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: Spring + MongoDb

2011-12-12 Thread Martijn Dashorst
I've written a project with the plain mongodb java driver. Not too bad
IMO. I don't think there's a need to use spring-data-mongodb.

The code is currently closed, but I aim to open up some things in the
new year. In the mean time, here's my MongoRequestCycleListener:

import org.apache.wicket.request.cycle.AbstractRequestCycleListener;
import org.apache.wicket.request.cycle.RequestCycle;

import com.mongodb.DB;

public class MongoRequestCycleListener extends AbstractRequestCycleListener
implements MongoProvider {
private static final ThreadLocalDB db = new ThreadLocalDB();

private final MongoProvider provider;

public MongoRequestCycleListener(MongoProvider provider) {
this.provider = provider;
}

@Override
public DB getDB() {
DB db = MongoRequestCycleListener.db.get();
assert db != null;
return db;
}

@Override
public void onBeginRequest(RequestCycle cycle) {
DB threadLocalDB = provider.getDB();
threadLocalDB.requestStart();
db.set(threadLocalDB);
}

@Override
public void onEndRequest(RequestCycle cycle) {
DB db2 = db.get();
if (db2 != null) {
db2.requestDone();
db.remove();
}
}
}

and the MongoProvider interface:

import com.mongodb.DB;

public interface MongoProvider {
public DB getDB();
}

Now all you need to do is inject a mongo provider into your services
and you can get the DB. For example:

public ListUser byName(String name) {
DBCollection users = provider.getDB().getCollection(Users);
DBObject result = users.find(new BasicDBObject(name, name));
// ... convert result in list of users.
return convertedList;
}

In onBeginRequest() I start a 'mongo transaction' and in onEndRequest
I close that transaction. It is not a transaction in the common SQL
world sense, but should suffice.

Martijn

On Mon, Dec 12, 2011 at 6:18 AM, Jeff Schneller j...@mootus.com wrote:
 Has anyone implemented wicket with spring and mongodb.  I saw there was a 
 project back in June about scala, wicket, spring, and mongodb but the scala 
 portion is a bit confusing.

 Looking for a sample implementation/configuration to get going with.

 Thanks.




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Repainting only newly-created repeater items via ajax

2011-12-12 Thread Arjun Dhar
Hi,
with reference to the blog/article:
http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/

I have Code:


...the trouble is that the above allows me to ADD one record, but on the
second it naturally complains authorizationDetails is already pard of
'authorizationListView'.

If I try to make the authorizationListView dynamic it complains. In the
example, the author has used a RepeaterView, .. here its a ListView and I
cant get the items next Child Id (.. or Can I)?

...The issue here seems to be what value can I put in th Fragment so that it
allows me to ADD more than one row via Ajax!

thanks



-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repainting-only-newly-created-repeater-items-via-ajax-tp4186028p4186028.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: Repainting only newly-created repeater items via ajax

2011-12-12 Thread vineet semwal
repeatingview is actually the better choice for that ..

for listview ,you can write a method which adds the new item to list
view,you need to provide the index in that case

method should add new ListItemT(index, itemModel)
you can also iterate the children to see if the index isnt repeated
before adding..


On Mon, Dec 12, 2011 at 7:18 PM, Arjun Dhar dhar...@yahoo.com wrote:
 Hi,
 with reference to the blog/article:
 http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/

 I have Code:


 ...the trouble is that the above allows me to ADD one record, but on the
 second it naturally complains authorizationDetails is already pard of
 'authorizationListView'.

 If I try to make the authorizationListView dynamic it complains. In the
 example, the author has used a RepeaterView, .. here its a ListView and I
 cant get the items next Child Id (.. or Can I)?

 ...The issue here seems to be what value can I put in th Fragment so that it
 allows me to ADD more than one row via Ajax!

 thanks



 -
 Software documentation is like sex: when it is good, it is very, very good; 
 and when it is bad, it is still better than nothing!
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Repainting-only-newly-created-repeater-items-via-ajax-tp4186028p4186028.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




-- 
thank you,

regards,
Vineet Semwal

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



Re: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
Thanks for your idea. 
I manages to reproduce the error. It happens extremely rare. Here is the
situation. 
I have a AjaxSubmitLink that make an action. To prevent multiple submit, I
use a AjaxCallDecorate that calls a javascript that shows a loading image
over the whole form, so that the form is inaccessible. After the submit is
finished, on decorateOnSucces or decorateOnFailure the image is again hidden
and the form is again available. 
I think that the problem is when the user click on the link right after the
form is available again but the ajaxsubmitlink is not yet updated. 
How can I tell to javascript to wait just a little more before it hides
again the loading image? 
I hope is clear what I said.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4186262.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: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
I put a setTimeout(..). I hope this will solve the problem. I didn't get this
error after puting setTimeout().
Thanks for your response.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4186446.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: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
Actually it didn't work. I put setTimeout(..). to delay the hiding of loading
image but I still got the exception sometimes. 
Do you have any other ideea?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4186479.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: Repainting only newly-created repeater items via ajax

2011-12-12 Thread vineet semwal
just checked out your code in nabble,it didnt get through in mail

authorizationdetail should be added to listitem in the button and
listitem shouldbe added to listview in button
listitem id should be the new unique index

On Mon, Dec 12, 2011 at 8:03 PM, vineet semwal
vineetsemwal1...@gmail.com wrote:
 repeatingview is actually the better choice for that ..

 for listview ,you can write a method which adds the new item to list
 view,you need to provide the index in that case

 method should add new ListItemT(index, itemModel)
 you can also iterate the children to see if the index isnt repeated
 before adding..


 On Mon, Dec 12, 2011 at 7:18 PM, Arjun Dhar dhar...@yahoo.com wrote:
 Hi,
 with reference to the blog/article:
 http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/

 I have Code:


 ...the trouble is that the above allows me to ADD one record, but on the
 second it naturally complains authorizationDetails is already pard of
 'authorizationListView'.

 If I try to make the authorizationListView dynamic it complains. In the
 example, the author has used a RepeaterView, .. here its a ListView and I
 cant get the items next Child Id (.. or Can I)?

 ...The issue here seems to be what value can I put in th Fragment so that it
 allows me to ADD more than one row via Ajax!

 thanks



 -
 Software documentation is like sex: when it is good, it is very, very good; 
 and when it is bad, it is still better than nothing!
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Repainting-only-newly-created-repeater-items-via-ajax-tp4186028p4186028.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




 --
 thank you,

 regards,
 Vineet Semwal



-- 
thank you,

regards,
Vineet Semwal

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



Re: abstract column property column

2011-12-12 Thread Sven Meier
PropertyColumn populates the table cell with a label for a property of 
the row object, see:


PropertyColumn#populateItem()

AbstractColumn handles the header only.

Sven

Am 12.12.2011 17:26, schrieb ridaa:

Hi ...
can anyone tell me the difference between abstract column  property column
for constructing a datatable

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/abstract-column-property-column-tp4186596p4186596.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



Tabbed Panel title not getting updated

2011-12-12 Thread sudeivas
Hello,
I am using Tabbed Panel to display the list. Below is my code,

 for(final Category category : Category.values()) { 
   .
   .
   .
tabs.add(new AbstractTab(new ModelString(){
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
LOGGER.info(category.getValue());
return category.getValue() +  -
(+rightPLW.getProblemsCount()+);
}}) {
private static final long serialVersionUID = 1L;

@Override
public WebMarkupContainer getPanel(String panelId) {
return new DoublePanel(panelId, leftPanel, rightPanel);
}
}); 
}
add(new AjaxTabbedPanel(problem-panels,
tabs).setOutputMarkupId(true));

For now there are 4 categories and so tabs are displayed. But when there is
some changes in any of these tabs, I need to update all title of each of
these tabs. But for some reason only the title of the current tab is getting
updated. My requirement is to update all the tabs when some thing happens in
the page or in any of these lists. 

Please help.

Thanks,
Suresh


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tabbed-Panel-title-not-getting-updated-tp4186714p4186714.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



Ajax file upload

2011-12-12 Thread Bertrand Guay-Paquet

Hello,

I want to implement the functionality provided by Wicket's JIRA for 
attaching images to an issue.


Essentially, when a file name is selected, it is uploaded via ajax and 
the form submit button is disabled while uploading takes place. When the 
upload is complete, an image thumbnail is updated and the submit button 
is re-enabled.


I know how to generate a thumbnail of an image, so don't answer that 
part. Also, disabling and enabling the button is an easy task. I 
struggle with the file uploading part...


I tried simply adding a AjaxFormComponentUpdatingBehavior(onchange) to 
my FileUploadField but all I get using that is the feedback message 
Field 'file' is required.


Any ideas?

Thanks,
Bertrand

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



Re: Modal Window construction failure

2011-12-12 Thread endoplasmicR
Hi, thanks for the reply. I am re-posting the Log in case you still can not
see it: 
I see the following lines when constructing the modal window:

INFO:

This component, which was part of the request above, was never added to the
document:
component id=id18  div id=id18 style=display:none
div id=id19
/div
/div  /componentevaluate

I believe the component missing is generated by Wicket for modal window
since it's not defined in the source code, andI am using Wicket 1.5.3.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-Window-construction-failure-tp4177837p4187107.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Ajax file upload

2011-12-12 Thread Martin Grigorov
Hi,

I think this feature works only on new browsers, HTML5 ones.
See wicketstuff html5 project. There is an integration with the new
File API, part of HTML5

On Mon, Dec 12, 2011 at 7:38 PM, Bertrand Guay-Paquet
ber...@step.polymtl.ca wrote:
 Hello,

 I want to implement the functionality provided by Wicket's JIRA for
 attaching images to an issue.

 Essentially, when a file name is selected, it is uploaded via ajax and the
 form submit button is disabled while uploading takes place. When the upload
 is complete, an image thumbnail is updated and the submit button is
 re-enabled.

 I know how to generate a thumbnail of an image, so don't answer that part.
 Also, disabling and enabling the button is an easy task. I struggle with the
 file uploading part...

 I tried simply adding a AjaxFormComponentUpdatingBehavior(onchange) to my
 FileUploadField but all I get using that is the feedback message Field
 'file' is required.

 Any ideas?

 Thanks,
 Bertrand

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Ajax file upload

2011-12-12 Thread Dan Retzlaff
We use an inexpensive commercial product called Plupload to achieve the
effect you describe. http://www.plupload.com/

A mounted Wicket resource receives the uploads. It does quite well, though
not so well that testing in your target browsers isn't necessary. :)

On Mon, Dec 12, 2011 at 11:02 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 I think this feature works only on new browsers, HTML5 ones.
 See wicketstuff html5 project. There is an integration with the new
 File API, part of HTML5

 On Mon, Dec 12, 2011 at 7:38 PM, Bertrand Guay-Paquet
 ber...@step.polymtl.ca wrote:
  Hello,
 
  I want to implement the functionality provided by Wicket's JIRA for
  attaching images to an issue.
 
  Essentially, when a file name is selected, it is uploaded via ajax and
 the
  form submit button is disabled while uploading takes place. When the
 upload
  is complete, an image thumbnail is updated and the submit button is
  re-enabled.
 
  I know how to generate a thumbnail of an image, so don't answer that
 part.
  Also, disabling and enabling the button is an easy task. I struggle with
 the
  file uploading part...
 
  I tried simply adding a AjaxFormComponentUpdatingBehavior(onchange) to
 my
  FileUploadField but all I get using that is the feedback message Field
  'file' is required.
 
  Any ideas?
 
  Thanks,
  Bertrand
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: Ajax file upload

2011-12-12 Thread Bertrand Guay-Paquet

Thanks for your reply.

I tried with IE 7 (no html 5, at least I think) and the ajax file upload 
works fine. The only part missing is the picture thumbnail preview of 
the uploaded image.



On 12/12/2011 2:02 PM, Martin Grigorov wrote:

Hi,

I think this feature works only on new browsers, HTML5 ones.
See wicketstuff html5 project. There is an integration with the new
File API, part of HTML5

On Mon, Dec 12, 2011 at 7:38 PM, Bertrand Guay-Paquet
ber...@step.polymtl.ca  wrote:

Hello,

I want to implement the functionality provided by Wicket's JIRA for
attaching images to an issue.

Essentially, when a file name is selected, it is uploaded via ajax and the
form submit button is disabled while uploading takes place. When the upload
is complete, an image thumbnail is updated and the submit button is
re-enabled.

I know how to generate a thumbnail of an image, so don't answer that part.
Also, disabling and enabling the button is an easy task. I struggle with the
file uploading part...

I tried simply adding a AjaxFormComponentUpdatingBehavior(onchange) to my
FileUploadField but all I get using that is the feedback message Field
'file' is required.

Any ideas?

Thanks,
Bertrand

-
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: Ajax file upload

2011-12-12 Thread Bertrand Guay-Paquet
Thanks for your suggestion Dan. I'd rather avoid yet another 3rd part 
dependency but if no better option exists, I'll have a look.


Regards,
Bertrand

On 12/12/2011 2:31 PM, Dan Retzlaff wrote:

We use an inexpensive commercial product called Plupload to achieve the
effect you describe. http://www.plupload.com/

A mounted Wicket resource receives the uploads. It does quite well, though
not so well that testing in your target browsers isn't necessary. :)

On Mon, Dec 12, 2011 at 11:02 AM, Martin Grigorovmgrigo...@apache.orgwrote:


Hi,

I think this feature works only on new browsers, HTML5 ones.
See wicketstuff html5 project. There is an integration with the new
File API, part of HTML5

On Mon, Dec 12, 2011 at 7:38 PM, Bertrand Guay-Paquet
ber...@step.polymtl.ca  wrote:

Hello,

I want to implement the functionality provided by Wicket's JIRA for
attaching images to an issue.

Essentially, when a file name is selected, it is uploaded via ajax and

the

form submit button is disabled while uploading takes place. When the

upload

is complete, an image thumbnail is updated and the submit button is
re-enabled.

I know how to generate a thumbnail of an image, so don't answer that

part.

Also, disabling and enabling the button is an easy task. I struggle with

the

file uploading part...

I tried simply adding a AjaxFormComponentUpdatingBehavior(onchange) to

my

FileUploadField but all I get using that is the feedback message Field
'file' is required.

Any ideas?

Thanks,
Bertrand

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




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.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: Ajax file upload

2011-12-12 Thread Bertrand Guay-Paquet

This is actually quite easy to do after all! (Wicket 1.5.3)

I simply added an AjaxFormSubmitBehavior to my FileUploadField like so:

file.add(new AjaxFormSubmitBehavior(form, onchange) {

@Override
protected void onSubmit(AjaxRequestTarget target) {
// update image resource
updateImage();
// refresh image via ajax
target.add(image);
}

@Override
protected void onError(AjaxRequestTarget target) {
}
});

Cheers,
Bertrand

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



When to use setRenderBodyOnly(true) ?

2011-12-12 Thread sudeivas
Hello,
  I am using deployment configuration in my web.xml. But if I remove
setRenderBodyOnly(true) for some of the containers and components, then I am
getting some issues with CSS styles. 

Does it really make sense to use setRenderBodyOnly(true) when I am in
deployment mode already?

I am not sure when to use setRenderBodyOnly(true) and when not to? 

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187518.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread Bertrand Guay-Paquet

Hi,

With the following markup:
li wicket:id=itemspan wicket:id=contentContent/span/li

using setRenderBodyOnly(true) on the span element would yield something 
like :

liThe Content/li

Besides having to match a specific markup structure, I am not sure when 
and why this should be used. Maybe for cleaner markup?


Bertrand

On 12/12/2011 3:39 PM, sudeivas wrote:

Hello,
   I am using deployment configuration in my web.xml. But if I remove
setRenderBodyOnly(true) for some of the containers and components, then I am
getting some issues with CSS styles.

Does it really make sense to use setRenderBodyOnly(true) when I am in
deployment mode already?

I am not sure when to use setRenderBodyOnly(true) and when not to?

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187518.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread sudeivas
Thanks..

But do I need to specify setRenderBodyOnly(true) for each component even in
the 'deployment' mode? Is there a better way to strip these markups for all
the components of a page? As we have lot of nested components for a page. 


-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187651.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



Breadcrumb with pages

2011-12-12 Thread Sandor Feher
Hi,

I have a classic header,content,footer style app. I would like to add
breadcrumb panel to my header and show the current page's link. I could not
find any examples except which uses panels.
So I added a breadcrumbbar to my headpanel. I would more than happy if
someone could point me where to start.
I know  http://wicketstuff.org/wicket/breadcrumb this is  what i'm looking
for.

Thanks a lot!


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Breadcrumb-with-pages-tp4187683p4187683.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread Bertrand Guay-Paquet
Maybe you have a misunderstanding. setRenderBodyOnly(true) does not 
depend at all on deployment or development mode.


What _does_ depend on it though is the rendering of wicket:container 
tags and other wicket attributes. Personally, I use the following in my 
application init method:

getMarkupSettings().setStripWicketTags(true);

This is because I also had inconsistent styling between the 2 modes.

On 12/12/2011 4:17 PM, sudeivas wrote:

Thanks..

But do I need to specify setRenderBodyOnly(true) for each component even in
the 'deployment' mode? Is there a better way to strip these markups for all
the components of a page? As we have lot of nested components for a page.


-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187651.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



component path question

2011-12-12 Thread infiniter
What type of path expression can be used to get a component which is inside a
repeater?
So is there an expression like somPanel.listView[0].label that can be
used? I mean, something like:
MarkupContainer.get(somPanel.listView[0].label) ?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/component-path-question-tp4188010p4188010.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread sudeivas
I did include the code 

getMarkupSettings().setStripWicketTags(true);

in my Application's init() method.

But after removing .setRenderBodyOnly(true) in couple of panels, I am
getting CSS issues. But it works fine if I include .setRenderBodyOnly(true)
to the components. 

Am I missing something?

Currently using Apache Wicket - 1.5.3
-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4188072.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread Dan Retzlaff
Hi Suresh,

Without renderBodyOnly=true, you will have an extra element in your HTML
hierarchy. How that affects your page layout depends on what that element
is, and whether you have CSS selectors that depend on it not being there
(such as child selectors AB). It's hard to be more specific without seeing
the markup and CSS.

On Mon, Dec 12, 2011 at 3:12 PM, sudeivas sureshkumar@gmail.com wrote:

 I did include the code

 getMarkupSettings().setStripWicketTags(true);

 in my Application's init() method.

 But after removing .setRenderBodyOnly(true) in couple of panels, I am
 getting CSS issues. But it works fine if I include .setRenderBodyOnly(true)
 to the components.

 Am I missing something?

 Currently using Apache Wicket - 1.5.3
 -Suresh

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4188072.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread sudeivas
Ya, I just noticed some issues if I setRenderBodyOnly(true) to all the
components. It seems some components need the wicket markups to be displayed
properly. For now I think I will go through each component and then decide
whether they need markups or not. 

Thanks All

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4188122.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



Cannot get Ajax Window Debug to trace responses

2011-12-12 Thread Wayne W
Hi,

I'm starting a new project so made the jump to wicket 1.5. However
when using ajax, I cannot see the responses being returned from the
server - this is a form thats submitted via ajax. However if I use an
ajx link then I get the response.

I'm sure this was not the case with 1.4.x

Am I missing something?
thanks

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



Re: Cannot get Ajax Window Debug to trace responses

2011-12-12 Thread Dan Retzlaff
I can't think of a migration gotcha that would cause this. AJAX form
processing continues to work in our app, and in the Wicket Examples:
http://wicketstuff.org/wicket/ajax/form. If you're stuck debugging, you
should share your code.

On Mon, Dec 12, 2011 at 3:41 PM, Wayne W waynemailingli...@gmail.comwrote:

 Hi,

 I'm starting a new project so made the jump to wicket 1.5. However
 when using ajax, I cannot see the responses being returned from the
 server - this is a form thats submitted via ajax. However if I use an
 ajx link then I get the response.

 I'm sure this was not the case with 1.4.x

 Am I missing something?
 thanks

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




Re: component path question

2011-12-12 Thread Igor Vaynberg
repeater children generate numeric ids, so

somPanel.listView.0.label should work

-igor

On Mon, Dec 12, 2011 at 2:56 PM, infiniter infini...@gmail.com wrote:
 What type of path expression can be used to get a component which is inside a
 repeater?
 So is there an expression like somPanel.listView[0].label that can be
 used? I mean, something like:
 MarkupContainer.get(somPanel.listView[0].label) ?



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/component-path-question-tp4188010p4188010.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: Repainting only newly-created repeater items via ajax

2011-12-12 Thread Arjun Dhar
Hi Vineet,
nice suggestion. I worked on it and solved all server side issues; however
on the UI its failing to render. My suspicion is the prepended script may
need to be tweaked.

here is the modified code for reference:


-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repainting-only-newly-created-repeater-items-via-ajax-tp4186028p4188674.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: Spring + MongoDb

2011-12-12 Thread Jeff Schneller
Right.  I have spring setup with services.  The issue I am having is 
Spring-Data-Mongodb uses additional Spring annotations.  Do those work with 
Wicket?  As Martijn suggested I could just use the mongodb without the 
spring-data layer.  Will I run into problems in the future if I go this route?  

Any examples of spring-data annotations being used with wicket and not just the 
wicket annotation of @SpringBean or the JPA annotations? 



On Monday, December 12, 2011 at 3:50 AM, Martin Grigorov wrote:

 Hi,
 
 Here is the Scala project you mention:
 https://github.com/brunoborges/gamboa-project
 If Scala confuses you then all you need is to find pure Java example
 of Spring-Data-Mongodb and another one that uses Spring
 services/repositories from Wicket (e.g. Phonebook example in
 wicketstuff).
 
 On Mon, Dec 12, 2011 at 6:18 AM, Jeff Schneller j...@mootus.com 
 (mailto:j...@mootus.com) wrote:
  Has anyone implemented wicket with spring and mongodb.  I saw there was a 
  project back in June about scala, wicket, spring, and mongodb but the scala 
  portion is a bit confusing.
  
  Looking for a sample implementation/configuration to get going with.
  
  Thanks.
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
 (mailto:users-unsubscr...@wicket.apache.org)
 For additional commands, e-mail: users-h...@wicket.apache.org 
 (mailto:users-h...@wicket.apache.org)
 
 
 




Re: Repainting only newly-created repeater items via ajax

2011-12-12 Thread Arjun Dhar
ok, its official. using ListView in this situation is a major
*Pain_In_The_A*

Using RepeatingView it was smooth. 

However, as far as I got with using ListView (for the sake of
documentation); .. is that the script will need to be modified. I think the
li adds one more level of abstraction. When I replaced prepend with
append the tr showed up but was blank. (No innerHTML).

Thanks Vineet, you  great help in both your suggestions.



-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repainting-only-newly-created-repeater-items-via-ajax-tp4186028p4188835.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: component path question

2011-12-12 Thread Martin Grigorov
The component delimiter is ':', not '.'.

On Tue, Dec 13, 2011 at 5:09 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 repeater children generate numeric ids, so

 somPanel.listView.0.label should work

 -igor

 On Mon, Dec 12, 2011 at 2:56 PM, infiniter infini...@gmail.com wrote:
 What type of path expression can be used to get a component which is inside a
 repeater?
 So is there an expression like somPanel.listView[0].label that can be
 used? I mean, something like:
 MarkupContainer.get(somPanel.listView[0].label) ?



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/component-path-question-tp4188010p4188010.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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