Re: Is there an ajax WizardButton to use in a wizard inside a ModalWindow?

2008-10-09 Thread fstof

Ahaa... I see...
Can you maybe post your implementation of the onclick method of the
AjaxNextButton?

sorry, but I'm a bit new with the wicket thing

Thanks a lot for the help


AshleyAbraham wrote:
 
 Yes, I did make it to work by creating those two Ajax buttons and putting
 them in a class which extends WizardButtonBar class and overrided the
 newButtonBar() in the Wizard class to pass that. Its been a while since I
 did it, so I dont have the exact details on the tip of my finger.
 
 Hope it helps,
 Ashley
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-an-ajax-WizardButton-to-use-in-a-wizard-inside-a-ModalWindow--tp15978434p19893571.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Is there an ajax WizardButton to use in a wizard inside a ModalWindow?

2008-10-09 Thread fstof

Oops... I see you are only concerned with the cancel and finish buttons...
I'm looking to make everything, including the next and previous buttons to
use ajax... 
I'm asuming I'll have to have something like this in there someware, yes?
target.addComponent(wizard);



fstof wrote:
 
 Ahaa... I see...
 Can you maybe post your implementation of the onclick method of the
 AjaxNextButton?
 
 sorry, but I'm a bit new with the wicket thing
 
 Thanks a lot for the help
 
 
 AshleyAbraham wrote:
 
 Yes, I did make it to work by creating those two Ajax buttons and putting
 them in a class which extends WizardButtonBar class and overrided the
 newButtonBar() in the Wizard class to pass that. Its been a while since I
 did it, so I dont have the exact details on the tip of my finger.
 
 Hope it helps,
 Ashley
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-an-ajax-WizardButton-to-use-in-a-wizard-inside-a-ModalWindow--tp15978434p19893631.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket Community Meetup in South Florida?

2008-10-09 Thread Nino Saturnino Martinez Vazquez Wael



Martijn Dashorst wrote:

Hmm, SoFla is one of my favorite holiday spots, but not in the near
future though. Diving is awesome at Key Largo, and the food is great.
  
Cool, me and the missus dive too. However children has come in the way, 
theres no portable diving bell yet for them..

I'd love to meet up on a future trip, and get some directions to good
restaurants, bars, and other venues :)
  

Yup me too. Could be cool.

Martijn

On Wed, Oct 8, 2008 at 3:22 PM, shetc [EMAIL PROTECTED] wrote:
  

Well, it's been a week since my original topic was hijacked for a discussion
on removing the wicket:id from XML output.

Returning to the original point, there has been no response to my idea of
organizing a meetup here in South Florida. Therefore, I declare myself to be
the Lone Wicketeer of SoFla! I will be meeting with myself at my favorite
local sports bar (Flanagans) on Friday night, where I will consume cheap
happy hour margaritas and discuss the finer points of Wicket internals with
any drunk who will listen to me.
--
View this message in context: 
http://www.nabble.com/Wicket-Community-Meetup-in-South-Florida--tp19758680p19878623.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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







  


--
-Wicket for love

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


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



Navigation set active Page

2008-10-09 Thread HITECH79

Hallo,

i want to solve this problem:

I create a Navigation for my project with css. I cant set the active Page in
the Navigation. Body-Problem with child and extend?

Have someone a best-practise or help for me ...

Thanks...
HITECH68


-- 
View this message in context: 
http://www.nabble.com/Navigation-set-active-Page-tp19897122p19897122.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Wicket talk at NL-JUG's J-Fall

2008-10-09 Thread Erik van Oosten
Just to let you know. My talk 'Effective Wicket', targeted at starting 
Wicketeers has been accepted on NL-JUG's J-Fall.


http://www.nljug.org/jfall/

Regards,
   Erik.

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



a way to show jfreechart tooltip on the image

2008-10-09 Thread rolandpeng

This is my sample code to to show jfreechart tooltip on the image.
The key is to override onComponentTagBody() and use replaceComponentTagBody().

Just post my tried to share.
There should be better way to tune the performance.

--source code  here--
public class JFreeChartImage extends NonCachingImage {

private String imageMapId;
private int width;
private int height;
private JFreeChart chart;
private ChartRenderingInfo info = new ChartRenderingInfo(
new StandardEntityCollection());

public JFreeChartImage(String id, String imageMapId,
int width, int height) {
// super(id, new Model(defaultImage));
super(id);
this.imageMapId = imageMapId;
this.width = width;
this.height = height;
}

@Override
protected Resource getImageResource() {
Resource imageResource = null;
final JFreeChart chart = getChart();
imageResource = new DynamicImageResource() {
@Override
protected byte[] getImageData() {
ByteArrayOutputStream stream = new 
ByteArrayOutputStream();
try {
if (chart != null) {
info.clear();

ChartUtilities.writeChartAsPNG(stream, chart, width,
height, info);
}
} catch (IOException e) {
System.out.println(IOException:  + 
e.getMessage());
}
return stream.toByteArray();
}
};  return imageResource;
}

@Override
protected void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag) {
JFreeChart chart = getChart();
if (chart == null)
return;
ByteArrayOutputStream stream = new ByteArrayOutputStream();
try {
if (chart != null) {
info.clear();
ChartUtilities.writeChartAsPNG(stream, chart, 
width, height,
info);
}
} catch (IOException e) {
System.out.println(IOException:  + e.getMessage());
}
System.out.println(ChartUtilities.getImageMap(imageMapId, 
info));
replaceComponentTagBody(markupStream, openTag, ChartUtilities
.getImageMap(imageMapId, info));
}

public JFreeChart getChart() {
return chart;
}

public void setChart(JFreeChart chart) {
this.chart = chart;
}

}


Public email at Nabble.com


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



RE: Navigation set active Page

2008-10-09 Thread Serkan Camurcuoglu
I don't think it's a best practice but I set the active link name in the 
session when a navigation link is clicked and then in the base page constructor 
I get the active link name from the session and modify the css class of the 
related link item using an attribute appender..


-Original Message-
From: HITECH79 [mailto:[EMAIL PROTECTED]
Sent: Thu 10/9/2008 2:40 PM
To: users@wicket.apache.org
Subject: Navigation set active Page
 

Hallo,

i want to solve this problem:

I create a Navigation for my project with css. I cant set the active Page in
the Navigation. Body-Problem with child and extend?

Have someone a best-practise or help for me ...

Thanks...
HITECH68


-- 
View this message in context: 
http://www.nabble.com/Navigation-set-active-Page-tp19897122p19897122.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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

Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Lutz Müller
It might work if you dont have any ajax on your page. otherwise each ajax call 
happens in a new request and causes your domain object to be retrieved from 
the database.
this way you lose every change made to your object. writing all changes to 
database before detaching can be an option, but then you might persist 
something to your datastore that is in the midst of being edited.
i would be glad to offer a solution to the problems i just brought up, but i 
am struggling with this problem ever since i started using wicket.

On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael 
wrote:
 Yup the way that I do it too almost down to every line:)

 Michael Sparer wrote:
  When using the OSIV-filter the lazyload exception may only happen if the
  same entity is used among different requests ... sothat it gets detached
  from hibernate. have a look at
  http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha
 blemode.html ... that's the way we're doing it
 
  regards,
  Michael
 
  Korbinian Bachl - privat wrote:
   I think it could be something about
missing usage of loadabledetachable model..?
 
  not for me, as the original entity is pulled using an
  loadabledetachableModel via a SortedDataProvider :/
 
  if you look around, the all called solution for this is the
  OpenSessionInViewFilter and the usage of
  bean id=transactionManager
  class=org.springframework.orm.jpa.JpaTransactionManager
  for that (latter one is used by me, too)
 
  However, the OpenSessionInViewFilter will not work with wicket, even if
  mapped to /* in the web.xml
 
  Best,
 
  Korbinian
 
  Nino Saturnino Martinez Vazquez Wael schrieb:
  Hi Korbinian
 
  Im facing the same problems... I also use extended.. So gonna be great
  to see the outcome of this thread.. I think it could be something about
  missing usage of loadabledetachable model..?
 
  Korbinian Bachl - privat wrote:
  Hi,
 
  I'm currently struggling with the famous lazy load exception under
  spring + jpa with wicket.
 
  The problem is, in my case, that i pull an entity from the database
  using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
  wicket class i need to walk the entity tree a bit, based on the needs
  of the user (preloading wont work, as i dont know the direction the
  user wants to walk and the whole entity tree is too complex to grab it
  all at once).
 
  If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy
  load exception (transaction already closed). So I tried to use the
  OpenSessionInViewFilter to solve this, but it just won't work - no
  reason why, as the error stays exactly the same.
 
  Currently I ended up using this:
  @PersistenceContext(type = PersistenceContextType.EXTENDED)
  private EntityManager em;
 
  However, I'm not sure if this is the way it is supposed to be?
  ( I read so far that this disables a big part of springs-transaction
  handling support but didnt see any impacts so far)
 
  Has anyone a different aproach/ solution for this using wicket +
  spring with JPA?
 
  Best,
 
  Korbinan
 
  PS: im on wicket 1.4-m3
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Michael Sparer

you mean changing each property of an existing object by means of ajax? if
the object is serializable, clone the object and perform the changes on that
object ... if it isn't set the properties in your form and apply them
onsubmit ... or am I missing the point completely?


Lutz Müller wrote:
 
 It might work if you dont have any ajax on your page. otherwise each ajax
 call 
 happens in a new request and causes your domain object to be retrieved
 from 
 the database.
 this way you lose every change made to your object. writing all changes to 
 database before detaching can be an option, but then you might persist 
 something to your datastore that is in the midst of being edited.
 i would be glad to offer a solution to the problems i just brought up, but
 i 
 am struggling with this problem ever since i started using wicket.
 
 On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael 
 wrote:
 Yup the way that I do it too almost down to every line:)

 Michael Sparer wrote:
  When using the OSIV-filter the lazyload exception may only happen if
 the
  same entity is used among different requests ... sothat it gets
 detached
  from hibernate. have a look at
 
 http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha
 blemode.html ... that's the way we're doing it
 
  regards,
  Michael
 
  Korbinian Bachl - privat wrote:
   I think it could be something about
missing usage of loadabledetachable model..?
 
  not for me, as the original entity is pulled using an
  loadabledetachableModel via a SortedDataProvider :/
 
  if you look around, the all called solution for this is the
  OpenSessionInViewFilter and the usage of
  bean id=transactionManager
  class=org.springframework.orm.jpa.JpaTransactionManager
  for that (latter one is used by me, too)
 
  However, the OpenSessionInViewFilter will not work with wicket, even
 if
  mapped to /* in the web.xml
 
  Best,
 
  Korbinian
 
  Nino Saturnino Martinez Vazquez Wael schrieb:
  Hi Korbinian
 
  Im facing the same problems... I also use extended.. So gonna be
 great
  to see the outcome of this thread.. I think it could be something
 about
  missing usage of loadabledetachable model..?
 
  Korbinian Bachl - privat wrote:
  Hi,
 
  I'm currently struggling with the famous lazy load exception under
  spring + jpa with wicket.
 
  The problem is, in my case, that i pull an entity from the database
  using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
  wicket class i need to walk the entity tree a bit, based on the
 needs
  of the user (preloading wont work, as i dont know the direction the
  user wants to walk and the whole entity tree is too complex to grab
 it
  all at once).
 
  If I use the Entity myEntity.getMyOtherConnectedEntity I get the
 lazy
  load exception (transaction already closed). So I tried to use the
  OpenSessionInViewFilter to solve this, but it just won't work - no
  reason why, as the error stays exactly the same.
 
  Currently I ended up using this:
  @PersistenceContext(type = PersistenceContextType.EXTENDED)
  private EntityManager em;
 
  However, I'm not sure if this is the way it is supposed to be?
  ( I read so far that this disables a big part of springs-transaction
  handling support but didnt see any impacts so far)
 
  Has anyone a different aproach/ solution for this using wicket +
  spring with JPA?
 
  Best,
 
  Korbinan
 
  PS: im on wicket 1.4-m3
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p19899635.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Warn that data on page modified mechanism

2008-10-09 Thread Martijn Dashorst
if you don't wrap your whole page in a form, and use submitlinks
everywhere, you'll loose user input. Forms need to be submitted to the
server to retain their input.

Much better IMO is a client side javascript that triggers a
confirmation box when the user has modified some fields, being called
when a link or button is clicked (or page unload is triggered).

Martijn

On Wed, Oct 8, 2008 at 10:48 AM, Arie Fishler [EMAIL PROTECTED] wrote:
 Hi,

 I would like to consult on implementing a generic mechanism for checking
 whether some data on a page modified before leaving that page.

 The use case is:
 - Page has some form fields or other controls
 - User has entered some data to the form
 - Before submitting the form user clicked on a link to leave the page (might
 be a menu item or similar).

 The required action will be:
 A) Check if the new page the user is going to means no loss of data -
 user can go back safely to his form data later on and this is considered a
 valid move to another page
 B) Checks if the new page cancels the form which means the user will lose
 all his data. In this case we need to alert the user (modal window) that
 moving to the new page will cause loss of data. He should approve this.
 C) If he approves operation will continue. If he cancels he will go BACK to
 the same page he just left with no loss of form data.

 This looks like a need to use *redirectToInterceptPage* only that if the
 user cancels...I want to go back to the LAST page. How do I retrieve
 programatically the previous page the user has left and go back to it? I
 also need the previous page to check if the transition is valid which
 relates to action (A) above - in such a case no warning needs to be issued
 to the user

 Thanks,
 Arie




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

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



Re: Problem with upload (works on xp, error on linux)

2008-10-09 Thread Martijn Dashorst
If you haven't modified anything between the two wars, then it sounds
like a rights issue. AFAIR some linux distributions restrict
dangerous things such as reflection.

Martijn

On Wed, Oct 8, 2008 at 12:29 PM, Herbert Winter [EMAIL PROTECTED] wrote:
 hello list,

 I am a new user of wicket and try to make a simple fileupload like the
 example at http://www.wicket-library.com/wicket-examples/upload/

 The examples work when I deploy to tomcat on win xp.
 However when I use the war on linux ( e.g. Apache Tomcat/6.0.18 | suns
 java 1.6.0_10-rc2-b32 | Linux | 2.6.27-5-generic | i386) and try to
 upload a file in the browser, I get the following, titled Unexpected
 RuntimeException:

 WicketMessage: Method onFormSubmitted of interface
 org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
 component [MarkupContainer [Component id = ajax-iconUpload]] threw an
 exception

 Root cause:

 java.lang.IllegalStateException: Attempt to set model object on null
 model of component:
 page:footer:pluginRepeater:0:plugin:ajax-iconUpload:fileInput
 at org.apache.wicket.Component.setDefaultModelObject(Component.java:2965)
 [...]

 Any idea what is happening, any hints?

 greetings

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





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

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



Re: Validation on Custom Panel

2008-10-09 Thread Martijn Dashorst
According to me you don't have to use SRM at all. If you use the
normal wicket validation mechanism, the resource bundles are picked up
automatically.

That validations are skipped is probably a bug in your code (for
example: setDefaultFormProcessing(false) in your code somewhere?)

Martijn

On Wed, Oct 8, 2008 at 3:46 PM, Srikanth.NT [EMAIL PROTECTED] wrote:

 Hi
 I have built a new custom panel(custompanel.java) with 12 text fields. It
 has a configuration file called custompanel.properties which has something
 like
 component1.required=true
 component2.required=true
 component1.maxlength=200

 These properties can be overridden by page.properties. When I read the
 properties file from the constructor,
 new StringResourceModel(id, this, null).getObject().toString()
 i did not get overriden values. Also I got some warn that I am trying to
 access property before rendering the component. So I moved the constructing
 stuff to the onBeforeRender method which then picked the correct overridden
 values. But the problem is validation errors are missed.

 Anybody used the properties file for the configuration of panel ?

 -
 http://ntsrikanth.blogspot.com/
 --
 View this message in context: 
 http://www.nabble.com/Validation-on-Custom-Panel-tp19879065p19879065.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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





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

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



Re: how to customize error message of requiredtextfield inside listview

2008-10-09 Thread Igor Vaynberg
Required=${label} is required

textfield.setlabel(new model(question +item.getindex()));

-igor

On Thu, Oct 9, 2008 at 2:16 AM, freak182 [EMAIL PROTECTED] wrote:

 Hello,

 My problem is how to customize error message of requiredtextfield inside
 listview? here is the scenario: i have a requiredtextfield in the listview,
 of course the listview is inside the form. actually it is dynamic question 
 answer that came from DB. now if the user did not answer the question number
 1 provided it should display an error Please answer the Question for number
 1 and so on...And suppose i have 5 question how i can determine which
 question is not answered.

 i already do this: arcotForm.qasetup.3.question.Required=Please enter
 Question 4

 when there is 2 question that left empty the error displayed: Please enter
 Question 4 (2x)

 Thanks a lot.

 Cheers.

 --
 View this message in context: 
 http://www.nabble.com/how-to-customize-error-message-of-requiredtextfield-inside-listview-tp19895203p19895203.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



[OT] Process modelling (with Wicket front-end)

2008-10-09 Thread Kaspar Fischer
Can anybody recommend a good process modelling tool that integrates  
with Wicket?


We would like to use such a tool for many activities in our  
organziation:


- We show processes to our end-users as part of our knowledge  
information centre
  website. So we need to present processes, interactively, if  
possible. The website
  (including the CMS front-end) runs on Wicket and ideally, we would  
like to

  edit the processes in a Wicket GUI, too.

- We are starting to provide e-learning solutions and there, too, it  
might be

  helpful to structure a course with a process modeller.

- We use processes internally for certain documents (in Alfresco CMS).

I have slightly touched jBPM as it is used in Alfresco CMS, and I have  
watched
the presentation http://docs.jboss.com/jbpm/v3/demos/movies/jbpm-overview.htm 

given at http://www.jboss.com/products/jbpm. Also, I have read a  
little about
YAWL and heard of BPDM but as I lack experience with these tools/ 
models, I
wonder: What state-of-the-art tools (in Java) are out there, and has  
anybody

managed to get integration with Wicket?

Thanks,
Kaspar

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



Re: Example of pseudo-ajax file uploading using iframes

2008-10-09 Thread dukehoops

Does anyone have a copy of this (or any other) Ajax file upload example? 

The attachment mentioned below does not open.

thanks
-nikita


Carlos Pita-4 wrote:
 
 Hi all,
 
 here is a hopefully functional example showing how to use an iframe to
 upload a file and afterwards call a behavior on a component belonging to
 the
 top frame, so that an ajax action could be carried on in consequence
 (maybe
 to get rid of the iframe, or to show an informative message, or whatever).
 This is along the same venue as other examples that are around the web,
 like
 http://www.air4web.com/files/upload/. I don't have the time to write a
 proper wiki page just right now, so I simply attach the example here. Hope
 it helps.
 
 Regards,
 Carlos
 
  
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/Example-of-pseudo-ajax-file-uploading-using-iframes-tp12400088p19902269.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Igor Vaynberg
maybe this will help

http://wicketinaction.com/2008/09/building-a-smart-entitymodel/

-igor

On Thu, Oct 9, 2008 at 7:02 AM, Michael Sparer [EMAIL PROTECTED] wrote:

 you mean changing each property of an existing object by means of ajax? if
 the object is serializable, clone the object and perform the changes on that
 object ... if it isn't set the properties in your form and apply them
 onsubmit ... or am I missing the point completely?


 Lutz Müller wrote:

 It might work if you dont have any ajax on your page. otherwise each ajax
 call
 happens in a new request and causes your domain object to be retrieved
 from
 the database.
 this way you lose every change made to your object. writing all changes to
 database before detaching can be an option, but then you might persist
 something to your datastore that is in the midst of being edited.
 i would be glad to offer a solution to the problems i just brought up, but
 i
 am struggling with this problem ever since i started using wicket.

 On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael
 wrote:
 Yup the way that I do it too almost down to every line:)

 Michael Sparer wrote:
  When using the OSIV-filter the lazyload exception may only happen if
 the
  same entity is used among different requests ... sothat it gets
 detached
  from hibernate. have a look at
 
 http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha
 blemode.html ... that's the way we're doing it
 
  regards,
  Michael
 
  Korbinian Bachl - privat wrote:
   I think it could be something about
missing usage of loadabledetachable model..?
 
  not for me, as the original entity is pulled using an
  loadabledetachableModel via a SortedDataProvider :/
 
  if you look around, the all called solution for this is the
  OpenSessionInViewFilter and the usage of
  bean id=transactionManager
  class=org.springframework.orm.jpa.JpaTransactionManager
  for that (latter one is used by me, too)
 
  However, the OpenSessionInViewFilter will not work with wicket, even
 if
  mapped to /* in the web.xml
 
  Best,
 
  Korbinian
 
  Nino Saturnino Martinez Vazquez Wael schrieb:
  Hi Korbinian
 
  Im facing the same problems... I also use extended.. So gonna be
 great
  to see the outcome of this thread.. I think it could be something
 about
  missing usage of loadabledetachable model..?
 
  Korbinian Bachl - privat wrote:
  Hi,
 
  I'm currently struggling with the famous lazy load exception under
  spring + jpa with wicket.
 
  The problem is, in my case, that i pull an entity from the database
  using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
  wicket class i need to walk the entity tree a bit, based on the
 needs
  of the user (preloading wont work, as i dont know the direction the
  user wants to walk and the whole entity tree is too complex to grab
 it
  all at once).
 
  If I use the Entity myEntity.getMyOtherConnectedEntity I get the
 lazy
  load exception (transaction already closed). So I tried to use the
  OpenSessionInViewFilter to solve this, but it just won't work - no
  reason why, as the error stays exactly the same.
 
  Currently I ended up using this:
  @PersistenceContext(type = PersistenceContextType.EXTENDED)
  private EntityManager em;
 
  However, I'm not sure if this is the way it is supposed to be?
  ( I read so far that this disables a big part of springs-transaction
  handling support but didnt see any impacts so far)
 
  Has anyone a different aproach/ solution for this using wicket +
  spring with JPA?
 
  Best,
 
  Korbinan
 
  PS: im on wicket 1.4-m3
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com





 -
 Michael Sparer
 http://talk-on-tech.blogspot.com
 --
 View this message in context: 
 http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p19899635.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



html code

2008-10-09 Thread miro

I have a page   withsame pattern but different  data  in several td  tag.
Like   

   Header1  
link 1
link2
link3
  

   header2
link1
link2

and so..on

I dont want to repeat the same html for header1 header2 instead   I want to
make a custom  component which takes header and  RepeatingView for links ,So
in my html i just give the id of the component and the  component html is
used .
to acheieve this   I have few questions
1st
For this  should I use a webmarkupcontainer or a panel  as super class for
my custom component ?and why should
2nd
my custom component html is very  little  and  i dont want to create a html
page  instead  
I want customize the lookup of html ie just tell wicket use this html to
render my custom component or give wickwet   some html to render my  
component


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


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



Looking for a Wicket developper in Paris

2008-10-09 Thread Antoine Angenieux

Hi everyone,

Clinigrid is a French ASP company in the medical research field, and is 
looking for wicket competent developpers with strong Java background.


The primary goal is to enhance one of our current product with new 
functionnalities.


A good knowledge of Hibernate / MySQL / Spring would be a big plus.

If you're near Paris and are interested, please drop me a line !

Thanks,

Antoine.


--
Antoine Angénieux
Associé

Clinigrid -- http://www.clinigrid.com
5, avenue Mozart
75016 Paris, France
[EMAIL PROTECTED]



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



Re: [OT] Process modelling (with Wicket front-end)

2008-10-09 Thread Daan van Etten

Hi Kaspar,

We use jBPM for our processes. We don't manage the processes from  
Wicket, as there is a nice plugin Eclipse for it.
jBPM uses Java and Hibernate, so you can create any GUI you like in  
Wicket and show underlying jBPM stuff (like tasks, processes, etcetera)


Regards,

Daan

On 9 okt 2008, at 18:03, Kaspar Fischer wrote:

Can anybody recommend a good process modelling tool that integrates  
with Wicket?


We would like to use such a tool for many activities in our  
organziation:


- We show processes to our end-users as part of our knowledge  
information centre
 website. So we need to present processes, interactively, if  
possible. The website
 (including the CMS front-end) runs on Wicket and ideally, we would  
like to

 edit the processes in a Wicket GUI, too.

- We are starting to provide e-learning solutions and there, too, it  
might be

 helpful to structure a course with a process modeller.

- We use processes internally for certain documents (in Alfresco CMS).

I have slightly touched jBPM as it is used in Alfresco CMS, and I  
have watched
the presentation http://docs.jboss.com/jbpm/v3/demos/movies/jbpm-overview.htm 

given at http://www.jboss.com/products/jbpm. Also, I have read a  
little about
YAWL and heard of BPDM but as I lack experience with these tools/ 
models, I
wonder: What state-of-the-art tools (in Java) are out there, and has  
anybody

managed to get integration with Wicket?

Thanks,
Kaspar

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




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



Re: Problem with upload (works on xp, error on linux)

2008-10-09 Thread Herbert Winter
hello,

thanks for your input, more info on this:
* I use wicket-1.4-SNAPSHOT.jar
* I checked out the code from the repository ... and build the
code...so it is not the exactly the same war...
* I pointed the upload dir to a dir in my home-dir with no
writepermissions, no luck of course
* I pointed the upload dir to a dir in my home-dir WITH
writepermissions, no luck again
* if I use the no-ajax-upload  from
http://www.wicket-library.com/wicket-examples/upload/ it does not work
on different machines running ubuntu 8.04 (desktop) and ubuntu 8.10
(beta, desktop).

What else could it be?

greetings

2008/10/9 Martijn Dashorst [EMAIL PROTECTED]:
 If you haven't modified anything between the two wars, then it sounds
 like a rights issue. AFAIR some linux distributions restrict
 dangerous things such as reflection.

 Martijn

 On Wed, Oct 8, 2008 at 12:29 PM, Herbert Winter [EMAIL PROTECTED] wrote:
 hello list,

 I am a new user of wicket and try to make a simple fileupload like the
 example at http://www.wicket-library.com/wicket-examples/upload/

 The examples work when I deploy to tomcat on win xp.
 However when I use the war on linux ( e.g. Apache Tomcat/6.0.18 | suns
 java 1.6.0_10-rc2-b32 | Linux | 2.6.27-5-generic | i386) and try to
 upload a file in the browser, I get the following, titled Unexpected
 RuntimeException:

 WicketMessage: Method onFormSubmitted of interface
 org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
 component [MarkupContainer [Component id = ajax-iconUpload]] threw an
 exception

 Root cause:

 java.lang.IllegalStateException: Attempt to set model object on null
 model of component:
 page:footer:pluginRepeater:0:plugin:ajax-iconUpload:fileInput
 at org.apache.wicket.Component.setDefaultModelObject(Component.java:2965)
 [...]

 Any idea what is happening, any hints?

 greetings

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





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

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



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



html code in component class

2008-10-09 Thread miro

 like I have  very little html and I dont want a write a  new .html file  and
just in my component i want to override some method  which returns html  as
string  for the component .Is  this possible ?
-- 
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread James Carman
Sure.  Look at what the Label class does.  It doesn't have an HTML template.

On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:

  like I have  very little html and I dont want a write a  new .html file  and
 just in my component i want to override some method  which returns html  as
 string  for the component .Is  this possible ?
 --
 View this message in context: 
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Nino Saturnino Martinez Vazquez Wael

Hi Lutz

I agree, there is something to this.. However it's not wicket related.. 
I know that Bjarni are hacking away at something, I've dicussed a few 
things with him.


I guess if you are creating entities then you can store your data in a 
temporary model... However Bjarni Gudmondurs thing(still under 
development, he will make post to his blog soon ) will remove the need 
for explicitly defining the temporary class. It follows the builder 
pattern and on the end of the form/wizard whatever you just call 
build... If you are editing stuff then a loadable detachable model 
should be okay if you just persist the changes on each request, if thats 
not okay. Because the editing needs to be confirmed first then you have 
to store your data in a temporary map or something and persist on 
submit.. Theres loads of different ways of handling this, with pros and 
cons. You could also put in an extended persistence context but there 
are performance/memory issues with this if you have too much data, and 
data will be persisted on the fly. But I actually like the fact that we 
get the lazy load exceptions. It tells us that we are not using 
detachable models and our entities have become stale...


Lutz Müller wrote:
It might work if you dont have any ajax on your page. otherwise each ajax call 
happens in a new request and causes your domain object to be retrieved from 
the database.
this way you lose every change made to your object. writing all changes to 
database before detaching can be an option, but then you might persist 
something to your datastore that is in the midst of being edited.
i would be glad to offer a solution to the problems i just brought up, but i 
am struggling with this problem ever since i started using wicket.


On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael 
wrote:
  

Yup the way that I do it too almost down to every line:)

Michael Sparer wrote:


When using the OSIV-filter the lazyload exception may only happen if the
same entity is used among different requests ... sothat it gets detached
from hibernate. have a look at
http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha
blemode.html ... that's the way we're doing it

regards,
Michael

Korbinian Bachl - privat wrote:
  

 I think it could be something about
  missing usage of loadabledetachable model..?

not for me, as the original entity is pulled using an
loadabledetachableModel via a SortedDataProvider :/

if you look around, the all called solution for this is the
OpenSessionInViewFilter and the usage of
bean id=transactionManager
class=org.springframework.orm.jpa.JpaTransactionManager
for that (latter one is used by me, too)

However, the OpenSessionInViewFilter will not work with wicket, even if
mapped to /* in the web.xml

Best,

Korbinian

Nino Saturnino Martinez Vazquez Wael schrieb:


Hi Korbinian

Im facing the same problems... I also use extended.. So gonna be great
to see the outcome of this thread.. I think it could be something about
missing usage of loadabledetachable model..?

Korbinian Bachl - privat wrote:
  

Hi,

I'm currently struggling with the famous lazy load exception under
spring + jpa with wicket.

The problem is, in my case, that i pull an entity from the database
using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
wicket class i need to walk the entity tree a bit, based on the needs
of the user (preloading wont work, as i dont know the direction the
user wants to walk and the whole entity tree is too complex to grab it
all at once).

If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy
load exception (transaction already closed). So I tried to use the
OpenSessionInViewFilter to solve this, but it just won't work - no
reason why, as the error stays exactly the same.

Currently I ended up using this:
@PersistenceContext(type = PersistenceContextType.EXTENDED)
private EntityManager em;

However, I'm not sure if this is the way it is supposed to be?
( I read so far that this disables a big part of springs-transaction
handling support but didnt see any impacts so far)

Has anyone a different aproach/ solution for this using wicket +
spring with JPA?

Best,

Korbinan

PS: im on wicket 1.4-m3

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


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


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



  


--
-Wicket for love

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


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



markup for component extending RadioGroup?

2008-10-09 Thread dukehoops

Hi,

I created a component MyRadioGroup that extends RadioGroup (has two Radios
inside). I cannot figure out what to put in MyRadioGroup.html. The following
does not work because it expects MyRadioGroup to be a Panel:
wicket:panel
 input wicket:id=radio1 type=radio/
 input wicket:id=radio2 type=radio/
/wicket:panel

Is the lesson here to only extend Panels (or FormComponentPanels) when
creating custom components that simply encapsulate other components?

thanks,
-nikita

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/markup-for-component-extending-RadioGroup--tp19904068p19904068.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread miro

the label appears complex i looking for a simple solution

My custom componentuses wicket components internally  here is an example

protected class CustomLinkComponent extends  WebMarkupContainer  {
String displayName;
Class  clazz;
public CustomLinkComponent(String displayName, Class  clazz) {
super(customlink);
this.displayName=displayName;
this.clazz=clazz;
add(getBookmarkablePageLink());
add(getDisplayNameLabel());
}
protected BookmarkablePageLink  getBookmarkablePageLink(){
return new BookmarkablePageLink(link, clazz);
}
protected  Label  getDisplayNameLabel(){
return new Label(lbl,displayName);
}

}

  the html  for this is   
# label wicket:id=lbl/label 

 so instead of writing a html page  i want my component to render this html
and further wicket should replace the child components  link and lbl with
actual values  ,  can I do this ?

   


jwcarman wrote:
 
 Sure.  Look at what the Label class does.  It doesn't have an HTML
 template.
 
 On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:

  like I have  very little html and I dont want a write a  new .html file 
 and
 just in my component i want to override some method  which returns html 
 as
 string  for the component .Is  this possible ?
 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread James Carman
What's wrong with using a panel?  If this is to be done in only one
class, have you thought about using a Fragment?

On Thu, Oct 9, 2008 at 2:28 PM, miro [EMAIL PROTECTED] wrote:

 the label appears complex i looking for a simple solution

 My custom componentuses wicket components internally  here is an example

protected class CustomLinkComponent extends  WebMarkupContainer  {
String displayName;
Class  clazz;
public CustomLinkComponent(String displayName, Class  clazz) {
super(customlink);
this.displayName=displayName;
this.clazz=clazz;
add(getBookmarkablePageLink());
add(getDisplayNameLabel());
}
protected BookmarkablePageLink  getBookmarkablePageLink(){
return new BookmarkablePageLink(link, clazz);
}
protected  Label  getDisplayNameLabel(){
return new Label(lbl,displayName);
}

}

  the html  for this is
 # label wicket:id=lbl/label

  so instead of writing a html page  i want my component to render this html
 and further wicket should replace the child components  link and lbl with
 actual values  ,  can I do this ?




 jwcarman wrote:

 Sure.  Look at what the Label class does.  It doesn't have an HTML
 template.

 On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:

  like I have  very little html and I dont want a write a  new .html file
 and
 just in my component i want to override some method  which returns html
 as
 string  for the component .Is  this possible ?
 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: onmouseover image

2008-10-09 Thread Stefan Simik

Implementation of roll-over image.

Takes 2 image resource-references: one for initial image, second for
mouseover image.
Automatically adds javascript for preloading these images.
Takes wicket locale and style into consideration.

USAGE:
RollOverImage image = new RollOverImage(wicketId, imageAltText,
imageOut, imageOver, null);
add(image);

Enjoy ;)
SS


//  CODE
//==

package sk.serviceintegra.wisa.component.image.rolloverimage;

import java.util.Locale;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.RequestCycle;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.Session;
import org.apache.wicket.behavior.StringHeaderContributor;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

import sk.serviceintegra.random.RandomStringGenerator;
import sk.serviceintegra.wisa.component.image.extended.ExtendedImage;

/**
 * Roll-over image.
 * Takes 2 image resource-references: one for initial image, second for
mouseover image.
 * Takes wicket locale and style into consideration. 
 * 
 * pre
 * USAGE:
 *  RollOverImage image = new RollOverImage(wicketId, imageAltText,
imageOut, imageOver, null);
 *  add(image);
 * /pre
 * 
 * @author simik
 */
public class RollOverImage extends ExtendedImage {
private static final long serialVersionUID = -4686703857711636280L;

/**
 * Roll-over image.
 * 
 * @param wicketId
 * @param altAttributeModel model, that contains value for ALT 
attribute in
lt;imagegt; tag
 * @param imageOut mouseout image 
 * @param imageOver mouseover image 
 * @param style wicket style. Can be null, if not used.
 */
public RollOverImage(String wicketId, 
 IModelString 
altAttributeModel, 
 ResourceReference imageOut, 
 ResourceReference imageOver,
 String style) {
super(wicketId, imageOut, altAttributeModel);

//set locale for ResourceReference
Locale locale = Session.get().getLocale();
if (locale != null) {
imageOut.setLocale(locale);
imageOver.setLocale(locale);
}

//set style for ResourceReference
if (style != null) {
imageOut.setStyle(style);
imageOver.setStyle(style);
}

//generate random string for unique image name
String uniqueImageName = Image_ + 
RandomStringGenerator.generate(10);


//HEAD CONTRIBUTION FOR PRELOADING IMAGES
/*
   script language=JavaScript
  ${IMAGE_IDENTIFIER}_out = new Image();
  ${IMAGE_IDENTIFIER}_out.src = ${IMAGE_OUT_URL};

  ${IMAGE_IDENTIFIER}_over = new Image();
  ${IMAGE_IDENTIFIER}_over.src = ${IMAGE_OVER_URL};
   /script 
 */
String imageOutUrl = 
RequestCycle.get().urlFor(imageOut).toString();
String imageOverUrl = 
RequestCycle.get().urlFor(imageOver).toString();

String javascript = 
script  type=\text/javascript\\n +
uniqueImageName + _out = new Image();\n +
uniqueImageName + _out.src = \ + imageOutUrl 
+ \;\n +
uniqueImageName + _over = new Image();\n +
uniqueImageName + _over.src = \ + 
imageOverUrl + \;\n +
/script\n;

add(new StringHeaderContributor(javascript));




// HEAD CONTRIBUTION FOR display() function.
/*
script language=JavaScript
  function display(imgName, imgUrl) {
if (document.images  typeof imgUrl != 'undefined')
  document[imgName].src = imgUrl.src;
  }
/script
 */
String javascript2 = 
script  type=\text/javascript\ +
!--/*--![CDATA[/*!--*/\n +
  function display(imgName, imgUrl) {\n +
if (document.images  typeof imgUrl != 'undefined')\n +
  document[imgName].src = imgUrl.src;\n +
  }\n +
  /*--]]*/+
/script\n;


Re: job postings

2008-10-09 Thread Patrick Angeles

Ditto...

http://www.inertiabev.com/inertiabev/page/jobs.jsp

From the company that brought you Brix CMS.
(http://code.google.com/p/brix-cms/)
We are based in Napa, but are willing to consider telecommute.



-- 
View this message in context: 
http://www.nabble.com/job-postings-tp19602122p19905140.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread miro

Using panel I have to write a .html   file which I dont want to do becasue my
html code is very little just a line   , 
next option is Fragment but this is not clear, neither the api doc nor the
wicket examples  please can you give me small example  using fragment   ?

jwcarman wrote:
 
 What's wrong with using a panel?  If this is to be done in only one
 class, have you thought about using a Fragment?
 
 On Thu, Oct 9, 2008 at 2:28 PM, miro [EMAIL PROTECTED] wrote:

 the label appears complex i looking for a simple solution

 My custom componentuses wicket components internally  here is an
 example

protected class CustomLinkComponent extends  WebMarkupContainer  {
String displayName;
Class  clazz;
public CustomLinkComponent(String displayName, Class 
 clazz) {
super(customlink);
this.displayName=displayName;
this.clazz=clazz;
add(getBookmarkablePageLink());
add(getDisplayNameLabel());
}
protected BookmarkablePageLink  getBookmarkablePageLink(){
return new BookmarkablePageLink(link, clazz);
}
protected  Label  getDisplayNameLabel(){
return new Label(lbl,displayName);
}

}

  the html  for this is
 # label wicket:id=lbl/label

  so instead of writing a html page  i want my component to render this
 html
 and further wicket should replace the child components  link and lbl with
 actual values  ,  can I do this ?




 jwcarman wrote:

 Sure.  Look at what the Label class does.  It doesn't have an HTML
 template.

 On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:

  like I have  very little html and I dont want a write a  new .html
 file
 and
 just in my component i want to override some method  which returns html
 as
 string  for the component .Is  this possible ?
 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



All examples throwing internal error http://wicketstuff.org/wicket13/repeater/

2008-10-09 Thread nanotech

Just a fyi

All the examples at http://wicketstuff.org/wicket13/repeater/ are throwing
internal error.
-- 
View this message in context: 
http://www.nabble.com/All-examples-throwing-internal-error-http%3A--wicketstuff.org-wicket13-repeater--tp19906710p19906710.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Hibernate + HTML-Table

2008-10-09 Thread Björn-Peter Tietjens

Hey there,

I want to execute a simple sql-count-query with a group by statement 
and display the result in a html-table...


something like:
   session = HibernateUtil.getSessionFactory().getCurrentSession();
   session.beginTransaction();
   String SQL_QUERY = SELECT COUNT(*),Date FROM Person Group 
By Date;

   Query query = session.createQuery(SQL_QUERY);


What is the best way to manage that, not using too much fancy stuff...?

Cheers B

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



Ajax update DefaultDataTable using textfield

2008-10-09 Thread taygolf

Hey guys,

I am trying to update a DefaultDataTable using a textfield and ajax. I have
done it to a ListChoice before but for some reason I can not get it to work
with a DefaultDataTable.

Basically what I want to do is have a textfield on my page. when the user
types a letter in the textfield I want to take that letter and update the
query that I send to my dataprovider. The dataprovider will then update the
DefaultDataTable.

I have place the DefaultDataTable in a WebMarkupContainer and I am updating
the query and then calling then setting the DefaultDataTable to the new
provider and the adding the WebMarkupContainer to the target of the
AjaxFormComponentUpdatingBehavior but it does not seem to want to work. All
of this is in a panel which might be causing some issues I am not sure.

Am I looking at this the right way ir is there somewhere else I need to
look.

All I really want is a DefaultDataTable with a searchbox at the top to
narrow down what is being shown in the Table.

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/Ajax-update-DefaultDataTable-using-textfield-tp19906974p19906974.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread Peter Ertl

If it's just a line use Label

Am 09.10.2008 um 21:01 schrieb miro:



Using panel I have to write a .html   file which I dont want to do  
becasue my

html code is very little just a line   ,
next option is Fragment but this is not clear, neither the api doc  
nor the
wicket examples  please can you give me small example  using  
fragment   ?


jwcarman wrote:


What's wrong with using a panel?  If this is to be done in only one
class, have you thought about using a Fragment?

On Thu, Oct 9, 2008 at 2:28 PM, miro [EMAIL PROTECTED] wrote:


the label appears complex i looking for a simple solution

My custom componentuses wicket components internally  here is an
example

  protected class CustomLinkComponent extends   
WebMarkupContainer  {

  String displayName;
  Class  clazz;
  public CustomLinkComponent(String displayName, Class
clazz) {
  super(customlink);
  this.displayName=displayName;
  this.clazz=clazz;
  add(getBookmarkablePageLink());
  add(getDisplayNameLabel());
  }
  protected BookmarkablePageLink   
getBookmarkablePageLink(){
  return new BookmarkablePageLink(link,  
clazz);

  }
  protected  Label  getDisplayNameLabel(){
  return new Label(lbl,displayName);
  }

  }

the html  for this is
# label wicket:id=lbl/label

so instead of writing a html page  i want my component to render  
this

html
and further wicket should replace the child components  link and  
lbl with

actual values  ,  can I do this ?




jwcarman wrote:


Sure.  Look at what the Label class does.  It doesn't have an HTML
template.

On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:


like I have  very little html and I dont want a write a  new .html
file
and
just in my component i want to override some method  which  
returns html

as
string  for the component .Is  this possible ?
--
View this message in context:
http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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





--
View this message in context:
http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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





--
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



DownloadLink

2008-10-09 Thread Pablo Scagno
Hi, 
I was trying to use DownloadLink but for some reason  I couldn't make it work. 
I'm trying to insert the link in a grid, but when I test the application and I 
click the link, an error page appears The webPage cannot be found

this url appears in the page
http:///?wicket:interface=:7:table:rows:1:cells:2:cell:download::ILinkListener::

here Is the code where I create the link

public class ActionPanel extends Panel{ 
public ActionPanel(String id, IModelDocument model){
super(id, model);
try {
File file = ((Document)model.getObject()).getOriginalFile(); 
IModelFile fileModel = new ModelFile();
fileModel.setObject(file);
add(new DownloadLink(download,fileModel));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}

I've debug the app and I saw that the file was loaded, and the link was created 
without any problem. Can anyone tell me if need anything else to make it works?

Thanks in advance

Pablo

Re: html code

2008-10-09 Thread Timm Helbig
Hi,

1) I would choose a Panel

2) Sounds like Markup Inheritance would help you here. Create some Base Panel 
and then extend this class and the markup and include the different 
Components, if any.

Hope this helps

Regards,
Timm

Am Thursday 09 October 2008 19:08:25 schrieb miro:
 I have a page   withsame pattern but different  data  in several td 
 tag. Like

Header1
 link 1
 link2
 link3


header2
 link1
 link2

 and so..on

 I dont want to repeat the same html for header1 header2 instead   I want to
 make a custom  component which takes header and  RepeatingView for links
 ,So in my html i just give the id of the component and the  component html
 is used .
 to acheieve this   I have few questions
 1st
 For this  should I use a webmarkupcontainer or a panel  as super class for
 my custom component ?and why should
 2nd
 my custom component html is very  little  and  i dont want to create a html
 page  instead
 I want customize the lookup of html ie just tell wicket use this html to
 render my custom component or give wickwet   some html to render my
 component



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



Re: html code in component class

2008-10-09 Thread miro

Its not just label   here is the html


   ul
li wicket:id=repater
/li
   /ul

hml for repeater


 # label 
wicket:id=lbl/label 



instead of writing the same html  at 10 paqlces  i want to write it once and
reuse it in the please twell me how ?



Peter Ertl-3 wrote:
 
 If it's just a line use Label
 
 Am 09.10.2008 um 21:01 schrieb miro:
 

 Using panel I have to write a .html   file which I dont want to do  
 becasue my
 html code is very little just a line   ,
 next option is Fragment but this is not clear, neither the api doc  
 nor the
 wicket examples  please can you give me small example  using  
 fragment   ?

 jwcarman wrote:

 What's wrong with using a panel?  If this is to be done in only one
 class, have you thought about using a Fragment?

 On Thu, Oct 9, 2008 at 2:28 PM, miro [EMAIL PROTECTED] wrote:

 the label appears complex i looking for a simple solution

 My custom componentuses wicket components internally  here is an
 example

   protected class CustomLinkComponent extends   
 WebMarkupContainer  {
   String displayName;
   Class  clazz;
   public CustomLinkComponent(String displayName, Class
 clazz) {
   super(customlink);
   this.displayName=displayName;
   this.clazz=clazz;
   add(getBookmarkablePageLink());
   add(getDisplayNameLabel());
   }
   protected BookmarkablePageLink   
 getBookmarkablePageLink(){
   return new BookmarkablePageLink(link,  
 clazz);
   }
   protected  Label  getDisplayNameLabel(){
   return new Label(lbl,displayName);
   }

   }

 the html  for this is
 # label wicket:id=lbl/label

 so instead of writing a html page  i want my component to render  
 this
 html
 and further wicket should replace the child components  link and  
 lbl with
 actual values  ,  can I do this ?




 jwcarman wrote:

 Sure.  Look at what the Label class does.  It doesn't have an HTML
 template.

 On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:

 like I have  very little html and I dont want a write a  new .html
 file
 and
 just in my component i want to override some method  which  
 returns html
 as
 string  for the component .Is  this possible ?
 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 -- 
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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

-- 
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19907547.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: html code in component class

2008-10-09 Thread miro

here the html again


spant wicket:id=custmenu
   ult
lit wicket:id=repater
/lit
   /ult
/spant
hml for repeater

spant wicket:id=customlink
At href=# 
wicket:id=linklabelt wicket:id=lbl/label 

please ignore t with every tag its just to show actual html

miro wrote:
 
 Its not just label   here is the html
 
   
  ul
   li wicket:id=repater
   /li
  /ul
   
 hml for repeater
 
   
# label 
 wicket:id=lbl/label 
   
 
 
 instead of writing the same html  at 10 paqlces  i want to write it once
 and reuse it in the please twell me how ?
 
 
 
 Peter Ertl-3 wrote:
 
 If it's just a line use Label
 
 Am 09.10.2008 um 21:01 schrieb miro:
 

 Using panel I have to write a .html   file which I dont want to do  
 becasue my
 html code is very little just a line   ,
 next option is Fragment but this is not clear, neither the api doc  
 nor the
 wicket examples  please can you give me small example  using  
 fragment   ?

 jwcarman wrote:

 What's wrong with using a panel?  If this is to be done in only one
 class, have you thought about using a Fragment?

 On Thu, Oct 9, 2008 at 2:28 PM, miro [EMAIL PROTECTED] wrote:

 the label appears complex i looking for a simple solution

 My custom componentuses wicket components internally  here is an
 example

   protected class CustomLinkComponent extends   
 WebMarkupContainer  {
   String displayName;
   Class  clazz;
   public CustomLinkComponent(String displayName, Class
 clazz) {
   super(customlink);
   this.displayName=displayName;
   this.clazz=clazz;
   add(getBookmarkablePageLink());
   add(getDisplayNameLabel());
   }
   protected BookmarkablePageLink   
 getBookmarkablePageLink(){
   return new BookmarkablePageLink(link,  
 clazz);
   }
   protected  Label  getDisplayNameLabel(){
   return new Label(lbl,displayName);
   }

   }

 the html  for this is
 # label wicket:id=lbl/label

 so instead of writing a html page  i want my component to render  
 this
 html
 and further wicket should replace the child components  link and  
 lbl with
 actual values  ,  can I do this ?




 jwcarman wrote:

 Sure.  Look at what the Label class does.  It doesn't have an HTML
 template.

 On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:

 like I have  very little html and I dont want a write a  new .html
 file
 and
 just in my component i want to override some method  which  
 returns html
 as
 string  for the component .Is  this possible ?
 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 -- 
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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

-- 
View this message in context: 
http://www.nabble.com/html-code-in-component-class-tp19903944p19907604.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To 

RE: html code in component class

2008-10-09 Thread Serkan Camurcuoglu
Peter means that you can put html as the string content of a label like this:

Label l = new Label(myLabel, ulliSome html here/li/ul);
l.setEscapeModelStrings(false);
l.setRenderBodyOnly(true);

this way the label will display only the html that you've given..



-Original Message-
From: miro [mailto:[EMAIL PROTECTED]
Sent: Fri 10/10/2008 12:20 AM
To: users@wicket.apache.org
Subject: Re: html code in component class
 

here the html again


spant wicket:id=custmenu
   ult
lit wicket:id=repater
/lit
   /ult
/spant
hml for repeater

spant wicket:id=customlink
At href=# 
wicket:id=linklabelt wicket:id=lbl/label 

please ignore t with every tag its just to show actual html

miro wrote:
 
 Its not just label   here is the html
 
   
  ul
   li wicket:id=repater
   /li
  /ul
   
 hml for repeater
 
   
# label 
 wicket:id=lbl/label 
   
 
 
 instead of writing the same html  at 10 paqlces  i want to write it once
 and reuse it in the please twell me how ?
 
 
 
 Peter Ertl-3 wrote:
 
 If it's just a line use Label
 
 Am 09.10.2008 um 21:01 schrieb miro:
 

 Using panel I have to write a .html   file which I dont want to do  
 becasue my
 html code is very little just a line   ,
 next option is Fragment but this is not clear, neither the api doc  
 nor the
 wicket examples  please can you give me small example  using  
 fragment   ?

 jwcarman wrote:

 What's wrong with using a panel?  If this is to be done in only one
 class, have you thought about using a Fragment?

 On Thu, Oct 9, 2008 at 2:28 PM, miro [EMAIL PROTECTED] wrote:

 the label appears complex i looking for a simple solution

 My custom componentuses wicket components internally  here is an
 example

   protected class CustomLinkComponent extends   
 WebMarkupContainer  {
   String displayName;
   Class  clazz;
   public CustomLinkComponent(String displayName, Class
 clazz) {
   super(customlink);
   this.displayName=displayName;
   this.clazz=clazz;
   add(getBookmarkablePageLink());
   add(getDisplayNameLabel());
   }
   protected BookmarkablePageLink   
 getBookmarkablePageLink(){
   return new BookmarkablePageLink(link,  
 clazz);
   }
   protected  Label  getDisplayNameLabel(){
   return new Label(lbl,displayName);
   }

   }

 the html  for this is
 # label wicket:id=lbl/label

 so instead of writing a html page  i want my component to render  
 this
 html
 and further wicket should replace the child components  link and  
 lbl with
 actual values  ,  can I do this ?




 jwcarman wrote:

 Sure.  Look at what the Label class does.  It doesn't have an HTML
 template.

 On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:

 like I have  very little html and I dont want a write a  new .html
 file
 and
 just in my component i want to override some method  which  
 returns html
 as
 string  for the component .Is  this possible ?
 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 -- 
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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

Re: How can I use the wicketdate-time stuff with DateTime on my model?

2008-10-09 Thread Ned Collyer

I was hoping to wait for the next milestone to see what the fallout of all
the generics mods are.

The change between m1, m2, and m3 were significant.
Is it staying as it is in m3? (Ive checked the generics page on the wiki).

Rgds

Ned


Martijn Dashorst wrote:
 
 First, please upgrade to 1.4-m3. This is the future direction of
 Wicket, and has a lot of fixes and patches applied. You should not
 base your application on 1.4-m1.
 
 Martijn
 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-use-the-wicketdate-time-stuff-with-DateTime-on-my-model--tp19872583p19907839.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



AjaxButton submit url

2008-10-09 Thread Michael Oswell
I am curious if it is possible to change the URL that is used for the  
XMLHttpRequest so that I can force a form on a non-SSL enabled page to  
post to an SSL url.
In this particular case, I have a non-secure page with a login panel  
on it.  The form in the panel is using an AjaxButton for form  
submission, and I would like to have it post the login request over  
SSL so need to change the URL used in the request.


Possible?

thanks,

-- Mike

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



Re: Closing ModalWindow using javascript:window.close()

2008-10-09 Thread rmorrisey

RG,

I think that you can use top.window.close() if you are trying to close the
entire page. window.close() probably isn't working because ModalWindow uses
an IFRAME if I remember correctly.

If you want to close only the ModalWindow and not the entire window, I would
take a look at how it's done in ModalWindow.closeCurrent(AjaxRequestTarget).

HTH,
Russell


nanotech wrote:
 
 Hi,
 
 In my project there is a modal window.In event of WicketRuntimeException
 it goes to custom Internal Error page. That Page has a button which
 overrides onComponetTag method and  attaches javascript:window.close()
 with onclick event. So that user can close the modal window.(I don't
 want user to use [X] button in right top corner so I have hidden that
 button through CSS). The problem is this [javascript:window.close() ] does
 not close modal window but it does work in regaular page.(i.e. if
 execption occurs on a regualr page then after the request is forwarded to
 Custom Internal error page then user is able to click on close button and
 the browser window closes.)
 
 Can some one please suggest me how to achieve this is modal window.
 
 Thanks,
 RG   
 

-- 
View this message in context: 
http://www.nabble.com/Closing-ModalWindow-using-javascript%3Awindow.close%28%29-tp19860774p19908897.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



CryptedUrlWebRequestCodingStrategy and bookmarkable page components

2008-10-09 Thread Ritesh Trivedi

Hi,

I am using CryptedUrlWebRequestCodingStrategy, which uses http session key
for crypting urls. I noticed an issue with this

Lets say customer was on the bookmarkable page and left that open for time
longer than the session expiration time. Now if the bookmarkable page has
components like DropDownLists or StatelessForms they wont really work
because the session was expired and they see a error page from the
bookmarkable page!! not very pleasant.

Am I correct in the diagnosis? if yes, would the solution be to create a
subclass of cryptedurlwebrequestcodingstrategy which would not crypt the url
if the parent of the component was bookmarkable page? or are there any
better ways of handling this?
-- 
View this message in context: 
http://www.nabble.com/CryptedUrlWebRequestCodingStrategy-and-bookmarkable-page-components-tp19909583p19909583.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: how to customize error message of requiredtextfield inside listview

2008-10-09 Thread freak182


Thanks igor it works. :)

Thanks a lot.
Cheers.


igor.vaynberg wrote:
 
 Required=${label} is required
 
 textfield.setlabel(new model(question +item.getindex()));
 
 -igor
 
 On Thu, Oct 9, 2008 at 2:16 AM, freak182 [EMAIL PROTECTED] wrote:

 Hello,

 My problem is how to customize error message of requiredtextfield inside
 listview? here is the scenario: i have a requiredtextfield in the
 listview,
 of course the listview is inside the form. actually it is dynamic
 question 
 answer that came from DB. now if the user did not answer the question
 number
 1 provided it should display an error Please answer the Question for
 number
 1 and so on...And suppose i have 5 question how i can determine which
 question is not answered.

 i already do this: arcotForm.qasetup.3.question.Required=Please enter
 Question 4

 when there is 2 question that left empty the error displayed: Please
 enter
 Question 4 (2x)

 Thanks a lot.

 Cheers.

 --
 View this message in context:
 http://www.nabble.com/how-to-customize-error-message-of-requiredtextfield-inside-listview-tp19895203p19895203.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/how-to-customize-error-message-of-requiredtextfield-inside-listview-tp19895203p19910696.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Problem with upload (works on xp, error on linux)

2008-10-09 Thread Timo Rantalaiho
On Thu, 09 Oct 2008, Herbert Winter wrote:
 * I pointed the upload dir to a dir in my home-dir with no
 writepermissions, no luck of course
 * I pointed the upload dir to a dir in my home-dir WITH
 writepermissions, no luck again

Did you check out the security policy settings in Tomcat?

Does the problem occur with Jetty or Winstone?

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread Timo Rantalaiho
On Thu, 09 Oct 2008, Lutz Müller wrote:
 It might work if you dont have any ajax on your page. otherwise each ajax 
 call 
 happens in a new request and causes your domain object to be retrieved from 
 the database.
 this way you lose every change made to your object. writing all changes to 
 database before detaching can be an option, but then you might persist 
 something to your datastore that is in the midst of being edited.
 i would be glad to offer a solution to the problems i just brought up, but i 
 am struggling with this problem ever since i started using wicket.

The best is if you can use autosave and just persist everything
(valid) always. Often this (combined with undo when needed) is
also a good solution for the user.

If not, at least we are not using detachable models in places 
where editing needs to span several requests.

Other option would be to use separate data transfer object 
style form beans.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Re: markup for component extending RadioGroup?

2008-10-09 Thread Timo Rantalaiho
On Thu, 09 Oct 2008, dukehoops wrote:
 Is the lesson here to only extend Panels (or FormComponentPanels) when
 creating custom components that simply encapsulate other components?

WebMarkupContainer, actually (Panel is fine if you want to 
enforce the component to have its own HTML). 

Does this cause a problem?

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Re: Ajax update DefaultDataTable using textfield

2008-10-09 Thread Timo Rantalaiho
On Thu, 09 Oct 2008, taygolf wrote:
 Basically what I want to do is have a textfield on my page. when the user
 types a letter in the textfield I want to take that letter and update the
 query that I send to my dataprovider. The dataprovider will then update the
 DefaultDataTable.
 
 I have place the DefaultDataTable in a WebMarkupContainer and I am updating
 the query and then calling then setting the DefaultDataTable to the new
 provider and the adding the WebMarkupContainer to the target of the
 AjaxFormComponentUpdatingBehavior but it does not seem to want to work. All
 of this is in a panel which might be causing some issues I am not sure.

It should be fine, we've done something like this using
DataView (for easier customising). 

To help you it would be important to have the problem in a
runnable quickstart (or at least see the code).

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Re: Hibernate + HTML-Table

2008-10-09 Thread Michael O'Cleirigh

Hi Björn-Peter,

Have a look at DefaultDataTable which is part of the wicket-extensions 
module



|*DefaultDataTable 
http://wicket.sourceforge.net/wicket-extensions/apidocs/wicket/extensions/markup/html/repeater/data/table/DefaultDataTable.html#DefaultDataTable%28java.lang.String,%20wicket.extensions.markup.html.repeater.data.table.IColumn%5B%5D,%20wicket.extensions.markup.html.repeater.util.SortableDataProvider,%20int%29*(java.lang.String id, 
IColumn 
http://wicket.sourceforge.net/wicket-extensions/apidocs/wicket/extensions/markup/html/repeater/data/table/IColumn.html[] columns, 
SortableDataProvider 
http://wicket.sourceforge.net/wicket-extensions/apidocs/wicket/extensions/markup/html/repeater/util/SortableDataProvider.html dataProvider, 
int rowsPerPage)|


you put the Hibernate stuff into a service layer (so you can use the 
spring @Transactional annotation) and then have that called through your 
implementation of the SortableDataProvider.


The IColumn's define the columns that will appear in the table.

If you have a small number of results you could extract seperately and 
use the ListDataProvider (java.util.List list) to provide data for the 
table.


If you have a large data set you should implement your own version that 
pages through hibernate. add one of the toolbars to get this pagination 
functionality automatically. (dataTable.addTopToolbar (new 
NavigationToolbar()))


Regards,

Mike





I want to execute a simple sql-count-query with a group by statement 
and display the result in a html-table...


something like:
   session = 
HibernateUtil.getSessionFactory().getCurrentSession();

   session.beginTransaction();
   String SQL_QUERY = SELECT COUNT(*),Date FROM Person Group 
By Date;

   Query query = session.createQuery(SQL_QUERY);


What is the best way to manage that, not using too much fancy stuff...?

Cheers B

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




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



Re: How can I use the wicketdate-time stuff with DateTime on my model?

2008-10-09 Thread Patrick Angeles

We use DateTime/LocalDate in our entities as well. It's easy enough to roll
your own form components.

See the patch and zip file attached to this issue, you can probably just put
those classes in your own project and run with it.

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

The patch is meant to handle java.util.Date, and Joda DateTime and LocalDate
all at the same time. Now that Wicket FormComponents are generic though, I
think it's better to just have separate FormComponents and Converters for
each class.


Ned Collyer wrote:
 
 Its a requirement for me that my domain entities have DateTime.
 
 I'd like to use wicket-datetime (as described here)
 http://www.nabble.com/my-domain-model-and-Joda-Time-td15660961.html#a15660961
 
 I can see its internals are all DateTimey which is AWESOME!!
 
 What is the easiest / quickest way of getting this stuff to work with
 DateTime in my domain model.
 
 I'm running 1.4m1.
 
 What I'm toying with is compiling the project and applying the patch from
 http://issues.apache.org/jira/browse/WICKET-466
 
 But I'd rather have a simpler way - eg, extend or reimplement a class.
 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-use-the-wicketdate-time-stuff-with-DateTime-on-my-model--tp19872583p19911816.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket + spring + jpa/ hibernate = lazy load exception

2008-10-09 Thread James Carman
Are we talking about a wizard here?  What if you used something like this:

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/model/proxy/ProxyModelManager.java

Basically, the models cache their values until you call commit on
the ProxyModelManager.  So, you can do as many steps in the wizard as
you want and if you base your components on proxied models (that wrap
PropertyModels around a LoadableDetachableModel), then your object
will only be loaded from the database at the end (during the commit
of the proxy models) and you won't lose your edits.

On Thu, Oct 9, 2008 at 10:37 PM, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Thu, 09 Oct 2008, Lutz Müller wrote:
 It might work if you dont have any ajax on your page. otherwise each ajax 
 call
 happens in a new request and causes your domain object to be retrieved from
 the database.
 this way you lose every change made to your object. writing all changes to
 database before detaching can be an option, but then you might persist
 something to your datastore that is in the midst of being edited.
 i would be glad to offer a solution to the problems i just brought up, but i
 am struggling with this problem ever since i started using wicket.

 The best is if you can use autosave and just persist everything
 (valid) always. Often this (combined with undo when needed) is
 also a good solution for the user.

 If not, at least we are not using detachable models in places
 where editing needs to span several requests.

 Other option would be to use separate data transfer object
 style form beans.

 Best wishes,
 Timo

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 

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



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



Re: Hibernate + HTML-Table

2008-10-09 Thread James Carman
Wicketopia has an example application that does what you want.  The
HomePage (which shows a sortable table) is here:

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java


On Thu, Oct 9, 2008 at 4:41 PM, Björn-Peter Tietjens [EMAIL PROTECTED] wrote:
 Hey there,

 I want to execute a simple sql-count-query with a group by statement and
 display the result in a html-table...

 something like:
   session = HibernateUtil.getSessionFactory().getCurrentSession();
   session.beginTransaction();
   String SQL_QUERY = SELECT COUNT(*),Date FROM Person Group By
 Date;
   Query query = session.createQuery(SQL_QUERY);


 What is the best way to manage that, not using too much fancy stuff...?

 Cheers B

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



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