Search Results

Search found 2126 results on 86 pages for 'jsp fragments'.

Page 4/86 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Nested fragments survive screen rotation

    - by ievgen
    I've faced with an issue with Nested Fragments in Android. When I rotate the screen the Nested Fragments survive somehow. I've come up with a sample example to illustrate this issue. public class ParentFragment extends BaseFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_parent, container); } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); getChildFragmentManager() .beginTransaction() .add(getId(), new ParentFragmentChild(), ParentFragmentChild.class.getName()) .commit(); } @Override public void onResume() { super.onResume(); log.verbose("onResume(), numChildFragments: " + getChildFragmentManager().getFragments().size()); } } public class ParentFragmentChild extends BaseFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_child, null); } } BaseFragment just logs method calls. This is what I see when I rotate the screen. When Activity initially appears ParentFragment? onAttach(): ParentFragment{420d0a98 #0 id=0x7f060064} ParentFragment? onCreate() ParentFragment? onViewCreated() ParentFragmentChild? onAttach(): ParentFragmentChild{420d08d0 #0 id=0x7f060064 com.kinoteatr.ua.filmgoer.test.ParentFragmentChild} ParentFragmentChild? onCreate() ParentFragmentChild? onViewCreated() ParentFragment? onResume() ParentFragment? onResume(), numChildFragments: 1 ParentFragmentChild? onResume() Screen rotation #1 ParentFragmentChild? onPause() ParentFragment? onPause() ParentFragment? onSaveInstanceState() ParentFragmentChild? onSaveInstanceState() ParentFragmentChild? onStop() ParentFragment? onStop() ParentFragmentChild? onDestroyView() ParentFragment? onDestroyView() ParentFragmentChild? onDestroy() ParentFragmentChild? onDetach() ParentFragment? onDestroy() ParentFragment? onDetach() ParentFragment? onAttach(): ParentFragment{4211bc38 #0 id=0x7f060064} ParentFragment? onCreate() ParentFragmentChild? onAttach(): ParentFragmentChild{420f4180 #0 id=0x7f060064 com.kinoteatr.ua.filmgoer.test.ParentFragmentChild} ParentFragmentChild? onCreate() ParentFragment? onViewCreated() ParentFragmentChild? onViewCreated() ParentFragmentChild? onAttach(): ParentFragmentChild{42132a08 #1 id=0x7f060064 com.kinoteatr.ua.filmgoer.test.ParentFragmentChild} ParentFragmentChild? onCreate() ParentFragmentChild? onViewCreated() ParentFragment? onResume() ParentFragment? onResume(), numChildFragments: 2 ParentFragmentChild? onResume() ParentFragmentChild? onResume() Screen rotation #2 ParentFragmentChild? onPause() ParentFragmentChild? onPause() ParentFragment? onPause() ParentFragment? onSaveInstanceState() ParentFragmentChild? onSaveInstanceState() ParentFragmentChild? onSaveInstanceState() ParentFragmentChild? onStop() ParentFragmentChild? onStop() ParentFragment? onStop() ParentFragmentChild? onDestroyView() ParentFragmentChild? onDestroyView() ParentFragment? onDestroyView() ParentFragmentChild? onDestroy() ParentFragmentChild? onDetach() ParentFragmentChild? onDestroy() ParentFragmentChild? onDetach() ParentFragment? onDestroy() ParentFragment? onDetach() ParentFragment? onAttach(): ParentFragment{42122a48 #0 id=0x7f060064} ParentFragment? onCreate() ParentFragmentChild? onAttach(): ParentFragmentChild{420ffd48 #0 id=0x7f060064 com.kinoteatr.ua.filmgoer.test.ParentFragmentChild} ParentFragmentChild? onCreate() ParentFragmentChild? onAttach(): ParentFragmentChild{420fffa0 #1 id=0x7f060064 com.kinoteatr.ua.filmgoer.test.ParentFragmentChild} ParentFragmentChild? onCreate() ParentFragment? onViewCreated() ParentFragmentChild? onViewCreated() ParentFragmentChild? onViewCreated() ParentFragmentChild? onAttach(): ParentFragmentChild{42101488 #2 id=0x7f060064 com.kinoteatr.ua.filmgoer.test.ParentFragmentChild} ParentFragmentChild? onCreate() ParentFragmentChild? onViewCreated() ParentFragment? onResume() ParentFragment? onResume(), numChildFragments: 3 ParentFragmentChild? onResume() ParentFragmentChild? onResume() ParentFragmentChild? onResume() They keep getting multiplied. Does anybody know why is that ?

    Read the article

  • Android - Temporal & Ancestral Navigation with ViewPager & Fragments

    - by rascuache
    I'm trying to work out the best way to implement the 'ancestral' and 'temporal' navigation (utilising the up button and back buttons), for a music player I'm working on. Currently, the user is presented with a viewpager, and can page between three main fragments (ArtistMain, AlbumMain and SongMain). Upon choosing an item inside that view, a fragment transaction occurs, and the viewpager goes out of view, replaced by a new fragment (AlbumSub, Songsub or player, depending on where the user came from). The user can then navigate deeper, until a song is chosen, and then they are taken to the 'player' screen. I guess the question is: How do I implement all of this conditional navigation? I'm fairly new to android and programming in general, and I just can't seem to come up with an efficient way to achieve this. At the moment, as each fragment is brought into view, the app is checking to see where the user just came from, and then determines where the user should be taken if back or home is called. This means I have a booleans like "fromArtistMain", "fromAlbumSub", and I'm checking for things like "fromSongSub && fromPlayer".. it's all turning into a bit of a mess. I've drawn a diagram (in paint, sorry!!), to depict the navigation I'm trying to achieve. The yellow represents the 'up' button press, the red is the 'back' button press, and blue is just normal navigation. The green arrows are meant to represent the view paging: Any advice is welcome. It might take something really simple that I've just overlooked. Thanks for your time.

    Read the article

  • How can I extend Eclipse Java search to JSPs?

    - by benhsu
    Friends, Our JSP code uses both Spring form tags and JSTL tags. Is there a way that when I search for getFoo() in the Eclipse Java Search, for Eclipse to also return uses of the foo property in the JSP files? I suspect the answer is "no", because there isn't a way at compile time to tell the types of the JSP beans, but its worth asking, right?

    Read the article

  • Android 4 Fragments with Mono for Android

    - by Wallym
    With the release of Android 3.0, Google added support for larger displays and attention-grabbing UI designs and layouts. On a tablet screen, UI components can be used to present better information. How does Android do this? It has a technology called Fragments, and I'll look at its implementation in the currently shipping operating system, Android 4. (Let's get past all the jokes about Android and fragmentation on its device platform.)For more information on this, check out my article at Visual Studio Magazine - http://visualstudiomagazine.com/articles/2012/12/13/android-4-and-fragments.aspx

    Read the article

  • Setting the default jsp view with spring mvc

    - by Walker
    I want to set one of jsp files in my jsps folder as the default view for the application. Is there any way we can tell in that abc.jsp needs to be default and it can be found in such and such path. Also the url pattern is html so is there a way it can be mapped in Spring MVC. For example - When a user types www.example.com , I want the application to direct to abc.jsp page and also when someone types www.example.com/something, even then application should direct to abc.jsp, but the url pattern shouldnt be compromised. Many Thanks. Nice Day Walker

    Read the article

  • Tiles vs. JSP includes

    - by Angus Croll
    We have a large web-app with hundreds of jsps pages. To avoid repeating markup up blocks we are considering making use of struts tiles. Now it seems messy to have a combination of both <t:insertTemplate template="/WEB-INF/templates/xxxxx.jsp"> and <%@ include file="xxxxx.jsp"%> statements so we are considering converting all includes statements to insertTemplates (whether or not the template includes any tile syntax) Has anyone had any experience with using tiles 100% for jsp includes?

    Read the article

  • How to download attachment file from JSP

    - by Stardust
    I want to know how can I download any file from JSP page based on content disposition as an attachment from mail server. I want to create a link on JSP page, and by clicking on that link user can download file from mail server. The link should be for content dispostion's attachment type. How can I do that in JSP?

    Read the article

  • Browser show incomplete JSP data

    - by memoryleaks
    I am using JSP, Struts 1.3 and Apache Tomcat 5.5. For some reason response from JSP is being truncated and complete information is not shown. Class generated from the problem JSP page looks just fine. There are no any errors logged in Catalina's logs. I have no idea how this issue can be fixed.

    Read the article

  • javascript and jsp

    - by akellakarthik1254
    i am new bee to java. i have a html which has a show users button, on clicking this button i should redirect the user to a users.jsp page. How do i achieve that. will a function like this will help function msg() { alert("List of Users");<br/> jsp:forward page="Users.jsp"<br/> }

    Read the article

  • What would be the light way to render a JSP page without an App/Web Server

    - by kolrie
    First, some background: I will have to work on code for a JSP that will demand a lot of code fixing and testing. This JSP will receive a structure of given objects, and render it according to a couple of rules. What I would like to do, is to write a "Test Server" that would read some mock data out of a fixtures file, and mock those objects into a factory that would be used by the JSP in question. The target App Server is WebSphere and I would like to code, change, code in order to test appropriate HTML rendering. I have done something similar on the past, but the JSP part was just calling a method on a rendering object, so I created an Ad Hoc HTTP server that would read the fixture files, parse it and render HTML. All I had to do was run it inside RAD, change the HTML code and hit F5. So question pretty much goes down to: Is there any stand alone library or lightweight server (I thought of Jetty) that would take a JSP, and given the correct contexts (Request, Response, Session, etc.) render the proper HTML?

    Read the article

  • How do I set the user's locale on a JSP

    - by ebynum
    I have a .jsp page that the user loads directly. The request it with a URL like the following: http://www.example.com/myfile.jsp?country=CA&language=fr In the JSP, I pull the URL GET parameters and attempt to set the locale using them as follows: <% String myLanguage = request.getParameter("language"); String myCountry = request.getParameter("country"); Locale myLocale = new Locale(myLanguage, myCountry); pageContext.setAttribute("myLocale", myLocale, PageContext.PAGE_SCOPE); %> <fmt:setLocale value="${myLocale}" scope="page" /> There are several places in the JSP that then display a message pulled from a localized resource bundle using <bean:message bundle="ts" key="..." /> from Struts. On the first request for this page (after changing the language in the URL), it is returned in US English (the default Locale), and then subsequent refreshes will return the properly localized content.

    Read the article

  • logout code in jsp.

    - by ajay
    I am using basic level authentication. and i need best logout code in JSP / servlet. I am using JSP & servlet and MS-ACCESS as backend. Is it require a session creation in JSP? please reply as soon as possible. Thanking you.....

    Read the article

  • Custom tag with the logic in JSP (interprets JSPs with the passed parameters)

    - by Romario
    I want to create a custom jsp tag. I want this tag to take a jsp file as a parameter, and in this jsp I want to write the whole logic of the tag. Let's say I want to pass a collection to a tag and then I would write code in jsp to iterate the collection and display it in . Why I want to do it - I really hate having out.print() in my code. Is something like this feasible? I remember doing something similar a while ago, I just forgot the details and my search doesn't seem to find relevant info - a link to a good implementation of the would be nice.

    Read the article

  • JSP: Use information from one page to another

    - by Sandeep Bansal
    Hi, I currently have a JSP page with a Form for the user to enter their name, but what I want is to get the user forwarded to a different JSP page after form submission and to carry on their name to be used. I don't want to use JSTL EL just simple JSP uses. I was thinking of using a bean storing the detail in a session but how would it work. Thanks.

    Read the article

  • jsp update request happens to be invoked by a link

    - by Akshatha
    <tr class="bg-row1"> <td class="td-highlighted-2"> <div align="left"><a href="<%=contextPath%>/jsp/admin/UpdateProject.jsp"><%=searchList1.getProjid()%></a></div> </td> <td class="td-highlighted-2"> <div align="left"><%=searchList1.getProjname()%></div> </td> </tr> here jsp update request happens to be invoked by a link in updateproject.jsp how can i refer projid and projname value in a text box

    Read the article

  • Run jsp in eclipse on specific port and ssl

    - by zealot452
    Hello, I have used Eclipse 3.4 to create a Dynamic Web Project. I have also configured my server to use port 8443 with ssl. If I start my server I can access my test.jsp by going to it's address https://localhost:8443/TestContext/test.jsp In eclipse, I have installed this server and added my project to the server. If I Run test.jsp it always launches as http://localhost:8080/TestContext/test.jsp My question is: How can I set up eclipse to run this on https://localhost:8443/ rather than the default 8080? Thanks in advance.

    Read the article

  • Writing a Servlet that checks to see if JSP's exist and forwards to another JSP if they aren't

    - by Omar Kooheji
    I've beeb tasked with writing a servlet that intercepts a call to and JSP in a specific directoy, check that the file exists and if it does just forwarding to that file, if if doesn't I'm to forward to a default JSP. I've setup the web.xml as follows: <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>CustomJSPListener</servlet-name> <servlet-class> ... CustomJSPListener</servlet-class> <load-on-startup>1</load-on-startup> </servlet> ... <servlet-mapping> <servlet-name>CustomJSPListener</servlet-name> <url-pattern>/custom/*</url-pattern> </servlet-mapping> And the doGet method of the servlet is as follows: public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { logger.debug(String.format("Intercepted a request for an item in the custom directory [%s]",request.getRequestURL().toString())); String requestUri = request.getRequestURI(); // Check that the file name contains a text string if (requestUri.toLowerCase(Locale.UK).contains("someText")){ logger.debug(String.format("We are interested in this file [%s]",requestUri)); File file = new File(requestUri); boolean fileExists = file.exists(); logger.debug(String.format("Checking to see if file [%s] exists [%s].",requestUri,fileExists)); // if the file exists just forward it to the file if (fileExists){ getServletConfig().getServletContext().getRequestDispatcher( requestUri).forward(request,response); } else { // Otherwise redirect to default.jsp getServletConfig().getServletContext().getRequestDispatcher( "/custom/default.jsp").forward(request,response); } } else { // We aren't responsible for checking this file exists just pass it on to the requeseted jsp getServletConfig().getServletContext().getRequestDispatcher( requestUri).forward(request,response); } } This seems to result in an error 500 from tomcat, I think this is because the servlet is redirecting to the same folder which is then being intercepted again by the servlet, resulting in an infinite loop. Is there a better way to do this? I'm lead to believe that I could use filters to do this, but I don't know very much about them.

    Read the article

  • Access variables between nested JSP tags

    - by user308053
    I would like to exchange information between two nested JSP tagx artifacts. To give an example: list.jspx <myNs:table data="${myTableData}"> <myNs:column property="firstName" label="First Name"/> <myNs:column property="lastName" label="Last Name"/> </myNs:table> Now, the table.tagx is supposed to display the data columns as defined in the nested column tags. The question is how do I get access to the values of the property and label attributes of the nested column tags from the table tag. I tried jsp:directive.variable but that seems only to work to exchange information between a jsp and a tag, but not between nested tags. Note, I would like to avoid using java backing objects for both the table and the column tags at all. I would also like to know how I can access an attribute defined by a parent tag (in this example I would like to access the contents of the data attribute in table.tagx from column.tagx). So it boils down to how can I access variables between nested JSP tags which are purely implemented through the tag definitions themselves (no Java TagHandler implementation desired)?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >