How to stop the request processing and write to reponse

2008-12-10 Thread [EMAIL PROTECTED]

I badly need a way to stop the default request processing and responding back
to the client by writing response to the HttpResponse direclty.

I have a page say ProfilePage, in the page constructor on a certain
condition I want to write something to HttpResponse and stop further
processing and respond to the client.

How can i achieve this? 
-- 
View this message in context: 
http://www.nabble.com/How-to-stop-the-request-processing-and-write-to-reponse-tp20932098p20932098.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]



Page expires on calling ModalWinow.close(target)

2008-10-16 Thread [EMAIL PROTECTED]

I have a modal window for uploading a picture. After uploading the image the
user is taken to a preview page inside a modal window itself and if the user
clicks on the button window.close(target) is called and i get a message
page expired. Please help!
-- 
View this message in context: 
http://www.nabble.com/Page-expires-on-calling-ModalWinow.close%28target%29-tp20012621p20012621.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]



Update ListView using AjaxLink

2008-10-04 Thread [EMAIL PROTECTED]

I want to update a listView using an ajx link. for that I put the listview
inside a WebMarkupContainer, The listView contains TextFileds and I want to
add more TextFields using AjaxLink. The problem I am facing is that the new
Textields are being added but if i enter sm value in a newly added textfield
and add one more textfield the data in the textfield is not preserved. Is
there a way to preserve the values in the textfields.
-- 
View this message in context: 
http://www.nabble.com/Update-ListView-using-AjaxLink-tp19810798p19810798.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, spring and aop

2008-04-03 Thread [EMAIL PROTECTED]
Hi there,

I'm just trying to integrate wicket 1.3.2, spring 2.0 and aspect oriented 
programming (spring-aop). I've an aspect for instrumenting a dao provider that 
is defined as follow:

@Aspect()
public class DaoProviderInstrumentation {

@Around(execution(* *(..))  target(org.mypackage.dao.DaoProvider))
public Object executeFinder(ProceedingJoinPoint pjp) throws Throwable {
   // stuff not important for now
}

A dao provider is intended to be an interface similar to the following:

public interface Daos extends DaoProvider{

 public AnimalDAO getAnimalDao();
}

where AnimalDAO is another interface with methods to retrieve animals. The 
instrumentation should get executed when i'm trying to access to the 
getAnimalDao() and it should create a proxy of animalDAO that exposes finder 
methods to retrieve animals using some conventions defined by name of the 
methods.

The instrumentation isn't executed. I know wicket is not managed but i like the 
wicket framework and it would be great to use integrate it but i don't know if 
it is possible and what is the correct way of doing it.
I've tried to use the SpringWebApplication in the wicket-spring package  but i 
don't know how to use it to integrate the instrumentation.

I don't need to inject components using the @SpringBean annotation.

Thanks for your time,


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



Add different component for treenode

2008-03-27 Thread [EMAIL PROTECTED]
Hi,

with newNodeComponent in the BaseTree class i can specify a different
component for my treenode, but this is the same for all node. Is it possible
setting different treenode component for added a different type of node in
my tree?

something like this:

protected Component newNodeComponent(String id, IModel model) {
if( node type a)
   return new component_a(id, model, tree);
   else if
   return new component_b(id, model, tree);
   else
   return new component_c(id, model, tree);
}

is it possible?

thk


Re: Copenhagen Meetup

2008-03-19 Thread [EMAIL PROTECTED]
If you can live with participation of a country neighbor, I'll gladely 
take a trip over the bridge.


/Jörgen

Flemming Boller skrev:

Hi

About the copenhagen meetup, should we arrange something around the 25 - 28
march?

At my workplace we are having a wicket course with one of the developers.

Perhabs we can persuade him to participate?


Nino, will you offer  for the meeting ?

/Flemming

  



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



form submit to popup

2008-03-10 Thread [EMAIL PROTECTED]

Hello folks.

Time for me to use the knowledge of the community again. Some background 
to enlighten my problem:


In a form I have a textarea and a few buttons (cancel, reload, update 
and preview). Upon creation I load into the textarea some html that is 
stored in the database.

The html is used as a template for creating emails. Eg:
html
body
Dear 'customername'.

bla bla
/body
/html

To the preview button is actually a BookmarkablePageLink created as 
suggested in the Linkomatic example (except that I have PageParameters 
as well) and it opens a popup.


PageParameters pp = new PageParameters();
pp.add(content, txtArea.getModelObjectAsString());
PopupSettings popupSettings = new 
PopupSettings(PageMap.forName(popuppagemap)).setHeight(500).setWidth(500);
add(new BookmarkablePageLink(popupButtonLink, Popup.class, 
pp).setPopupSettings(popupSettings));


Now, the problem is that the PageParameter is added at creation time, 
hence no matter what changes are made in the text area, I can not pass 
it to the Popup so that I can view the changes.


How can I make this happen?

Sorry if this is a stupid question, but bare with me, I'm just a newbie. 
Also, let me know if you need clarification.


TIA,
Jörgen

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



Re: form submit to popup

2008-03-10 Thread [EMAIL PROTECTED]

Igor, thanks for your reply.

To me it doesn't matter how it's done, as long as I can do it :)

Do you have any suggestion of a safer way?

/Jörgen


Igor Vaynberg skrev:

if you want this to work with a bookmarkable link then the only way to
do it is to use javascript to add textarea's content to the url. but
it isnt really safe to pass this on the url because those have a
character limit...

-igor


On Mon, Mar 10, 2008 at 2:36 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
  

Hello folks.

 Time for me to use the knowledge of the community again. Some background
 to enlighten my problem:

 In a form I have a textarea and a few buttons (cancel, reload, update
 and preview). Upon creation I load into the textarea some html that is
 stored in the database.
 The html is used as a template for creating emails. Eg:
 html
 body
 Dear 'customername'.

 bla bla
 /body
 /html

 To the preview button is actually a BookmarkablePageLink created as
 suggested in the Linkomatic example (except that I have PageParameters
 as well) and it opens a popup.

 PageParameters pp = new PageParameters();
 pp.add(content, txtArea.getModelObjectAsString());
 PopupSettings popupSettings = new
 PopupSettings(PageMap.forName(popuppagemap)).setHeight(500).setWidth(500);
 add(new BookmarkablePageLink(popupButtonLink, Popup.class,
 pp).setPopupSettings(popupSettings));

 Now, the problem is that the PageParameter is added at creation time,
 hence no matter what changes are made in the text area, I can not pass
 it to the Popup so that I can view the changes.

 How can I make this happen?

 Sorry if this is a stupid question, but bare with me, I'm just a newbie.
 Also, let me know if you need clarification.

 TIA,
 Jörgen

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





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


  



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



TextArea problems

2008-03-02 Thread [EMAIL PROTECTED]


Hi.

I have a form that contains a text area. I want to fill this with 
content fetch from a pojo.
I do this by form.add(new TextArea(xxx, new 
PropertyModel(myPojoInstans, content));


When running the app this screws things up.
Any components added before the TextArea are displayed correctly, but 
the content of the textarea will be the remainder of the html file.


Am I doing something wrong?

I have created a quickstart project, found here: 
http://www.jorgenpersson.se/TestTextArea2.tar.gz


TIA,
Jörgen

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



Re: TextArea problems

2008-03-02 Thread [EMAIL PROTECTED]

Thank Jay.

It's always so simple :)

/Jörgen


Jay Hogan skrev:

Hi Jörgen,

The textarea tag requires a close tag, rather than an open-close tag. Like
this:

form wicket:id=testTextAreaForm method=post
  textarea wicket:id=testTextArea rows=10 cols=30Content to be
replaced by wicket/textarea
/form

Cheers,
Jay

On Sun, Mar 2, 2008 at 6:01 AM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

  

Hi.

I have a form that contains a text area. I want to fill this with
content fetch from a pojo.
I do this by form.add(new TextArea(xxx, new
PropertyModel(myPojoInstans, content));

When running the app this screws things up.
Any components added before the TextArea are displayed correctly, but
the content of the textarea will be the remainder of the html file.

Am I doing something wrong?

I have created a quickstart project, found here:
http://www.jorgenpersson.se/TestTextArea2.tar.gz

TIA,
Jörgen

-
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]



Some questions - mainly about session expiration and serialization

2008-02-06 Thread [EMAIL PROTECTED]
Hi to all.

This is my first post, here's a quick introduction of
myself. My name is Fabrizio Giudici, I'm a senior architect
and I've been working with Wicket for a bit more than one
year.

I've recently upgraded to 1.3 (I was working with an 1.3
snapshot that dated back to a few months ago) and I've got a
project that is exiting from the prototype stage and
should go into production in a matter of weeks. I'm doing a
final review of the code, considering that some of the older
portions weren't probably very good (it is my first Wicket
project) and something changed with 1.3.

Here's my list of question - I apologize as I bet there's
something more or less trivial, of course I've already done
some searches around but I wasn't able to find good answers
(or I didn't understand them ;-) :

1. I've always experienced some sudden session expiration
problems with no apparent reason (I mean, the user wasn't
actually sleeping). But they happened only once in a while.
After upgrading to 1.3 they occur very often and they have
quickly become the issue on the top of the list and I've to
fix it immediately, since it's jeopardizing the acceptance
tests performed by my customer. I've already searched in
forums and tried some change (such as disabling versioning),
but I got no benefit from it.

2. I have a modal window used to enter a date (I can't use
the already provided component since this a special date)
that has been working from several months. After upgrading
to 1.3 it deterministically causes a session expired
whenever it's closed (since this is deterministic I bet it's
a different thing than the above).

3. I have still some confusion about serialization of things
in sessions. I've always got some objects that are not
serializable and caused tons of exceptions in log files, but
no harm other than it. I'm now wondering whether they can
trigger one of the above problems, and anyway before going
into production I'd like to face with this issue in a
definitive fashion. I know about the possibility of using
detachable objects, nevertheless I need first to understand
why this serialization thing can't be disabled - after all
I've got no need for clustering in near future (and if I
should do it, I'd probably go with Terracotta). Also, in
version 1.2 I once saw that there was a UserSession (?)
method that looked like it was useful for disabling
serialization, and I had a mental note about using it, but
it looks like it disappeared in 1.3.0. Hints?

Thanks in advance..

-- 
Fabrizio Giudici, Ph.D. - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
weblogs.java.net/blog/fabriziogiudici -
www.tidalwave.it/blog
[EMAIL PROTECTED] - mobile: +39 348.150.6941



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



i18n feedbackmessages

2007-10-23 Thread [EMAIL PROTECTED]

Hi, i wonder wether the
info(feedback message); could be internationalized, ie.
info(feedback.success); with a corresponding entry in the xyz.properties.
is there a workaround?
thanks very much,
best regards, nico

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



Re: Wizard and PasswordTextField

2007-10-23 Thread [EMAIL PROTECTED]

Hi Fernando,
i solved this be integrating the check into the onSubmit method:

   /**
* @see org.apache.wicket.markup.html.form.Form#onSubmit()
*/
   @Override
   public void onSubmit()
   {
   //validate the password fields...
   if (!(getModelObject() instanceof RegistrationFormInputModel)) {
   error(internal error);
   return;
   }
   RegistrationFormInputModel model = 
(RegistrationFormInputModel)getModelObject();


   String pw = model.getInpPassword();
   if (pw!=null) {
   if (pw.length()MIN_PASSWORD_LENGTH) {
   error(password to short);
   }
   if (pw.equals(model.getInpPasswordAgain())) {
   //password validation successful.
   } else {
  
   error(passwords do not match);

   }
   } else {
//you should comment out this one :)
   info(password: +model.getInpPassword()+  / 
+model.getInpPasswordAgain());

   //error(no password provided);
   }
[..]

regards, nico


Fernando Wermus schrieb:

In the Wizard example for singing up, I doesn't appear two PasswordTextField
to verify if both were completed with the same password. I imagine this is
something solved and then I was looking at google. At the same time it is
something easy. How can I solve by my self? Just a guide.

  



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



Re: updateing a component on AjaxTabbedPanel

2007-08-15 Thread [EMAIL PROTECTED]
The ajax tabbed panel should be an instance variable. Then you can use
target.addComponent(tabbedPanel).

2007/8/15, [EMAIL PROTECTED] [EMAIL PROTECTED]:
 Hi there,

 i am very new to wicket an got some problems while using a tree and a
 AjaxTabbedPanel.

 I want to update a simple label component at an AjaxTabbedPanel after the
 user click something at the tree.

 Here is my code:
 public class ConfirmPage extends WebPage{
 public ConfirmPage()
 {
 super();
 //user is a simple POJO
 User user = new User(test,test);

 //Elements for the Tree
 ListConsUnit consUnits = new ArrayListConsUnit();
 consUnits.add(new ConsUnit(Single));
 consUnits.add(new ConsUnit(General));
 consUnits.add(new ConsUnit());

 //simple label at the webpage
 label = new Label(luname,user.getUsername());
 add(label);

 //create the tree
 TreeModel tm = MyBaseTree.createTreeModel(consUnits);
 tree = new MyTree(tree,tm);
 add(tree);
 tree.getTreeState().collapseAll();


//create the tabs like the sample app
 tabs.add(new AbstractTab(new Model(first tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel(panelId);
 }
 });

 tabs.add(new AbstractTab(new Model(second tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel2(panelId);
 }
 });

 tabs.add(new AbstractTab(new Model(third tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel3(panelId);
 }
 });
 tpanel = new AjaxTabbedPanel(tabs, tabs);
 add(tpanel);
 add(new StyleSheetReference(pageCSS, getClass(),
 css/style.css));
 }

 Here is now the code from the tree:

 public class MyTree extends LinkTree{

 public MyTree(String arg0, TreeModel arg1) {
 super(arg0, arg1);
 }


 protected void onNodeLinkClicked(javax.swing.tree.TreeNode node,
 BaseTree tree, AjaxRequestTarget target)
 {

 //update the label on ConfimPage
 Label label = new Label(luname,node.toString());
 label.setOutputMarkupId(true);
 page.addOrReplace(label);
 target.addComponent(label);

 //how to update AjaxTabbedPanel???
 }
 }

 Here the code from MyPanel:

 public class MyPanel extends Panel{

 private Label label;

 public MyPanel(String id) {
 super(id);

 label = new Label(test, Text);
 label.setOutputMarkupId(true);
 this.add(label);

 }
 }

 The label at ConfirmPage is updated via Ajax if the user selects something
 from the tree, but not the label at the AjaxTabbedPanel.
 If the user selects something from the tree the label at MyPanel should be
 updated with the value of the tree node.
 How do i do this?

 With kind regards
 Fabian Hagen

 SN AG
 Klingenderstr. 5
 D 33100 Paderborn

 voice +49 5251/1581- 862
 fax   +49 5251/1581-71
 eMail [EMAIL PROTECTED]
 web   http://www.s-und-n.de

 Vorstand
 Klaus Beverungen
 Josef Tillmann

 Vorsitzender des Aufsichtsrates
 Heinz-Dieter Wendorff

 Handelsregister
 Amtsgericht Paderborn HRB 3270

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