Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 34/584 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • Setting height of a DIV to correspond with location of anchor inside said DIV

    - by filip
    Core issue : http://jsfiddle.net/pipip/P46Xg/ I have a div container with a few paragraphs of text, and inside one of these paragraphs is the following anchor <a id="stop" /> The container is set to overflow:hidden Is it possible with javascript / JQuery to set the height of the container so that the bottom of the container stops exactly at or below the anchor? Added Depth & Background : http://jsfiddle.net/pipip/yj9dB/ This would be used for a modified JQuery Slider. Where someone using a CMS could type [readmore] anywhere into the Content field, which would be replaced by the above anchor via PHP. This way they would be easily able to control where the Read More break appears within the container. In the associated example I am hard-coding the height to 75px, although what I want is for the height to be dependent on the location of the anchor id="stop" in the text. Thanks. If this is an awful way to go about it, I'm all ears!

    Read the article

  • WebBrowserDocumentCompletedEventArgs Not Reached inside While Loop

    - by user3715962
    I am trying to use the WebBrowserDocumentCompletedEventHandler inside of a while loop but when the code executes the WebBrowserDocumentCompletedEventArgs is never reached. Can somebody tell me what I am doing wrong? int year = 1900; int currentYear = 2014; private void button1_Click(object sender, EventArgs e) { while (year < currentYear) { WebBrowser wb = new WebBrowser(); wb.Navigate("http://myurl.com/list/" + year.ToString()); year++; wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted); } } void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { //Code is not reaching here MessageBox.Show("Test"); }

    Read the article

  • Access property from include inside a class method in PHP

    - by Jojo
    How do you make a class property available to the other included file inside the same class' method? // file A.php class A { private $var = 1; public function go() { include('another.php'); } } in another file: // this is another.php file // how can I access class A->var? echo $var; // this can't be right Is this possible given the scope. If var is an array then we can use extract but if var is not, we can wrap it in an array. Is there a better way? Thanks!

    Read the article

  • [iPhone] Selling something inside an application

    - by Nonepse
    Hi, I've heard there are some precautions to take to develop a market in an application. I'm developing an application for a football club. I would like to integrate a kind of market to sell stadium seats. Someone told me Apple will refuse the application if I integrate it directly inside the app (using Obj-C, communicating with PHP pages). According to him, I should redirect the user to an external web page (using Safari app for example) to realize the transaction. Apple does not really communicate about that kind of information. Do you know anything about it ? Thanks for any help !

    Read the article

  • It is inconsiderate to place editor settings inside code files?

    - by Carlos Campderrós
    I know this is kind of a subjective question, but I'm curious if there's any good reason to place (or not place) editor settings inside code files. I'm thinking in vi modelines, but it is possible that this applies to other editors. In short, a vi modeline is a line inside a file that tells vi how to behave (indent with spaces or tabs, set tabwidth to X, autoindent by default or not, ...) that is placed inside a comment, so it won't affect the program/compiler when running. In a .c file it could be similar to // vim: noai:ts=4:sw=4 On one hand, I think this shouldn't be inside the file, as it is an editor setting and so belongs to an editor configuration file or property. On the other hand, for projects involving developers outside one company (that are not imposed an editor/settings) or collaborators on github/bitbucket/... it is an easy way to avoid breaking the code style (tabs vs spaces for example), but only for the ones that use that editor though. I cannot see any powerful enough reason to decide for or against this practice, so I am in doubt of what to do.

    Read the article

  • Java (JSP/Servlet): equivalent of getServletContext() from inside a .jsp

    - by Webinator
    How should I access the ServletContext from a .jsp? For example, how can I call the getRealPath method from inside a .jsp. Here's a Servlet, which works fine: protected void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { resp.setContentType( "text/html; charset=UTF-8" ); final PrintWriter pw = resp.getWriter(); pw.print( "<html><body>" ); pw.print( getServletContext().getRealPath( "text/en" ) ); pw.print( "</body></html>" ); pw.flush(); pw.close(); } Now I'm looking for the exact line I'm supposed to insert in the following .jsp to do exactly the same thing as the servlet above is doing. <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <body> ... // What should I insert here </body> </html>

    Read the article

  • Writing a docx file to a BLOB using Java 1.4 inside Oracle 10g

    - by Jon Renaut
    I'm trying to generate a blank docx file using Java, add some text, then write it to a BLOB that I can return to our document processing engine (a custom mess of PL/SQL and Java). I have to use the 1.4 JVM inside Oracle 10g, so no Java 1.5 stuff. I don't have a problem writing the docx to a file on my local machine, but when I try to write to BLOB, I'm getting garbage. Am I doing something dumb? Any help is appreciated. Note in the code below, all the get[name]Xml() methods return an org.w3c.dom.Document. public void save(String fileName) throws Exception { ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(fileName)); addEntry(zos, getDocumentXml(), "word/document.xml"); addEntry(zos, getContentTypesXml(), "[Content_Types].xml"); addEntry(zos, getRelsXml(), "_rels/.rels"); zos.flush(); zos.close(); } public java.sql.BLOB save() throws Exception { java.sql.Connection conn = DbUtilities.openConnection(); BLOB outBlob = BLOB.createTemporary(conn, true, BLOB.DURATION_SESSION); outBlob.open(BLOB.MODE_READWRITE); ZipOutputStream zos = new ZipOutputStream(outBlob.setBinaryStream(0L)); addEntry(zos, getDocumentXml(), "word/document.xml"); addEntry(zos, getContentTypesXml(), "[Content_Types].xml"); addEntry(zos, getRelsXml(), "_rels/.rels"); zos.flush(); zos.close(); return outBlob; } private void addEntry(ZipOutputStream zos, Document doc, String fileName) throws Exception { Transformer t = TransformerFactory.newInstance().newTransformer(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); t.transform(new DOMSource(doc), new StreamResult(baos)); ZipEntry ze = new ZipEntry(fileName); byte[] data = baos.toByteArray(); ze.setSize(data.length); zos.putNextEntry(ze); zos.write(data); zos.flush(); zos.closeEntry(); }

    Read the article

  • jQuery attribute selector inside a jQuery object

    - by chifliiiii
    Im trying to set up a quicksand with multiple filters and the approach im taking in the following which im not sure if its the best. $filteredItems = $containerClone.find('.portfolio-item-marketing').filter(function(index){ if ( $filterA != 'all' && $filterB != 'all' ) { return jQuery(this).find('.portfolio-item-marketing[data-type~=' + $filterA + ']') || jQuery(this).find('.portfolio-item-marketing[data-type~=' + $filterB + ']'); } if ( $filterA != 'all' && $filterB == 'all' ) { return jQuery(this+'[data-type~='+$filterA+']') ; } if ( $filterA == 'all' && $filterB != 'all' ) { return jQuery(this).find('.portfolio-item-marketing[data-type~=' + $filterB + ']'); } if ( $filterA == 'all' && $filterB == 'all' ) { return jQuery(this).find('.portfolio-item-marketing'); } }); As you see in the code i tried 2 different methods ( First "if" and second "if" ). Im not sure if i can use find inside a filter but i also dont know how to get the attribute from the jQuery object. I can not use jQuery(this).attr('data-type') == $filterA Because the attribute maybe contain various filters .Thats why im trying to use jQuery "~=" Should i give up and end using a indexOf ?

    Read the article

  • CSS positioning inside div

    - by christian
    I am using a div with 2 elements inside and I want to position my 1st element to be vertically aligned top and 2nd element to the bottom of the div. The div is the right portion of my page and equal to the height of my main content. #right { float:right; width: 19%; background:#FF3300; margin-left:2px; padding-bottom: 100%; margin-bottom: -100%; } #right .top { display:block; background-color:#CCCCCC; } #right .bottom { bottom:0px; display:block; background-color:#FFCCFF; height:60px; } HTML: <div id="right"> <span class="top">Top element</span> <span class="bottom"><img src="images/logo_footer1.gif" width="57" height="57" align="left" class="img">&nbsp;<img src="images/logo_footer2.gif" width="57" height="57" align="right" class="img"></span> </div> I want the right div to be like this:

    Read the article

  • Problem with textbox inside updatepanel - not causing OnTextChanged event

    - by DaDa
    I have the following situation: I have a textbox inside an ajax updatepanel. Wherever the user types in the textbox I must display a message (different message that depends on the user typed data). <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always"> <ContentTemplate> <asp:TextBox ID="txtMyTexbox" runat="server" Width="500px" OnTextChanged="txtMyTexbox_TextChanged" AutoPostBack="true"></asp:TextBox> <br /> <asp:Label ID="lblMessage" runat="server" CssClass="errorMessage" Visible="false">Hello World</asp:Label> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="txtMyTexbox" /> </Triggers> </asp:UpdatePanel> In server side I have written the following at page load ScriptManager.GetCurrent(this).RegisterAsyncPostBackControl(txtMyTexbox); and the method like this protected void txtMyTexbox_TextChanged(object sender, EventArgs e) { if (.....) { lblMessage.Visible = false; } else { lblMessage.Visible = true; } } My problem now is that: when the user types in the textbox it doesn't cause OnTextChanged event. Am I missing something?

    Read the article

  • Problem with a button's OnClientClick event inside an UpdatePanel

    - by royals
    im using javascript like var TargetBaseControl = null; window.onload = function() { try { //get target base control. TargetBaseControl = document.getElementById('<%= this.GridView1.ClientID %>'); } catch(err) { TargetBaseControl = null; } } function TestCheckBox() { if(TargetBaseControl == null) return false; //get target child control. var TargetChildControl = "chkSelect"; //get all the control of the type INPUT in the base control. var Inputs = TargetBaseControl.getElementsByTagName("input"); for(var n = 0; n < Inputs.length; ++n) if(Inputs[n].type == 'checkbox' && Inputs[n].id.indexOf(TargetChildControl,0) >= 0 && Inputs[n].checked) return true; alert('Select at least one checkbox!'); return false; } and inside the update panel i have code like <asp:Button ID="ButtonSave" runat="server" OnClick="ButtonSave_Click" OnClientClick="javascript:return TestCheckBox();" Text="Save" /> when i run the page and click the button then no more further processing just button has been click nothing happan......

    Read the article

  • [jQuery] Trouble loading tooltips on all images displayed inside Colorbox

    - by adaneko
    I would like to load a tooltip plugin (I'm currently trying qTip, but I've tried a few and have run into the same problem each time) inside Colorbox (http://colorpowered.com/colorbox/). Colorbox dynamically loads this code to display the images you want to show in it: <div id="cboxLoadedContent" style="display: block; width: 400px; overflow: auto; height: 498px;"> <img src="image.jpg" id="cboxPhoto" style="margin: 49px auto auto; border: medium none; display: block; float: none; cursor: pointer;"> </div> Using Colorbox's event hooks, I am currently calling my tooltip plugin on onComplete, but this only applies the tooltip to the first image in the group. If you go to the next image, the tooltip needs to be recalled as Colorbox regenerates the code displayed above. What is the best way to recall the tooltip plugin? I have tried to recall the tooltip by attaching it to clicking on the div with the id "cboxNext" as a test, but it doesn't work since it takes time for cboxPhoto to load, so I think the functions generating the tooltip load before they can apply to the image.

    Read the article

  • CSS: Horizontally scrolling image inside variable width div?

    - by neezer
    I have... <div id="tabs"> <!-- ... --> <div id="interior-photo"> <img src="..."> </div> <!-- ... --> </div> ... and ... #interior-photo { overflow-x: auto; } Basically, I have a page broken down into a main section and a fixed-width right sidebar. Within the main section, I have my tabbed div. The entire page grows with the width of the window, so when the window is resized, the tabbed div grows horizontally in size too. My problem is that the image that I'm loading inside one of the tabbed divs is generally much, much wider than the window usually is (they're panorama pictures; very lengthy horizontally, but not much vertically). I know that I can force the contents of #interior-photo to scroll horizontally using the CSS rule above, but that only seems to work when that same div has a fixed width. Since I want that div to have a variable width, it always seems to display the full width of the image, pushing my layout way out of whack. I know how to fix this using Javascript, but I was wondering if anyone has a CSS-only solution. If you need more information about my layout to solve this issue, please let me know. Thanks!

    Read the article

  • latex list environment inside the tabular environment: extra line at top preventing alignment

    - by Usagi
    Hello good people of stackoverflow. I have a LaTeX question that is bugging me. I have been trying to get a list environment to appear correctly inside the tabular environment. So far I have gotten everything to my liking except one thing: the top of the list does not align with other entries in the table, in fact it looks like it adds one line above the list... I would like to have these lists at the top. This is what I have, a custom list environment: \newenvironment{flushemize}{ \begin{list}{$\bullet$} {\setlength{\itemsep}{1pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} \setlength{\partopsep}{0pt} \setlength{\topsep}{0pt} \setlength{\leftmargin}{12pt}}}{\end{list}} Renamed ragged right: \newcommand{\rr}{\raggedright} and here is my table: \begin{table}[H]\caption{Tank comparisons}\label{tab:tanks} \centering \rowcolors{2}{white}{tableShade} \begin{tabular}{p{1in}p{1.5in}p{1.5in}rr} \toprule {\bf Material} & {\bf Pros} & {\bf Cons} & {\bf Size} & {\bf Cost} \\ \midrule \rr Reinforced concrete &\rr \begin{flushemize}\item Strong \item Secure \end{flushemize}&\rr \begin{flushemize}\item Prone to leaks \item Relatively expensive to install \item Heavy \end{flushemize} & 100,000 gal & \$299,400 \\ \rr Steel & \begin{flushemize}\item Strong \item Secure \end{flushemize} & \begin{flushemize}\item Relatively expensive to install \item Heavy \item Require painting to prevent rusting \end{flushemize} & 100,000 gal & \$130,100 \\ \rr Polypropylene & \begin{flushemize}\item Easy to install \item Mobile \item Inexpensive \item Prefabricated \end{flushemize} & \begin{flushemize}\item Relatively insecure \item Max size available 10,000 gal \end{flushemize} & 10,000 gal & \$5,000 \\ \rr Wood & \begin{flushemize}\item Easy to install \item Mobile \item Cheap to install \end{flushemize} & \begin{flushemize}\item Prone to rot \item Must remain full once constructed \end{flushemize} & 100,000 gal & \$86,300\\ \bottomrule \end{tabular} \end{table} Thank you for any advice :)

    Read the article

  • Perl OO frameworks and program design - Moose and Conway's inside-out objects (Class::Std)

    - by Emmel
    This is more of a use-case type of question... but also generic enough to be more broadly applicable: In short, I'm working on a module that's more or less a command-line wrapper; OO naturally. Without going into too many details (unless someone wants them), there isn't a crazy amount of complexity to the system, but it did feel natural to have three or four objects in this framework. Finally, it's an open source thing I'll put out there, rather than a module with a few developers in the same firm working on it. First I implemented the OO using Class::Std, because Perl Best Practices (Conway, 2005) made a good argument for why to use inside-out objects. Full control over what attributes get accessed and so on, proper encapsulation, etc. Also his design is surprisingly simple and clever. I liked it, but then noticed that no one really uses this; in fact it seems Conway himself doesn't really recommend this anymore? So I moved to everyone's favorite, Moose. It's easy to use, although way way overkill feature-wise for what I want to do. The big, major downside is: it's got a slew of module dependencies that force users of my module to download them all. A minor downside is it's got way more functionality than I really need. What are recommendations? Inconvenience fellow developers by forcing them to use a possibly-obsolete module, or force every user of the module to download Moose and all its dependencies? Is there a third option for a proper Perl OO framework that's popular but neither of these two?

    Read the article

  • HasMany relation inside a Join Mapping

    - by Sean McMillan
    So, I'm having a problem mapping in fluent nhibernate. I want to use a join mapping to flatten an intermediate table: Here's my structure: [Vehicle] VehicleId ... [DTVehicleValueRange] VehicleId DTVehicleValueRangeId AverageValue ... [DTValueRange] DTVehicleValueRangeId RangeMin RangeMax RangeValue Note that DTValueRange does not have a VehicleID. I want to flatten DTVehicleValueRange into my Vehicle class. Tgis works fine for AverageValue, since it's just a plain value, but I can't seem to get a ValueRange collection to map correctly. public VehicleMap() { Id(x => x.Id, "VehicleId"); Join("DTVehicleValueRange", x => { x.Optional(); x.KeyColumn("VehicleId"); x.Map(y => y.AverageValue).ReadOnly(); x.HasMany(y => y.ValueRanges).KeyColumn("DTVehicleValueRangeId"); // This Guy }); } The HasMany mapping doesn't seem to do anything if it's inside the Join. If it's outside the Join and I specify the table, it maps, but nhibernate tries to use the VehicleID, not the DTVehicleValueRangeId. What am I doing wrong?

    Read the article

  • WPF Enable/Disabled controls from a page placed inside main window application

    - by toni
    Hi! I have an WPF application that has a main window. In the left side of this Window there are some buttons into a listbox, it is a kind of menu to access faster to pages. These buttons belongs to pages that they are loaded inside the window when the user selects one. Main window also has another main menu in the top for doing other tasks. When a page is loaded in the main window and the user clicks a button of this currently loaded page, it starts a task that takes a long time. While this long task is executing I want the user can not select (or press) any of the buttons into the listbox because In the loaded page the long task also is updating the UI for this page. I would like to disabled (isEnabled=false) the listbox when long task is executing and not to enabled it until the long task has finished. How can I do this? I mean, from the page is currently loaded I want to disabled the listbox placed in the main window that is the owner. The listbox doesn't belong to the currently loaded page. Thanks!

    Read the article

  • Adding a Layout to bottom of the screen inside a ScrollView in Landscape mode

    - by andreea
    I have the following layout which works in Portrait mode: the Layout with the id LinearLayout02 is placed at the bottom of the screen. The problem appears when flipping to Lanscape mode, when the #LinearLayout02 is placed at the top of the screen. The question is how do I position #LinearLayout02 at the bottom of the screen in both Portrait and Landscape mode? (This happens on G1 and Xperia) Thank you The following code is placed inside a ScrollView android:layout_height="fill_parent" android:layout_width="fill_parent" android:fillViewport="true" <LinearLayout android:id="@+id/sLayout" android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="vertical" android:paddingTop="2dip" android:layout_alignParentTop="true" android:gravity="top" > ..... </LinearLayout> <LinearLayout android:id="@+id/LinearLayout02" android:background="@drawable/bottombar_bg" android:layout_width="fill_parent" android:paddingTop="10dip" android:layout_height="56dip" android:layout_alignParentBottom="true" android:gravity="bottom" > <Button android:id="@+id/navigate" style="@style/mainBottomTabsButtonNormal" android:drawableLeft="@drawable/icon_navigation" android:text="@string/navigationSettings" android:layout_gravity="left"> </Button> <Button android:id="@+id/search" style="@style/mainBottomTabsButtonActive" android:drawableLeft="@drawable/icon_search" android:text="@string/search.label" android:layout_gravity="right"> </Button> </LinearLayout> </RelativeLayout>

    Read the article

  • Application get crash while using NSAutoreleasepool inside MKMapview regionDidChangeAnimated method

    - by Ram
    Hi, i am working on a map application, in that i like to drop the pins (as in Zillow apps) when ever user change the map view. I am using following code code. i am try to load the xml data from server using NSAutoreleasepool to do the xml parsing in the background thread. (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated{ NSLog(@"inside region did changed "); urlString =[NSString stringWithFormat: @"http://asdfasdasdf.com/asdfasdf/mapxml.php]; [stories1 release]; [mapview removeAnnotations:eventPoints1]; eventPoints1 = [[NSMutableArray array] retain]; [self performSelectorInBackground:@selector(callParsing) withObject:nil]; } -(void)callParsing{ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [self parseXMLFileAtURL:urlString]; [self performSelectorOnMainThread:@selector(droppingPin) withObject:nil waitUntilDone:YES]; [pool drain]; } The above code is working fine, but once i changed the mapview, the appllication get crashed. Anyone can help me to fix the issue? thanks in advance.

    Read the article

  • define javascript functions on iframe facebook app inside <fb:serverfbml> tag

    - by user233486
    Hi all, How we can define JS function on inside ? I tried to load file javascript on the end tag , but I still can't call the function from javascript file. Here the FBML tag <fb:serverfbml> <script type="text/fbml"> <fb:fbml> <a href="#" id="this" onclick="do_colors(this); return false">Hello World!</a> <script src="http://absolute.path.to/your/javascript/file.js"></script> </fb:fbml> </script> </fb:serverfbml> And here the javacript function on file.js function random_int(lo, hi) { return Math.floor((Math.random() * (hi - lo)) + lo) } function do_colors(obj) { var r = random_int(0, 255), b = random_int(0, 255), g = random_int(0, 255); obj.setStyle({background: 'rgb('+[r, g, b].join(',')+')', color: 'rgb('+[r<128?r+128:r-128, g<128?g+128:g-128, b<128?b+128:b-128].join(',')+')'}); } I use rails and facebooker to develop the application Any idea or suggestion for define javascript functions? Thanks,

    Read the article

  • Render label for a field inside ASP.NET MVC 2 editor templates

    - by artvolk
    I'm starting to use DataAnnotations in ASP.NET MVC and strongly typed template helpers. Now I have this in my views (Snippet is my custom type, Created is DateTime): <tr> <td><%= Html.LabelFor(f => Model.Snippet.Created) %>:</td> <td><%= Html.EditorFor(f => Model.Snippet.Created)%></td> </tr> The editor template for DateTime is like this: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime>" %> <%=Html.TextBox("", Model.ToString("g"))%> But now I want to put inside editor template the whole <tr>, so I'd like to have just this in my view: <%= Html.EditorFor(f => Model.Snippet.Created)%> And something like this in editor template, but I don't know how to render for for label attribute, it should be Snippet_Created for my example, the same as id\name for textbox, so pseudo code: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime>" %> <tr> <td><label for="<What to place here???>"><%=ViewData.ModelMetadata.DisplayName %></label></td> <td><%=Html.TextBox("", Model.ToString("g"))%></td> </tr> The Html.TextBox() have the first parameter empty and id\name for textbox is generated corectly. Thanks in advance!

    Read the article

  • Using Regex, how can I remove certain characters from inside angle-brackets, leaving the characters

    - by Iain Fraser
    Edit: To be clear, please understand that I am not using Regex to parse the html, that's crazy talk! I'm simply wanting to clean up a messy string of html so it will parse Edit #2: I should also point out that the control character I'm using is a special unicode character - it's not something that would ever be used in a proper tag under any normal circumstances Suppose I have a string of html that contains a bunch of control characters and I want to remove the control characters from inside tags only, leaving the characters outside the tags alone. For example Here the control character is the numeral "1". Input The quick 1<strong>orange</strong> lemming <sp11a1n 1class1='jumpe111r'11>jumps over</span> 1the idle 1frog Desired Output The quick 1<strong>orange</strong> lemming <span class='jumper'>jumps over</span> 1the idle 1frog So far I can match tags which contain the control character but I can't remove them in one regex. I guess I could perform another regex on my matches, but I'd really like to know if there's a better way. My regex Bear in mind this one only matches tags which contain the control character. <(([^>])*?`([^>])*?)*?> Thanks very much for your time and consideration. Iain Fraser

    Read the article

  • How to set a define inside other define

    - by João Madureira Pires
    Hi all! I'm developing a web application in jboss, seam, richfaces. I'm using a template(xhtml) as master page of all others and there i set two insert tags. <ui:insert name="head"/> <ui:insert name="body"/> The problem is that in pages that use this master page as template, the <ui:define name="head">...</ui:define> must be defined inside the <ui:define name="body">...</ui:define>. How can i do this? Basically, what i want is to do the following: <ui:define name="body">... <ui:define name="head"> <meta name="title" content="#{something.title}" /> </ui:define> ...</ui:define> the master page must return : <meta name="title" content="#{something.title}" /> on the <ui:insert name="head"/> Thanks in advance

    Read the article

  • Strange ng-model behavior inside ng-repeat

    - by Mike Fisher
    I'm trying to build up a complex post request to run a report in my Angular app. I have a list of inputs all dynamically generated via an ng-repeat a simple version of my html looks like this. <div ng-repeat="filter in lists.filters"> <input type="checkbox" ng-model="report.options.filters[filter.value]['type']/> <input type="text" ng-model="report.options.filters[filter.value]['values']/> </div> ng-repeat is looping over this array [ {name: 'Advertisers', value: 'advertisers'}, {name: 'Sizes', value: 'sizes'}, {name: 'Campaign IDs', value: 'campaigns'}, {name: 'Creative IDs', value: 'creatives'}, {name: 'Publishers', value: 'publishers'}, {name: 'Placement IDs', value: 'placements'}, {name: 'Seller Types', value: 'seller_types'}, {name: 'Impression Types', value: 'impression_types'}, {name: 'Bid Types', value: 'bid_types'}, {name: 'Seller Members', value: 'seller_members'}, {name: 'Buyer Members', value: 'buyer_members'}, {name: 'Insertion Order Ids', value: 'insertion_orders'}, {name: 'Countries', value: 'countries'}, {name: 'Site Ids', value: 'sites'}, {name: 'Sources', value: 'sources'} ]; The JSON I'm sending back needs to be structured like this: "filters": { "state": "all", "campaigns": {type:"include", values":[1,2]}, "creatives": {type:"exclude","values":[1,2]}, "publishers": {"values":[1,2]}, "placements": {type:"exclude",values":[1,2]}, "advertisers": {"values":[1,2]}, "sizes": {"values":[1,2]}, "countries": {"values":[1,2]}, "insertion_orders": {"values":[1,2]}, "sites": {"values":[1,2]}, "bid_types": {"values":[1,2]}, "seller_types": {"values":[1,2]}, "impression_types": {"values":[1,2]}, "seller_members": {"values":[1,2]}, "buyer_members": {"values":[1,2]}, "sources": {"values":[1,2]} } When I do this Angular throws an error: 'Cannot set property 'values' of undefined' and 'Cannot set property 'type' of undefined' Yet if I do this (inside ng-repeat) <input type="text" ng-model="report.options.filters[filter.value]/> Or this outside of ng-repeat <input type="text" ng-model="report.options.filters[filter.value]['values']/> No errors are thrown and everything works fine. I'm positive that filter.value is defined and available on the scope even though Angular thinks it's not for some reason. I'm not quite sure what I'm doing wrong. Any help is much appreciated.

    Read the article

  • loaderInfo null inside creationComplete handler function

    - by Thiago
    Hi, I've coded this small snippet to show what I'm not understanding: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> public function init():void { txtName.text = this.loaderInfo.toString(); } </mx:Script> <mx:TextInput x="50" y="10" id="txtName"/> </mx:Application> I'm getting the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Teste/init()[C:\Lucas\flex\AppName\src\Teste.mxml:5] at Teste/___Teste_Application1_creationComplete()[C:\User\flex\CornetaRecorder\src\Teste.mxml:2] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.core::UIComponent/set initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568] Shouldn't I be able to read loaderInfo inside the creationComplete handler? I'm trying to pass a string from the html to my flash component, that's why I have to get loaderInfo working.

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >