You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by newbieabc <ne...@yahoo.com> on 2008/10/03 17:21:39 UTC

Re: Create "Contact Us" Page

Thank you. I was able to successfully use JavaMail API for the Contact page.
I have another question related to the page, I'm not sure if I should ask it
in this thread or not...

I had done the rough page , and now that it works, started adding the
validations, to make sure required data in entered.

Some how the setRequired and EmailAddressValidators keep throwing errors if
I leave those fields blank.
I've put in a feedback panel, but instead of just showing a feedback
message, the page shows the exceptions....I'm not sure why.
If I don't use validators, the page runs fine, whether I enter data or
not...
Any ideas?

Thanks


jwcarman wrote:
> 
> Take a look at form processing and perhaps the JavaMail API (or Apache
> Commons Email for a simpler API).
> 
> On Wed, Sep 17, 2008 at 2:35 PM, newbieabc <ne...@yahoo.com> wrote:
>>
>> I'd like to create a "Contact Us" (by email) page, that lets users send
>> their
>> inquiries directly from the web page to an email address, without using
>> outlook.
>> Could someone give me some direction on how to go about doing this in
>> wicket?
>>
>> Thank you.
>> --
>> View this message in context:
>> http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19538477.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19799961.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Create "Contact Us" Page

Posted by Gabriel Bucher <ga...@gmail.com>.
and what is the exception you get?


newbieabc wrote:
> Thank you. I was able to successfully use JavaMail API for the Contact page.
> I have another question related to the page, I'm not sure if I should ask it
> in this thread or not...
> 
> I had done the rough page , and now that it works, started adding the
> validations, to make sure required data in entered.
> 
> Some how the setRequired and EmailAddressValidators keep throwing errors if
> I leave those fields blank.
> I've put in a feedback panel, but instead of just showing a feedback
> message, the page shows the exceptions....I'm not sure why.
> If I don't use validators, the page runs fine, whether I enter data or
> not...
> Any ideas?
> 
> Thanks
> 
> 
> jwcarman wrote:
>> Take a look at form processing and perhaps the JavaMail API (or Apache
>> Commons Email for a simpler API).
>>
>> On Wed, Sep 17, 2008 at 2:35 PM, newbieabc <ne...@yahoo.com> wrote:
>>> I'd like to create a "Contact Us" (by email) page, that lets users send
>>> their
>>> inquiries directly from the web page to an email address, without using
>>> outlook.
>>> Could someone give me some direction on how to go about doing this in
>>> wicket?
>>>
>>> Thank you.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19538477.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
> 


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


Re: Create "Contact Us" Page

Posted by newbieabc <ne...@yahoo.com>.
Thanks!
Worked great :-)

Timo Rantalaiho wrote:
> 
> On Tue, 07 Oct 2008, newbieabc wrote:
>> I have another related question...
> 
> Often it's a good idea to start a new thread with a 
> descriptive subject for new questions.
> 
>> I want to change one of  the Contact page form component's visibility
>> property based in a parameter I set in another page.
>> 
>> Is there a page onLoad function or something where I can check the
>> parameter
>> value and then change visibility of the component? If yes.. then where is
>> it
>> called? Or how? When ever I try to check the parameter value within the
>> page
>> constructor, I get a NullPointerException, but when the parameter is used
>> for other things , like from a method called within the the Form
>> onSubmit()
>> there doesn't seem to be any problems.
> 
> Constructor is only called on construction, not rendering. 
> 
> You have at least a couple of options;
> 
>   FormComponent myComponentWithConditionalVisibility = new
> TextField("foo") { 
>       @Override
>       public boolean isVisible() {
>           return fooFieldShouldBeBVisible();
>       }
>   }
> 
> or
> 
>   FormComponent myComponentWithConditionalVisibility = new
> TextField("foo") { 
>       @Override
>       public void onBeforeRender() {
>           setVisible(fooFieldShouldBeVisible());
>       }
>   }
> 
> 
> Best wishes,
> Timo
> 
> -- 
> Timo Rantalaiho           
> Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19883975.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Create "Contact Us" Page

Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Tue, 07 Oct 2008, newbieabc wrote:
> I have another related question...

Often it's a good idea to start a new thread with a 
descriptive subject for new questions.

> I want to change one of  the Contact page form component's visibility
> property based in a parameter I set in another page.
> 
> Is there a page onLoad function or something where I can check the parameter
> value and then change visibility of the component? If yes.. then where is it
> called? Or how? When ever I try to check the parameter value within the page
> constructor, I get a NullPointerException, but when the parameter is used
> for other things , like from a method called within the the Form onSubmit()
> there doesn't seem to be any problems.

Constructor is only called on construction, not rendering. 

You have at least a couple of options;

  FormComponent myComponentWithConditionalVisibility = new TextField("foo") { 
      @Override
      public boolean isVisible() {
          return fooFieldShouldBeBVisible();
      }
  }

or

  FormComponent myComponentWithConditionalVisibility = new TextField("foo") { 
      @Override
      public void onBeforeRender() {
          setVisible(fooFieldShouldBeVisible());
      }
  }


Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

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


Re: Create "Contact Us" Page

Posted by newbieabc <ne...@yahoo.com>.
I put in a Properties File and that took care of everything.
Thanks all...

I have another related question...
I want to change one of  the Contact page form component's visibility
property based in a parameter I set in another page.

Is there a page onLoad function or something where I can check the parameter
value and then change visibility of the component? If yes.. then where is it
called? Or how? When ever I try to check the parameter value within the page
constructor, I get a NullPointerException, but when the parameter is used
for other things , like from a method called within the the Form onSubmit()
there doesn't seem to be any problems.

Thanks 


Nino.Martinez wrote:
> 
> emailvalidator + required = no exceptions.. :)
> 
> newbieabc wrote:
>> Thank you. I was able to successfully use JavaMail API for the Contact
>> page.
>> I have another question related to the page, I'm not sure if I should ask
>> it
>> in this thread or not...
>>
>> I had done the rough page , and now that it works, started adding the
>> validations, to make sure required data in entered.
>>
>> Some how the setRequired and EmailAddressValidators keep throwing errors
>> if
>> I leave those fields blank.
>> I've put in a feedback panel, but instead of just showing a feedback
>> message, the page shows the exceptions....I'm not sure why.
>> If I don't use validators, the page runs fine, whether I enter data or
>> not...
>> Any ideas?
>>
>> Thanks
>>
>>
>> jwcarman wrote:
>>   
>>> Take a look at form processing and perhaps the JavaMail API (or Apache
>>> Commons Email for a simpler API).
>>>
>>> On Wed, Sep 17, 2008 at 2:35 PM, newbieabc <ne...@yahoo.com> wrote:
>>>     
>>>> I'd like to create a "Contact Us" (by email) page, that lets users send
>>>> their
>>>> inquiries directly from the web page to an email address, without using
>>>> outlook.
>>>> Could someone give me some direction on how to go about doing this in
>>>> wicket?
>>>>
>>>> Thank you.
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19538477.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> -- 
> -Wicket for love
> 
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19858740.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Create "Contact Us" Page

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
emailvalidator + required = no exceptions.. :)

newbieabc wrote:
> Thank you. I was able to successfully use JavaMail API for the Contact page.
> I have another question related to the page, I'm not sure if I should ask it
> in this thread or not...
>
> I had done the rough page , and now that it works, started adding the
> validations, to make sure required data in entered.
>
> Some how the setRequired and EmailAddressValidators keep throwing errors if
> I leave those fields blank.
> I've put in a feedback panel, but instead of just showing a feedback
> message, the page shows the exceptions....I'm not sure why.
> If I don't use validators, the page runs fine, whether I enter data or
> not...
> Any ideas?
>
> Thanks
>
>
> jwcarman wrote:
>   
>> Take a look at form processing and perhaps the JavaMail API (or Apache
>> Commons Email for a simpler API).
>>
>> On Wed, Sep 17, 2008 at 2:35 PM, newbieabc <ne...@yahoo.com> wrote:
>>     
>>> I'd like to create a "Contact Us" (by email) page, that lets users send
>>> their
>>> inquiries directly from the web page to an email address, without using
>>> outlook.
>>> Could someone give me some direction on how to go about doing this in
>>> wicket?
>>>
>>> Thank you.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19538477.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>     
>
>   

-- 
-Wicket for love

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


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