see my code that not give me result

View: New views
4 Messages — Rating Filter:   Alert me  

see my code that not give me result

by mfa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


sir i use netbeans 6.1 with vwp form i

textfield Initial/defualt text value is 1 that i set from property


i use this code in

public void prerender() {
        try {
            this.getSessionBean1().getTripRowSet().setObject(1,textField1.getValue());
            tripDataProvider.refresh();
        }  catch (Exception e) {
              log("Cannot perform login for userid " , e);
            error("Cannot perform login for userid "  + e);
        }
    }



but when i run my project that not show me table with data

that page show this in browser page

<table id="form1:table1:_table" class="Tbl_sun4" width="100%" style="height: 120px;" border="0" cellpadding="0"




please give me idea how i get result and prameterise query result

thank you

aamir




Re: see my code that not give me result

by Winston Prakash :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You have bound a dataprovider with parameterized query to the table
component.

When you provide a value via the text field, the parameter will be set
and the table
would display the result. This happens when the page is posted back.

However, when the page is displayed for the first time, still the table
is bound to a
dataprovider with parameterized query. So you must set some initial
value at the
init() method.

Did you do that?

- Winston

> sir i use netbeans 6.1 with vwp form i
>
> textfield Initial/defualt text value is 1 that i set from property
>
>
> i use this code in
>
> public void prerender() {
>         try {
>            
> this.getSessionBean1().getTripRowSet().setObject(1,textField1.getValue());
>             tripDataProvider.refresh();
>         }  catch (Exception e) {
>               log("Cannot perform login for userid " , e);
>             error("Cannot perform login for userid "  + e);
>         }
>     }
>
>
>
> but when i run my project that not show me table with data
>
> that page show this in browser page
>
> <table id="form1:table1:_table" class="Tbl_sun4" width="100%" style="height:
> 120px;" border="0" cellpadding="0"
>
>
>
>
> please give me idea how i get result and prameterise query result
>
> thank you
>
> aamir
>
>
>
>
>  


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


Re: see my code that not give me result

by Rick Fincher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Aamir,

Is the table displaying at all (an empty table)?  In the visual editor
does the table show the column headers of the database table?

Rick


mfa wrote:

> sir i use netbeans 6.1 with vwp form i
>
> textfield Initial/defualt text value is 1 that i set from property
>
>
> i use this code in
>
> public void prerender() {
>         try {
>            
> this.getSessionBean1().getTripRowSet().setObject(1,textField1.getValue());
>             tripDataProvider.refresh();
>         }  catch (Exception e) {
>               log("Cannot perform login for userid " , e);
>             error("Cannot perform login for userid "  + e);
>         }
>     }
>
>
>
> but when i run my project that not show me table with data
>
> that page show this in browser page
>
> <table id="form1:table1:_table" class="Tbl_sun4" width="100%" style="height:
> 120px;" border="0" cellpadding="0"
>
>
>
>
> please give me idea how i get result and prameterise query result
>
> thank you
>
> aamir
>
>
>
>
>  


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


Re: see my code that not give me result

by Rick Fincher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Aamir,

Looks like you need to move your code in prerender() to init().

Rick

Winston Prakash wrote:

> You have bound a dataprovider with parameterized query to the table
> component.
>
> When you provide a value via the text field, the parameter will be set
> and the table
> would display the result. This happens when the page is posted back.
>
> However, when the page is displayed for the first time, still the
> table is bound to a
> dataprovider with parameterized query. So you must set some initial
> value at the
> init() method.
>
> Did you do that?
>
> - Winston
>> sir i use netbeans 6.1 with vwp form i
>> textfield Initial/defualt text value is 1 that i set from property
>>
>>
>> i use this code in
>> public void prerender() {
>>         try {
>>            
>> this.getSessionBean1().getTripRowSet().setObject(1,textField1.getValue());
>>
>>             tripDataProvider.refresh();
>>         }  catch (Exception e) {
>>               log("Cannot perform login for userid " , e);
>>             error("Cannot perform login for userid "  + e);
>>         }
>>     }
>>
>>
>>
>> but when i run my project that not show me table with data
>> that page show this in browser page
>>
>> <table id="form1:table1:_table" class="Tbl_sun4" width="100%"
>> style="height:
>> 120px;" border="0" cellpadding="0"
>>
>>
>>
>>
>> please give me idea how i get result and prameterise query result
>>
>> thank you
>>
>> aamir
>>
>>
>>
>>
>>  
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...


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

LightInTheBox - Buy quality products at wholesale price