X-Application Version: 3.1.2,
Tamino Version : 3.1.1
Platform : Win2k
WebContainer : Tomcat 3.3
JDK Version : 1.3.1
Hi all,
i am a novice. i have generated an application using generator. but i want to have the list.jsp page as opening page instead of search.jsp.
how can i do that??
regards
jag
Hello,
if you don’t want to have a search page because your query is fix, you could add a ‘directcommand’ tag of type=‘query’ to your list page. The attribute arg=‘…’ must contain your XQL expression, e.g.
<xapp:directcommand type=“query” arg=“/Property[Address/State~=‘N*’”/>
Some of the simple examples works in this way. For instace, have a look at the page ‘BrowseForModify.jsp’.
Bye,
Christian.
Hi,
I got ur point.But my intention is to set a default page(create.jsp or HOme page) instead of search.jsp.
Where(in which file) does the application generator specify a page to be the default page for an application. i checked out config.xml but changing it didn’t work out.
Hope u got my doubt.
regards
sha
Hello,
I would not call the search page the ‘default’ page. It is the logical entry to the following application scenario which is created by the generator:
1) search the documents you are interested in.
2) select one of the documents listed within the result list.
3) modify or delete the document
Creating a new document is a separate scenario.
If you want to start with a home page: you can add a home (e.g home.jsp).
If you want to change the behavior of the generator for it creates also home.jsp, I don’t know if it’s possible. The generator creates a structure file and applies XLS sheets to this structure file to create the JSP pages.
Changing the behavior of the create page should be possible for using it as starting page:
Add a directcommand with if clause, e.g.
<xapp:form document=“newDoc”>
<xapp:if condition=“notexist” select=“/Property”>
<xapp:directcommand type=“create” schema=“Property” document=“newDoc”/>
</xapp:if>
<xapp:edit …
<xapp:action type=“commit” …> </xapp:action>
</xapp:form>
I don’t know if that helps you. To get a more detailed understanding what you want to do, I have a few questions:
- What is your vision for configurng the generator?
- Can you give us a scenario?
- What kind of projects could be additionally supported by the generator?
For the further development, we could try to integrate your requirements and make the architecture of the generator more flexible for configuration.
Bye,
Christian.
Hi freytag,
Thanks for ur replies.
ur earlier solution(fixed query) works but the problem with it is
1) i cannot give any query becoz the fixed query overrides the given query while opening the list.jsp
2)we have explicitly open list.jsp by clicking a link etc., it wont be the opening page for the aplication.
Regarding ur 2nd solution for default page,
trying to change the behaviour didn’t work out.still i am getting the search.jsp.
How can i get help with configuring the App. Generator.
Any suggestions will be highly appreciated.
Hello,
could you exactly describe what you want to do. Currently, I can guess it. But it seams my guess is wrong. Please describe the sequence of pages you want to call.
What does it mean?
>> trying to change the behaviour didn’t work
>> out.still i am getting the search.jsp
Which page did you invoke by your Internet browser?
Defining a page to start an application if the URL does not contain a page but only a directory is supported by HTTP servers. Default pages like “index.html” or “defaul.html”. It is not dependent on X-Application.
Hi Moderator,
Let me clear the confusion.
I generated an application to handle employee details using App.Generator. It created 6 pages to which i have made some modifications and everything is working fine.
I have also designed a Main Page which has several links to the generated pages which also work fine.opening all the pages manually or by clicking a link works fine.
But when i launch the application from the X-plorer using launch option search.jsp page is getting opened. i just want to know how the Application launcher is selecting search.jsp page to open up whenver the application is launched.Can I make ‘create.jsp’ page to open up when i launch the application from X-plorer.
regarding my earlier post:
>> trying to change the behaviour didn’t work
>> out.still i am getting the search.jsp
I inserted a direct command in create.jsp as suggested by You but, unable to make it open as the first page when the Appliction is launched from X-plorer.
Am i thinking the right way?
Finally thanks for ur patience.
regards
jag
the Application Launcher always starts search.jsp. This is hardwired in the source code.
A simple (and dirty) workaround:
- rename search.jsp to searching.jsp
- rename your new start page to search.jsp
- adjust the links in the jsp pages
This should work, but the new search.jsp page does not do what the name implies.
Another (better?) solution is to change the Source Code that is provided with X-Application. Candidates to change are the classes GuiServlet.java and ApplicationLauncher.java, search for “search.jsp” and change it to your starting page.
Please check in the documentation of X-Application the Chapter “Building Tamino X-Application and Running the Examples” how to rebuild the application. Don´t forget to restart tomcat.
Note: this will affect the start of all generated applications.
Regards, Harald
Hi Harald,
Thanks for the info. The second solution is working fine.
regards,
jag