You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by om...@polaris.co.in on 2009/05/18 11:56:22 UTC

newbie to click

Hi,
     I got started on click recently and building my first application. Iam
trying to build a custom form for my own bean. However, when I enter the
values and submit, I get the message
"You must select a value for Beanname". 'beanname' is a select in my Form
and the corresponding field in my domain object is 'beanname'. There are no
validations in my form. Could someone tell me how to solve this problem.

Regards,
V.Omprakash
Project Manager - Quark
CTOO
Chennai One, Extn: 8112
Mobile: 99406 82346




This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in


Re: newbie to click

Posted by Bob Schellink <sa...@gmail.com>.
Hi,

When setting the Select to required the first Option in the drop-down
list is assumed to be the non-selected (blank) value.

Put it differently, if the first Option in the drop-down is not a
blank then it doesn't make sense to use the required flag because the
user cannot deselect an Option.

See the Gender Select in this example:
http://www.avoka.com/click-examples/control/select-demo.htm

Hope this helps.

kind regards

bob

On 5/18/09, Adrian A. <a....@gmail.com> wrote:
>>      I got started on click recently and building my first application.
>> Iam
>> trying to build a custom form for my own bean. However, when I enter the
>> values and submit, I get the message
>> "You must select a value for Beanname". 'beanname' is a select in my Form
>> and the corresponding field in my domain object is 'beanname'. There are
>> no
>> validations in my form. Could someone tell me how to solve this problem.
> Can you post some sample code (and also the versions you use - click,
> jdk, libs, etc.)
> Otherwise seems too generic to "guess" what might be the problem :).
>
>


-- 
http://incubator.apache.org/click/

Re: ajax response

Posted by Bob Schellink <sa...@gmail.com>.
Hi,

omprakash.v@polaris.co.in wrote:
> 
> ajax-customer.htm -----> AjaxCustomer.java
> 
> The ajax-customer.htm contains the ajax response. What if I want to send
> forms as part of the response in ajax-customer.htm.


Have you tried to create a Form inside AjaxCustomer and rendering 
$form inside ajax-customer.htm? It should work since the Form renders 
valid XHTML content.

Initial work has been done around similar ideas at ClickClick[1] 
(check out the FormDemo) but is based on JQuery Taconite instead of 
Rico (which seemed to have been abandoned). Do note that ClickClick is 
in its inception phase right now so things are a bit rough :)

kind regards

bob

[1]: 
http://code.google.com/p/clickclick/source/browse/#svn/trunk/clickclick/jquery-examples/src/net/sf/clickclick/examples/jquery/page/ajax
[2]: http://malsup.com/jquery/taconite/

ajax response

Posted by om...@polaris.co.in.
Hi,
        Anybody knows how to do this. How do I get Ajax responses to
contain forms. It looks like forms are getting created in the java files by
using $form etc in the htm files.

My pageflow looks like this:


ajax-select.htm -----> AjaxSelect.java

<includes>

ajax-select-include.htm

<registers>

ajax-customer.htm -----> AjaxCustomer.java

The ajax-customer.htm contains the ajax response. What if I want to send
forms as part of the response in ajax-customer.htm.


Regards,
V.Omprakash
Project Manager - Quark
CTOO
Chennai One, Extn: 8112
Mobile: 99406 82346





                                                                           
             omprakash.v@polar                                             
             is.co.in                                                      
                                                                        To 
             05/20/2009 01:34          click-user@incubator.apache.org     
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: ajax response                   
             click-user@incuba                                             
              tor.apache.org                                               
                                                                           
                                                                           
                                                                           
                                                                           




Hi,
         Iam trying to use Click to provide a UI for my application. Since
I don not know how many forms will be needed, I am trying to dynamically
construct as many as are needed. I have got as far as getting the query the
user wishes to perform and its signature. How do I render the response so
it contains the right number of forms. The query signature may also have
java objects which I will have to inspect to get the field names and types
so I can create a control of the right type. Could someone please suggest
the right approach to this problem. Iam working with the ajax select
example to see if it can be modified.

Could someone who knows also enlighten me on the Rico response
type="object" and if it can be used for this problem.

Regards,
V.Omprakash
CTOO
Chennai One, Extn: 8112
Mobile: 99406 82346




This e-Mail may contain proprietary and confidential information and is
sent for the intended recipient(s) only.  If by an addressing or
transmission error this mail has been misdirected to you, you are requested
to delete this mail immediately. You are also hereby notified that any use,
any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its
attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in






This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in


Re: ajax response

Posted by om...@polaris.co.in.
Hi,
         Iam trying to use Click to provide a UI for my application. Since
I don not know how many forms will be needed, I am trying to dynamically
construct as many as are needed. I have got as far as getting the query the
user wishes to perform and its signature. How do I render the response so
it contains the right number of forms. The query signature may also have
java objects which I will have to inspect to get the field names and types
so I can create a control of the right type. Could someone please suggest
the right approach to this problem. Iam working with the ajax select
example to see if it can be modified.

Could someone who knows also enlighten me on the Rico response
type="object" and if it can be used for this problem.

Regards,
V.Omprakash
CTOO
Chennai One, Extn: 8112
Mobile: 99406 82346




This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in


Re: ajax response

Posted by "Adrian A." <a....@gmail.com>.
>     The ajax select example has a ajax-customer.htm file which displays the
> response. In my case, it is displaying the name of my domain object but the
> other fields are empty. I have checked that the data for
> all the fields is correctly retrieved from the table. Then why doesn't it
> get displayed? 
I hope you do realize that you need to post more details about your 
problem, like sample code, click/java version, server logs, browser 
error messages, etc.

> Can  anyone help?
1. Install FireBug in FireFox:
http://getfirebug.com/
to be able to debug/inspect Ajax requests.


2. Configure for your Click application the mode to "trace":
---------
<click-app ...>
   ..
   <mode value="trace">
</click-app>
---------
To be able to easily follow everything that happens in your application.

If the above still does not help you finding the problem, please post 
here more *concrete details* (telepathy is not our strength :) ).



ajax response

Posted by om...@polaris.co.in.
Hi,

    The ajax select example has a ajax-customer.htm file which displays the
response. In my case, it is displaying the name of my domain object but the
other fields are empty. I have checked that the data for
all the fields is correctly retrieved from the table. Then why doesn't it
get displayed? Can  anyone help?

Regards,
V.Omprakash
Project Manager - Quark
CTOO
Chennai One, Extn: 8112
Mobile: 99406 82346




This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in


Re: newbie to click

Posted by Malcolm Edgar <ma...@gmail.com>.
Hi,

Please see the Cayenne online documentation at:

http://cayenne.apache.org

If you have more specific questions about Cayenne, please write the
the Cayenne user group, they are very helpful. I have even seen them
turn around patches in 24 hours, try and get that support from a
commercial vendor.

Generally with Cayenne you use the Cayenne Modeller to generate your
database DDL statements and your Java objects.

regards Malcolm Edgar

On Tue, May 19, 2009 at 4:51 PM,  <om...@polaris.co.in> wrote:
> Hi,
>    How do I or where can I find information on how to access a db table
> using cayenne. Which class/API will generate the domain objects from the
> table. HSQLDB uses flat files if I remember. How do I point cayenne to my
> file.  Iam trying the ajax select example on my table and it is not
> returning anything.
>
> Regards,
> V.Omprakash
> Project Manager - Quark
> CTOO
> Chennai One, Extn: 8112
> Mobile: 99406 82346
>
>
>
>
>
>
>             Malcolm Edgar
>             <malcolm.edgar@gm
>             ail.com>                                                   To
>                                       click-user@incubator.apache.org
>             05/18/2009 05:02                                           cc
>             PM
>                                                                   Subject
>                                       Re: newbie to click
>             Please respond to
>             click-user@incuba
>              tor.apache.org
>
>
>
>
>
>
>
> Hi Omprakash,
>
> I was about to write the same thing as Bob.  I think the Select
> Javadoc needs to state this as I get this question a lot.
>
> regards Malcolm Edgar
>
> On Mon, May 18, 2009 at 8:07 PM, Adrian A. <a....@gmail.com> wrote:
>>>     I got started on click recently and building my first application.
> Iam
>>> trying to build a custom form for my own bean. However, when I enter the
>>> values and submit, I get the message
>>> "You must select a value for Beanname". 'beanname' is a select in my
> Form
>>> and the corresponding field in my domain object is 'beanname'. There are
>>> no
>>> validations in my form. Could someone tell me how to solve this problem.
>>
>> Can you post some sample code (and also the versions you use - click,
> jdk,
>> libs, etc.)
>> Otherwise seems too generic to "guess" what might be the problem :).
>>
>>
>
>
>
>
>
> This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polaris.co.in
>
>

Re: newbie to click

Posted by om...@polaris.co.in.
Hi,
    How do I or where can I find information on how to access a db table
using cayenne. Which class/API will generate the domain objects from the
table. HSQLDB uses flat files if I remember. How do I point cayenne to my
file.  Iam trying the ajax select example on my table and it is not
returning anything.

Regards,
V.Omprakash
Project Manager - Quark
CTOO
Chennai One, Extn: 8112
Mobile: 99406 82346





                                                                           
             Malcolm Edgar                                                 
             <malcolm.edgar@gm                                             
             ail.com>                                                   To 
                                       click-user@incubator.apache.org     
             05/18/2009 05:02                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: newbie to click                 
             Please respond to                                             
             click-user@incuba                                             
              tor.apache.org                                               
                                                                           
                                                                           
                                                                           




Hi Omprakash,

I was about to write the same thing as Bob.  I think the Select
Javadoc needs to state this as I get this question a lot.

regards Malcolm Edgar

On Mon, May 18, 2009 at 8:07 PM, Adrian A. <a....@gmail.com> wrote:
>>     I got started on click recently and building my first application.
Iam
>> trying to build a custom form for my own bean. However, when I enter the
>> values and submit, I get the message
>> "You must select a value for Beanname". 'beanname' is a select in my
Form
>> and the corresponding field in my domain object is 'beanname'. There are
>> no
>> validations in my form. Could someone tell me how to solve this problem.
>
> Can you post some sample code (and also the versions you use - click,
jdk,
> libs, etc.)
> Otherwise seems too generic to "guess" what might be the problem :).
>
>





This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in


error inserting record

Posted by om...@polaris.co.in.
Hi,
     When I try to load my data into the database during the server
startup, Iam getting the following error:

14:13:29,690 ERROR [STDERR] org.apache.cayenne.CayenneRuntimeException:
[v.2.0.4
 October 12 2007] Temporary ID hasn't been replaced on commit:
{<ObjectId:Query,
 TEMP:0000040A2919A216>; new; [index=>0; numparams=>3; beanname=>Card;
name=>Get
Suggestion]}

14:13:29,697 ERROR [STDERR]     at
org.apache.cayenne.access.DataDomainSyncBucke
t.postprocess(DataDomainSyncBucket.java:184)


Could someone tell me how to solve this problem.

Regards,
V.Omprakash
Project Manager - Quark
CTOO
Chennai One, Extn: 8112




This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in


db access using click - pls ignore earlier post

Posted by om...@polaris.co.in.
Hi,
    Never mind my earlier post. I found where it is happening.

Regards,
V.Omprakash
Project Manager - Quark
CTOO
Chennai One, Extn: 8112
Mobile: 99406 82346




This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in


Re: newbie to click

Posted by Malcolm Edgar <ma...@gmail.com>.
Hi Omprakash,

I was about to write the same thing as Bob.  I think the Select
Javadoc needs to state this as I get this question a lot.

regards Malcolm Edgar

On Mon, May 18, 2009 at 8:07 PM, Adrian A. <a....@gmail.com> wrote:
>>     I got started on click recently and building my first application. Iam
>> trying to build a custom form for my own bean. However, when I enter the
>> values and submit, I get the message
>> "You must select a value for Beanname". 'beanname' is a select in my Form
>> and the corresponding field in my domain object is 'beanname'. There are
>> no
>> validations in my form. Could someone tell me how to solve this problem.
>
> Can you post some sample code (and also the versions you use - click, jdk,
> libs, etc.)
> Otherwise seems too generic to "guess" what might be the problem :).
>
>

Re: newbie to click

Posted by "Adrian A." <a....@gmail.com>.
>      I got started on click recently and building my first application. Iam
> trying to build a custom form for my own bean. However, when I enter the
> values and submit, I get the message
> "You must select a value for Beanname". 'beanname' is a select in my Form
> and the corresponding field in my domain object is 'beanname'. There are no
> validations in my form. Could someone tell me how to solve this problem.
Can you post some sample code (and also the versions you use - click, 
jdk, libs, etc.)
Otherwise seems too generic to "guess" what might be the problem :).