Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Hi irakli81,

    please post your code in readable form. The Rich Text Editor in the forums works pretty well.

    Two things:
    • Use a different Criteria-constructor and no call to criteria.setAttribute().
    • Do not use Stored Functions and Stored Procedures if not absolutely necessary (scan the QSG for "stored procedure"). It is most likely not necessary for SELECTs. If you really have to, see this thread.
    Best regards
    Blama

    Comment


      #17
      can u tell in such situations criteria.setAttribute() is wrong decision?

      Comment


        #18
        hello all
        i have this code
        TextItem firstNameTextItem = new TextItem("firstName", "First Name");
        firstNameTextItem.setRequired(true);
        how can i set reqired snowflake indicator before "First Name"?

        Comment


          #19
          You mean instead of *after* "First Name"? So you already have the (*)?

          Comment


            #20
            Just noticed there is not star anywhere by default. See setRequiredTitlePrefix() and configure it together with setRequiredTitleSuffix() to match your liking.

            My is configured like this for bold + (*) to the right:
            Code:
                    DynamicForm df = new DynamicForm() {
                        {
                            setTitleSuffix(":");
                            setRequiredTitleSuffix("&nbsp;(*):</b>");
                        }
                    };
                    DynamicForm.setDefaultProperties(df);
            If you want the star to the left, you'll need setRequiredTitlePrefix().

            Best regards
            Blama

            Comment


              #21
              Originally posted by Blama View Post
              Just noticed there is not star anywhere by default. See setRequiredTitlePrefix() and configure it together with setRequiredTitleSuffix() to match your liking.

              My is configured like this for bold + (*) to the right:
              Code:
               DynamicForm df = new DynamicForm() {
              {
              setTitleSuffix(":");
              setRequiredTitleSuffix("&nbsp;(*):</b>");
              }
              };
              DynamicForm.setDefaultProperties(df);
              If you want the star to the left, you'll need setRequiredTitlePrefix().

              Best regards
              Blama
              thanks

              Comment


                #22
                hello
                i have following procedure in oracle
                create or replace procedure test_ika(p_value varchar2,p_return1 out number,p_return2 out varchar2) is
                begin
                insert into test_table t values(1,p_value);
                commit;
                p_return1:=1;
                p_return2:='done';
                end;
                what to write in ds.xml
                and how to call?

                Comment


                  #23
                  Hi irakli81,

                  please see these two threads, easily found via the search.
                  Note that this thread touches very different topics. Normal would be one thread per topic.

                  Best regards
                  Blama

                  Comment


                    #24
                    hi
                    so for in out procedure i have to use SQLTransaction? its isomorphic interface there not similar smartgwt object?

                    Comment


                      #25
                      You have to try. Perhaps it is possible in .ds.xml with a fetch-operationBinding that SELECTS from a table function that calls a IN/OUT Stored Procedure.
                      But as I wrote, I did not try this.

                      Comment


                        #26
                        table function is function witch return table but procedure with in out parameter might be something like this:
                        test(param1 in number,param2 out varchar2,param3 out number)
                        in this case if i will execute procedure with dataSource.fetchdata, how i will get value of param2 and param3?

                        Comment


                          #27
                          Again, I did not try this, so I can only guess.
                          This is what is suggested in the other threads in a nutshell.

                          You could do a
                          Code:
                          <fields>
                          <field name="field1FromTheTableFunctionTable"/>
                          <field name="field2FromTheTableFunctionTable"/>
                          <field name="field3FromTheTableFunctionTable"/>
                          ...
                          </fields>
                          <operationBinding operationType="custom" operationId="execProcedure" sqlType="query">
                                      <customSQL>
                                          SELECT * FROM TABLE (wrapperFunction($values.INPUT1, $values.INPUT2, ...)).
                                      </customSQL>
                          </operationBinding>
                          Then have the Table Function call the Stored Procedure and return the OUT Parameters in the table fields.

                          Best regards
                          Blama

                          Comment


                            #28
                            so it seems instead of procedure with in out parameter i have to use in smartgwt function with ref cursor witch generates table.
                            i used to write programs in visual jsf 1.2 for several years and there i used CallableStatement.registerOutParameter, so i have to overwrite those procedures

                            Comment


                              #29
                              I don't know, you have to try.
                              Do you want to use the response of the SP in a ListGrid on the client and have the result in rows?
                              Or do you want to click a button on the client and return the response for a single call of the SP and display it in e.g. an SC.say() popup?

                              If the former, then I'd try the suggestion from #27, if the latter, you can do almost everything, including "normal" Java DB access inside a DMI. You would not have to change your existing code then, just call it.
                              See this thread and the linked sample from Isomorphic in it.

                              Best regards
                              Blama

                              Comment


                                #30
                                Hello
                                i have authorization issue, so it's separate button

                                Comment

                                Working...
                                X