1 2 Previous Next 23 Replies Latest reply on Mar 6, 2013 12:37 PM by Laurent Matheo Go to original post
      • 15. Re: Field Length On SR
        Laurent Matheo

        No problem

        If I get some time tomorrow I'll try to see that

        • 16. Re: Field Length On SR
          Laurent Matheo

          Hi

          Ok let me show you a little example on how I do that, I show you the whole process

           

           

          In I°) I'll make basic references I'll use in II°).

           

           

          0°) Tools:
          You'll need (tools I used, feel free to use yours)

           


          I°) Working with Get the SRMSServiceRequestBrowser.jar file:
          1°) get it:
          Login with an administrator user in aruser and go to form "Data Visualization Module" and search for record "SRMSServiceRequestBrowser" and download the attached file "SRMSServiceRequestBrowser.jar":
          01.png

           

          Rename the jar extension to zip and unzip into a folder using 7zip (right click and unzip).


          2°) create a new jar file:
          Select all the folders as in picture and zip it.
          05.png

           

          Then rename the zip extension to jar.


          3°) upload a new version:
          a°) aruser part:
          Login with an administrator user in aruser and go to form "Data Visualization Module" and search for record "SRMSServiceRequestBrowser".
          Delete the attached file, save the record.
          02.png

          03.png

           

          Add the new attachement you created and save.
          04.png

          06.png

          07.png

           


          b°) Mid-tier part:

          You need to stop Tomcat.
          Empty Tomcat's "work" and "temp" folders.
          Empty folders "/arsys/cache/", "/arsys/PluginsCache/", "/arsys/PluginDefsCache/".
          Start Tomcat.


          c°) web browser part:
          Empty your web browser cache.


          d°) test:
          Well... Test

           

           

          II°) ok let's get to work :):
          Get the jar file (see I°) 1°)).

          First of all, I create a dummy SRD and a standard question:
          01.png

           

          Then I look at it (request entry):
          02.png

           

          And I display the source code in the web browser (depends on the web browser, in IE it's right click and "Display source" or something):
          I easily can find my question there:
          03.png

          I copy / paste it into a text editor for ease of mind (here notepad++, free):
          and I search in the ".st" files (from the extracted jar file) a part I think will be easy to find:
          and I find it!
          04.png


          I open the .st file, as you can see, the size is supposed to be "40" (check how width is defined for textarea here (http://www.w3schools.com/tags/tag_textarea.asp), it works with "cols" attribute):
          05.png

           

          So for a test I change from 40 to 5 and save the file:
          06.png

           

          I re-create the .jar file, upload it and clear the caches (see I°) 2°)).

           

          I test, as you can see, it fails :p, but why?
          02.png

           

          If I look into the source code of the page, I can see my modification so why isn't it into "5"?
          07.png

           

          It's because, in addition to the cols="5" there is also a "style" defined (class), so let's find it in a ".css" file:
          08.png

           

          I find it (in a .css file of course), as you can see, it "overwrites" the cols="5" with the width set to 50%.
          09.png

           

          So as a test, I change the class name to something I know doesn't exist:
          10.png

           

          I re-create the .jar file, upload it and clear the caches (see I°) 2°)).

           

          Win! This time it took the cols="5"!
          11.png

          • 17. Re: Field Length On SR
            Sylvain YVON

            Laurent you rock as always.

            I would not change the DVP though unless there is really no other choice, and for a very important reason. This is the kind of changes that is very hard to track and can be a pain in the .. hmm ... ARS, for the future upgrades of SRM.

            Mayhaps you could change the length of the field by adding a run process action in an active link after refreshing the DVF, with a small bit of JS code like : getElementById('q1-answer').style.width="....";

            Or, you could change every answerTextarea with a custom "getElementsByClass" function.

            • 18. Re: Field Length On SR
              Laurent Matheo

              Yep it would be better of course

              But as it's a standard SRD and created "on the fly" (?) I wonder if we can do that... It'll work after DVF refresh?

               

              Would be a lead too yes ^_^

              • 19. Re: Field Length On SR
                Sylvain YVON

                Actually, your solution would be better, if the requirement is _really_ important and the client won't hear your warnings.

                The JS solution would require to launch the function on an interval , because we don't know when the DVF has finished rendering the page.

                • 20. Re: Field Length On SR

                  Laurent as Sylvain said YOU ALWAYS ROCK!!!

                   

                  While going through your reply I literally felt as if i am in class room and some one is explaining me bit by bit on board--So much time it would have taken you to answer the question in this way,,, Thanks a lot, thanks thanks thanks---

                   

                  Now no more issues with the field size,,,

                   

                  But ya one disadvantage of replying this way is that now first preson i would ask my queries would be you.

                  Like it or not this is gonna be like that only.. Have a wonderful time ahead--

                   

                  You are an Expert

                   

                  Thanks again

                   

                  Regards,

                  Deepti

                  • 21. Re: Field Length On SR
                    Laurent Matheo

                    @Sylvain:

                    Erf

                     

                     

                    @Deepti:

                    Lol thanks but believe me, there are people around here way better than I am Sylvain is one of them

                    • 22. Re: Field Length On SR
                      Daniele Conigliaro

                      Hi Laurent,

                       

                      first of all I'd like to thank you for your many very useful and interesting posts! Your explanations are very "didactic"

                       

                      Look, I'm wanting to change something on the css SRMSServiceRequestBrowser\resources\css\list-services.css.

                      I manage to recreate a modified SRMSServiceRequestBrowser.jar but although I replace the attachment in Data Visualization Module record, clear all the possible caches and restart Tomcat, there is no way to see any change. It's like my midtier is simply ignoring the new version of SRMSServiceRequestBrowser.jar.

                       

                      I run a Windows Server 2008 R2 midtier, with IIS 7 in front of Tomcat.

                       

                      Have you got any idea what I'm missing?

                       

                      Thanks,

                      Daniele

                      • 23. Re: Field Length On SR
                        Laurent Matheo

                        Hi

                        Thanks ^_^

                         

                        What did you try to change and what did you change so I can try?

                        1 2 Previous Next